Repository navigation
fix(github): superseded runs' cancelled checks no longer block PR watches #30434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+209
−8
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
60d21aa
test(github): reproduce #30378 superseded cancelled run keeps checks …
juliusmarminge aef6535
fix(github): superseded runs' cancelled checks no longer block PR wat…
juliusmarminge e4c0446
fix(github): identify superseded runs by workflow, event and run number
juliusmarminge 6c8e4a4
fix(github): a newer manual dispatch no longer hides an older cancell…
juliusmarminge 6b05382
Merge remote-tracking branch 'origin/main' into fix/issue-30378
juliusmarminge 488e309
fix(github): only pull request runs supersede an older cancelled run
juliusmarminge 535c052
fix(github): a superseded run's required cancelled check still blocks
juliusmarminge 66ec76b
fix(github): run order decides when a newer check replaces a required…
juliusmarminge 8828f34
Merge remote-tracking branch 'origin/main' into fix/issue-30378
juliusmarminge e5166ba
test(github): keep superseded-run cases at the decoder layer
juliusmarminge 0e4d25c
Merge remote-tracking branch 'origin/main' into fix/issue-30378
juliusmarminge a0f96e8
Merge remote-tracking branch 'origin/main' into fix/issue-30378
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
10 changes: 8 additions & 2 deletions
10
packages/source-control-github/src/server/pullRequestReads.graphql.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute superseded runs to a pull request before dropping a cancelled check.
The lineage key at
gitHubPullRequestJson.ts:642uses only the workflow ID and event. The newest-run map (lines 652-653) and the removal test (lines 662-663) use that key. The rollup they read is commit-scoped. The query selects it throughPullRequest.commits(last:1)without a pull request filter, and onlyisRequiredtakespullRequestNumber. A check suite belongs to a commit and can match several pull requests.When two pull requests share a head commit, a newer
pull_requestrun from one pull request can drop a cancelled, non-required check from the other. The other pull request then has no same-name replacement, and its watch can report success.Required behavior: a cancelled check is superseded only by a newer run of the same workflow and event that targets the same pull request. Add that pull request attribution before the removal test. Cover the case where two pull requests share one head commit.