Repository navigation
Check stable-line pull requests with Patch QA and Patch provenance - #9196
Open
craigmichaelmartin wants to merge 3 commits into
Open
craigmichaelmartin wants to merge 3 commits into
craigmichaelmartin wants to merge 3 commits into
Conversation
Patch QA builds the @shopify/cli tarball a release of the pull request's head would publish, installs it on Linux, Windows and macOS (x64 and arm64), runs the checks that need no Shopify account, and fails if its files differ from the line's last release. Patch provenance passes only for a backport whose changes main already has (pinned to the main commit that added its patch changesets) and for the line's Version Packages pull request when it only versions the packages on top of the line's head. It runs from the stable line's own copy of the workflow and reads commits without running the pull request's code. After a release publishes, release.yml installs it from npm on Linux, Windows and macOS and runs the same checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A JSON comparison of package.json and oclif manifests misses changes that parsing normalizes away, such as a duplicated key. Require the same lines, with only version lines changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A backport now has to build on the line's head, and each file it changes has to be, whole, what the main commit that added its changesets does to that file when applied to the line. That commit must have reached main after the line's cut. Before, a backport could reuse an old changeset to bring back old main code, or apply only part of a main commit's change. A Version Packages pull request's new changelog section may only hold the consumed changesets' entries and dependency updates, and no versioned file may change mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Patch releases ship from
stable/X.Yas fixes land, instead of waiting for the next minor. Two things then need checking on every pull request into a stable line, by machine rather than by memory:mainalready has, plus its own version bumps;Today a stable line's pull requests run unit tests, but nothing installs the packed CLI or checks where a backport's changes come from. After a release publishes, nothing checks the published package either.
WHAT is this pull request doing?
Patch QA (
patch-qa.yml), on pull requests intostable/**:@shopify/clitarball the way a release does;npm install -gonubuntu-latest,ubuntu-24.04-arm,windows-latest,windows-11-armandmacos-latest;.github/scripts/smoke-test-cli.sh): version, help, the app, theme and Hydrogen topics, andtheme init,theme checkandtheme package;Patch provenance (
patch-provenance.yml), onpull_request_targetforstable/**, so the workflow comes from the stable line and never runs the pull request's code. It passes only for:patchchangesets for the fixed version group, changes no path outside main's mirrored files, and in which every changed file is exactly what themaincommit that first added its changesets does to that file when applied to the line's head. That commit must be newer than the line's cut frommain;version.ts, oclif manifest versions, the lockfile's workspace specifiers and changelog sections made of the consumed changesets' entries.Any other pull request into a stable line fails it, and a maintainer reviews and merges it.
Release smoke test: after Publish to npm succeeds,
release.ymlinstalls the published version from npm on Linux, Windows and macOS and runs the same checks.Both workflows are inert on
main(they only trigger for pull requests intostable/**). They land here first so new stable lines inherit them, then onstable/5.1.How to manually test your changes?
npm install -g @shopify/cli@5.1.0 --prefix /tmp/shopify-cli-smoke, put/tmp/shopify-cli-smoke/binfirst onPATH, thenbash .github/scripts/smoke-test-cli.sh 5.1.0.maincommit also carried another fix to the same file; the two pass when backported together. Altered versions that add code, edit.github/actions, change a changeset's bump, reuse an old changeset to bring back old code, apply part of a commit, add changelog text, change a file's mode or change a third-party lockfile entry all fail.stable/5.1runs Patch QA on its own head.🤖 Generated with Claude Code