Build/Test Tools: Support multiple built file change patches#12240
Build/Test Tools: Support multiple built file change patches#12240itzmekhokan wants to merge 1 commit into
Conversation
The theme testing workflow uploads a built file changes patch as an artifact for each default theme that has uncommitted changes. Because every job used the same artifact name (`pr-built-file-changes`), runs with more than one affected theme failed: `actions/upload-artifact` rejects duplicate artifact names within a single workflow run. Give each theme a unique artifact name by appending the theme slug, and update the "Commit Built File Changes" workflow to download, unzip, and apply every patch sharing the `pr-built-file-changes` prefix rather than only the first match. The single patch produced by the main build check continues to be handled by the same prefix match. Fixes #65496.
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Hi there! 👋 Thank you for your contribution to WordPress! 💖 It looks like this is your first pull request to No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making. More information about how GitHub pull requests can be used to contribute to WordPress can be found in the Core Handbook. Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook. If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook. The Developer Hub also documents the various coding standards that are followed:
Thank you, |
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.
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.