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

wp-now: "latest" WP never updates #214

Open
squelchdesign opened this issue Apr 3, 2024 · 4 comments
Open

wp-now: "latest" WP never updates #214

squelchdesign opened this issue Apr 3, 2024 · 4 comments
Assignees
Labels
Enhancement New feature or request wp-now

Comments

@squelchdesign
Copy link

I'm starting wp-now like this:

wp-now start --reset --blueprint=blueprint-wp-now.json

I first ran this when the latest WordPress was 6.4, and it correctly downloaded and used 6.4. Since then WP6.5 was rolled out, but wp-now continues to use 6.4:

$ wp-now start --reset --blueprint=blueprint-wp-now.json
Starting the server......
directory: /Users/lowey/devel/squelch-tabs-and-accordions-shortcodes
mode: plugin
php: 7.4
wp: latest
WordPress latest folder already exists. Skipping download.
…

Removing the "latest" directory before running wp-now triggers a re-download of "latest", bringing it up to the correct version:

$ rm -rf ~/.wp-now/wordpress-versions/latest
$ wp-now start --reset --blueprint=blueprint-wp-now.json
Starting the server......
directory: /Users/lowey/devel/squelch-tabs-and-accordions-shortcodes
mode: plugin
php: 7.4
wp: latest
Downloading WordPress latest...
…

Obviously it's good that wp-now doesn't download WordPress on every run, but it could do with checking whether what is in the "latest" dir matches what the update API says is the latest version.

@adamziel
Copy link
Collaborator

adamziel commented Apr 3, 2024

cc @sejas, I think a new wp-now release may be required. Although that's weird, I rememeber it used api.wp.org to fetch these versions.

@adamziel adamziel added Bug Something isn't working wp-now labels Apr 3, 2024
@adamziel adamziel added this to the Zero Crashes – Tools milestone Apr 3, 2024
@sejas
Copy link
Collaborator

sejas commented Apr 5, 2024

wp-now currently doesn't check updates. The decision was to avoid replacing the latest version by default, because you could have sites using that version and updating it for one will update it for all the sites.

I asked a similar question when the trunk version was introduced --wp=trunk.
#161 (review)

I think a new flag to "force" download or "check" wp version updates would be very handy.

@squelchdesign, a new flag to check updates and download the new version if it exist would solve your issue?

@squelchdesign
Copy link
Author

you could have sites using that version and updating it for one will update it for all the sites

Yes… but if I have, say, three websites that are all set to "latest" and they all get automatically updated to the latest version as a result, that seems right to me (the user asked for "latest" and they got "latest")? If the user wanted to explicity keep a site on 6.4 they could specify --wp=6.4 could they not / would they not?

Aside from the DB update I don't see any obvious issue with the latest version automatically updating in the background for all sites that are opting to use that version. It's not a huge problem either way, as it's hardly a massive burden to delete the "latest" directory from the .wp-now directory to force a fresh download, but if that's to be the behaviour I think the tool needs to be incredibly explicit about it, or users might just assume that "latest means latest" and not bother to check that they really are on the latest version.

@sejas
Copy link
Collaborator

sejas commented Apr 5, 2024

Agreed! I can prepare a PR and see if there is any pushback, which I don't expect to.

@sejas sejas self-assigned this Apr 5, 2024
@sejas sejas added Enhancement New feature or request and removed Bug Something isn't working labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request wp-now
Projects
Status: No status
Development

No branches or pull requests

3 participants