Making WordPress.org

Opened 7 weeks ago

Closed 7 weeks 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
7 weeks 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
7 weeks 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
7 weeks 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 7 weeks ago by afragen (previous) (diff)

#4 @Otto42
7 weeks ago

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

#5 @dd32
7 weeks 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.