Making WordPress.org

Opened 5 months ago

Closed 4 months ago

#7613 closed feature request (wontfix)

Support always returning a beta or RC in core API version check

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Component: API Keywords:
Cc:

Description

Previously: #5412.

I think I am correct in saying that a version-check API request that includes channel=beta|rc only responds with a beta or RC if we're currently within the beta or RC window. Outside of that it responds with stable releases only.

Ref: adding support for beta and rc to the `wp core download|update` commands.

For example, a request to https://api.wordpress.org/core/version-check/1.7/?version=6.4.0&channel=rc currently only returns 6.5.2 stable and 6.4.4 stable, but no RC. I was expecting it to return the latest RC in the 6.5 branch regardless of whether it has since gone stable.

Is that something that could be supported? The main reason I'm asking is because in order to implement this in WP-CLI and make it testable, we need to be able to perform an API request which always responds with a beta or RC offer.

Change History (5)

#1 @afragen
5 months ago

@johnbillion it should return a 6.5.3-RC when this is available as this is higher than the current release. It will not provide an offer that is a lower version.

Am I misunderstanding?

#2 @johnbillion
5 months ago

Ah I see. I hadn't considered beta and RC for point releases.

So I guess my question is, outside of a beta or RC window (ie. when there is a higher version stable available), is there no way to fetch an older beta or RC?

What I am aiming to do is allow WP-CLI to facilitate an installation being on a beta or RC channel. As we're not currently within a beta or RC window I'm unable to get a response from the w.org API which includes a beta or RC offer.

#3 @afragen
5 months ago

I think using WP-CLI is the only consistent method, but you would need to know the specific version.

I don’t believe the API will return outdated beta or RC offers.

Last edited 5 months ago by afragen (previous) (diff)

#4 @Otto42
5 months ago

channel=development and/or channel=branch-development will give you alphas/nightlies, if that helps.

#5 @dd32
4 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

For example, a request to https://api.wordpress.org/core/version-check/1.7/?version=6.4.0&channel=rc currently only returns 6.5.2 stable and 6.4.4 stable, but no RC. I was expecting it to return the latest RC in the 6.5 branch regardless of whether it has since gone stable.

Is that something that could be supported? The main reason I'm asking is because in order to implement this in WP-CLI and make it testable, we need to be able to perform an API request which always responds with a beta or RC offer.

Personally; no, this isn't something that should be supported. The API only returns the "latest" releases according to the request, a 6.4.5-RC would be "latest" for that despite 6.5 being released, but once 6.5 goes stable 6.5-RC should never be returned.

For wp-cli testing, it should mock API responses IMHO, it can't rely upon the public API.

Note: See TracTickets for help on using tickets.