Skip to content

Build/Test Tools: Stop testing downgrades in the upgrade testing workflow - #12972

Closed
adimoldovan wants to merge 3 commits into
WordPress:trunkfrom
adimoldovan:remove-the-downgrade-tests
Closed

Build/Test Tools: Stop testing downgrades in the upgrade testing workflow#12972
adimoldovan wants to merge 3 commits into
WordPress:trunkfrom
adimoldovan:remove-the-downgrade-tests

Conversation

@adimoldovan

@adimoldovan adimoldovan commented Aug 11, 2026

Copy link
Copy Markdown

Trac ticket: https://core.trac.wordpress.org/ticket/65862

Dispatching this workflow with a specific version spawns jobs that start from a newer version. Dispatch 6.6.4 today and it spawns "6.9 to 6.6.4", "7.0 to 6.6.4" and "7.1-RC2 to 6.6.4".

wp core update declines to move backwards without --force, so those jobs pass having tested nothing.

Each matrix now takes its starting versions from a build-test-matrix job, which drops every version that is not older than the target. A job whose list ends up empty is skipped.

Dispatched Starting versions still tested
latest, nightly all of them, unchanged
7.1 all of them, including 7.1-RC2
7.0.1 up to 7.0, dropping the 7.1-RC2 pre-release
6.9.1 up to and including 6.9, since 6.9 to 6.9.1 is a real upgrade
6.9 up to 6.5, since a major target drops its own branch
6.6.4 up to 6.5

Known limitation, unchanged by this PR

A minor target keeps its own branch, because 6.4 to 6.4.4 is a real upgrade. The called workflow runs wp core update --minor before the final upgrade step, so the minor update performs that upgrade and the final step is a no-op. When the target is not the newest release on its branch, the minor update overshoots the target and the target is never installed. Now documented in the workflow.

Testing Instructions

Dispatch Upgrade Tests from this branch:

new-version Expected
latest every job spawns, same as trunk
6.6.4 upgrade-tests-recent-releases skips; 6.9, 7.0 and 7.1-RC2 gone
6.9.1 6.9 still spawns, 7.0 does not
7.0.1 7.0 spawns, 7.1-RC2 does not
4.6 all five jobs skip

Tested:

  • latest is covered by this PR's own CI: 292 jobs across all 15 starting versions, matching trunk.
  • 6.6.4 run on a fork - spawned exactly the 124 expected combinations and skipped one job
  • 4.6 run on a fork - skipped all five

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Implementation, inline documentation, and iterative code review of the change. I have reviewed the result and take responsibility for it.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@adimoldovan adimoldovan self-assigned this Aug 11, 2026
@adimoldovan
adimoldovan force-pushed the remove-the-downgrade-tests branch 2 times, most recently from 2f36234 to 8f16b79 Compare August 12, 2026 14:51
@adimoldovan
adimoldovan marked this pull request as ready for review August 12, 2026 15:25
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props adrianmoldovanwp, irozum, lancewillett.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

irozum

This comment was marked as low quality.

…flow.

When the workflow is dispatched with a specific version, the matrices still
spawn jobs that start from a newer version. Those are downgrades, and
`wp core update` declines to move backwards without `--force`, so the jobs pass
without testing anything.

Build the list of starting versions for each matrix from the version being
tested, dropping every version that is not older than it, and skip a job whose
list ends up empty.
@adimoldovan
adimoldovan force-pushed the remove-the-downgrade-tests branch from 8f16b79 to 0bb4438 Compare September 1, 2026 09:09
pento pushed a commit that referenced this pull request Sep 2, 2026
Manually dispatching the upgrade testing workflow with an older target can spawn jobs that start from newer WordPress versions. WP-CLI rejects those downgrades, so the jobs pass without testing an upgrade.

Build each matrix from starting versions older than the target, and skip jobs whose matrix becomes empty. Scheduled and pull request runs remain unchanged.

Developed in: #12972

Props adrianmoldovanwp.
Fixes #65862.


git-svn-id: https://develop.svn.wordpress.org/trunk@63437 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 63437
GitHub commit: 96b7245

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Sep 2, 2026
@github-project-automation github-project-automation Bot moved this from In review to Done in WordPress Project Build Tooling Sep 2, 2026
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Sep 2, 2026
Manually dispatching the upgrade testing workflow with an older target can spawn jobs that start from newer WordPress versions. WP-CLI rejects those downgrades, so the jobs pass without testing an upgrade.

Build each matrix from starting versions older than the target, and skip jobs whose matrix becomes empty. Scheduled and pull request runs remain unchanged.

Developed in: WordPress/wordpress-develop#12972

Props adrianmoldovanwp.
Fixes #65862.

Built from https://develop.svn.wordpress.org/trunk@63437


git-svn-id: http://core.svn.wordpress.org/trunk@62619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants