Repository navigation
test(quality): give the changed-path filter suite the push env #881 reads - #884
Open
WilcoLouwerse wants to merge 1 commit into
Open
WilcoLouwerse wants to merge 1 commit into
WilcoLouwerse wants to merge 1 commit into
Conversation
…eads Since #881 a push run diffs from the head of the last push run that finished uncancelled, which it reads with `gh api` and `$BRANCH`. The suite ran push cases with neither, so `set -u` stopped the script on the unbound BRANCH (rc=127) and the docs-only and src/ push cases failed on main, taking the Shared-workflow guard down with them on every PR. A fake `gh` on PATH now answers the two Actions API calls offline, and the push env carries BRANCH and the run ids. Two cases cover what #881 added: a docs-only push after a cancelled code push must run the test tier, and so must a push whose last finished run cannot be read. Both fail against the workflow from before #881, so they test the new path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
Contributor
Author
|
@rjzondervan @remko48 @bbrands02 @SudoThijn could one of you force-merge this PR? I am not allowed to bypass the branch protection myself. Ruben is restructuring the branches tonight and this weekend, so I want this on |
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.
Summary
Since #881, a push run's changed-path filter diffs from the head of the last push run that finished uncancelled, and it reads that with
gh apiand$BRANCH.scripts/test-changed-path-filter.pyruns the push cases with neither.set -ustops the script on the unboundBRANCH(rc=127), so the docs-only andsrc/push cases fail on main. That turns the required Shared-workflow guard red on every open PR in this repo.The workflow is fine; only the suite's environment is incomplete:
ghonPATHanswers the two Actions API calls offline. ItsFAKE_GH_LASTis the head it reports, andFAKE_GH_FAILmakes every call fail.BRANCH,GITHUB_REPOSITORYandGITHUB_RUN_ID.Test plan
python3 scripts/test-changed-path-filter.py .github/workflows/quality.yml→ 16/16 passed (main: 3 failed)--positive-control→ the control still fires🤖 Generated with Claude Code