Opened 12 hours ago
Last modified 2 hours ago
#65496 new defect (bug)
Theme testing workflow will fail when multiple themes have uncommitted changes to built files.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch |
| Focuses: | Cc: |
Description
When the test-and-zip-default-themes.yml workflow detects unexpected changes to built files, a patch file is uploaded as an artifact for the commit-built-file-changes.yml workflow to apply and commit before pushing the changes back to the pull request HEAD branch.
However, if multiple themes have uncommitted changes the workflow will fail due to actions/upload-artifact rejecting artifacts with identical names on the same workflow run (pr-built-file-changes is used for every job).
The workflow needs to be updated to use a unique name for each theme, and commit-built-file-changes.yml needs to be updated to handle multiple patch files from a single triggering workflow (currently only the first artifact is processed).
The check-built-files.yml also uploads artifacts using the same name. But these patches are for the main WordPress build script. There should only ever be one artifact attached to these triggering workflow runs.
The name of the artifact is configured as pr-built-file-changes because that is the name commit-built-file-changes.yml expects. However, only the first artifact is uploaded when a workflow attempts to upload multiple artifacts with the same name (each additional attempt receives a failure and the workflow fails).
Change History (1)
This ticket was mentioned in PR #12240 on WordPress/wordpress-develop by @khokansardar.
2 hours ago
#1
- Keywords has-patch added; needs-patch removed
Fixes the theme testing workflow failing when more than one default theme has uncommitted changes to built files.
What the problem was:
test-build-scriptsmatrix intest-and-zip-default-themes.ymluploaded every theme's patch under the same artifact name (pr-built-file-changes).actions/upload-artifactrejects duplicate artifact names within a single workflow run, so any run with two or more affected themes failed.commit-built-file-changes.ymlonly ever matched and processed the first artifact named exactlypr-built-file-changes, so multiple theme patches could not be handled.What the fix does:
pr-built-file-changes-<theme>.pr-built-file-changesprefix, instead of only the first match.reusable-check-built-files.ymlunchanged; its singlepr-built-file-changesartifact is still matched by the same prefix.Approach and why:
changes.difffiles do not collide, then applied in sequence.Trac ticket: https://core.trac.wordpress.org/ticket/65496
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.8
Used for: Ticket analysis, and tests cases. All changes were reviewed, validated against the codebase, and are taken responsibility for by me.