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

Add core release command(s) to fetch available releases through the .org API #108

Open
schlessera opened this issue Apr 11, 2019 · 12 comments

Comments

@schlessera
Copy link
Member

It would be useful to be able to easily query the available releases of WordPress core through the .org API and also get the download URLs for a given update.

A use case I'm currently working on that this would benefit is wp-cli/wp-cli-tests#51

@schlessera schlessera changed the title Add core release list and core release get commands Add core release command(s) to fetch available releases through the .org API Apr 11, 2019
@schlessera
Copy link
Member Author

It doesn't seem to be possible to query for arbitrary patch version through the WordPress.org API. Am I missing something, like an extra query argument or a different endpoint?

@schlessera
Copy link
Member Author

Also, the locale query for the API argument behave in an unexpected way as well. It does only produce a different result for the first (i.e. the "latest") release, all others seem to still point to en_US downloads...

@swissspidy
Copy link
Member

Also, the locale query for the API argument behave in an unexpected way as well. It does only produce a different result for the first (i.e. the "latest") release, all others seem to still point to en_US downloads...

Maybe @ocean90 knows more here?

@schlessera
Copy link
Member Author

Doesn't he always do?

@ocean90
Copy link
Contributor

ocean90 commented Apr 11, 2019

Can you tell me what endoints you are trying? What's the request looking like? To retrieve all available versions you could use https://api.wordpress.org/core/stable-check/1.0/.

schlessera added a commit that referenced this issue Apr 11, 2019
Adds retrieval of available releases from the wordpress.org API server.

Version constraints are interpreted in the following way right now:

- `4` => anything that starts with the major version 4. This would mean `>= 4.0.0 && < 5.0.0`.
- `4.8` => anything that starts with the major version 4 and minor version 8. This would mean `>= 4.8.0 && < 4.9.0`

Some notes:
- Patch, pre-release or build constraints are not supported yet, as the API server does not provide querying functionality for these.
- I initially added a `--locale` flag, but removed it again for now, as the API server does not seem to respect it for all results, only for the very latest version.

Fixes #108
@swissspidy
Copy link
Member

The current code uses https://api.wordpress.org/core/version-check/1.7/ it seems.

@schlessera
Copy link
Member Author

Yes, indeed, I'm using the version-check endpoint right now. If I have a specific version from stable-check endpoint, can I:

  • retrieve detailed information for that specific version through version-check/some other endpoint with similar information?
  • specify which locale to check for?

@schlessera
Copy link
Member Author

The call to the stable-check is really slow and often times out. Is that endpoint not being cached?

@schlessera
Copy link
Member Author

@ocean90 Do you know whether there might be a caching issue with stable-check ^^^?

@ocean90
Copy link
Contributor

ocean90 commented Oct 17, 2019

There's no caching for that endpoint.

@schlessera
Copy link
Member Author

There's no caching for that endpoint.

Shouldn't that be changed, then? It seems slow and unreliable.

@schlessera
Copy link
Member Author

@ocean90 Is there any update on this regarding the missing caching on the stable-check endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants