Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer files not updated when new version fetched #265

Closed
rayrutjes opened this issue Jan 8, 2018 · 6 comments
Closed

Composer files not updated when new version fetched #265

rayrutjes opened this issue Jan 8, 2018 · 6 comments
Labels

Comments

@rayrutjes
Copy link

There is a discrepancy when a user manually asks to update a given repository.
The display will show the latest version, but this version will not be available for use in composer until the build command is ran.

@khromov
Copy link
Collaborator

khromov commented Jan 8, 2018

Hi @rayrutjes and thank you for your bug report.

Please provide:

  • Exact reproduction steps (ie. which commands you are running, along with your composer.json / composer.lock files)
  • Your result
  • Your expected result
  • Composer / PHP version

@rayrutjes
Copy link
Author

Thanks for the quick reply @khromov .

Reproduction steps:

  • Go to the frontend interface
  • Click on the "refresh" icon of a plugin that has a new version that has not been refreshed yet
  • The version is correctly added to the list
  • But the composer file does not include this new version and as a result, you can not yet fetch this new version from your project

As a user I would expect that the UI reflects the state of the composer repository.
If a version is displayed, then it should also be available from composer.

I guess this is a tricky one since there isn't such thing as updating a single composer entry for a given plugin. This is only updated at each cron run of php bin/cmd build.

@khromov
Copy link
Collaborator

khromov commented Jan 8, 2018

Thanks for those additional details, I understand the issue now.

Rebuilding takes about 15 seconds on my computer, so it's not prohibitively expensive to do it on an update. However, it might exacerbate a problem that I've noticed where if the build script runs while you are performing a composer update, the file names that hold plugin data will have brand new hashes and so you'll get 404 errors midway through your command.

@joaquimds Maybe you have some input regarding this?

@ethanclevenger91
Copy link

Just ran into this myself. Would love to see an update! For posterity's sake, how often is the wpackagist composer repository rebuilt?

@NoelLH
Copy link
Contributor

NoelLH commented Dec 22, 2020

@ethanclevenger91 this is an open question! #350 and underlying bug #368 are outstanding and should unlock testing of much faster updates.

I think the refactoring & fixes already written will also address the immediate rebuild step, hopefully also mitigating the risk of resulting 404s. But we can re-test once we have resolved the bug blocking deploying the changes.

@NoelLH NoelLH added the bug label Dec 23, 2020
@NoelLH
Copy link
Contributor

NoelLH commented Dec 23, 2020

The logic changes which do all the steps for a specific package on-demand are now live. I'll close this for now – please reopen if you find the problem's ongoing.

@NoelLH NoelLH closed this as completed Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants