Repository navigation
Generate the Deflake workflow list - #4344
Open
henrymercer wants to merge 2 commits into
Open
henrymercer wants to merge 2 commits into
henrymercer wants to merge 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change that synchronizes Deflake’s trigger list with generated workflows.
No open issues 🎉
What changed in this PR
This PR generates Deflake’s workflow trigger list alongside the PR-check workflows, preventing the list from drifting as checks are added or renamed.
Changes:
- Combines generated workflow names with an explicit list of non-generated workflows, then sorts and escapes them for literal matching.
- Repairs missing, mismatched, and obsolete Deflake entries.
- Adds tests for escaping, YAML rewriting, and invalid input, and documents the generation behavior.
| File | Description |
|---|---|
pr-checks/sync.ts |
Collects generated workflow names and updates Deflake during generation. |
pr-checks/readme.md |
Documents that workflow generation also updates Deflake’s trigger list. |
pr-checks/deflake.ts |
Defines non-generated workflows and implements trigger-list rewriting. |
pr-checks/deflake.test.ts |
Tests escaping, sorting, formatting, preservation, and error handling. |
.github/workflows/deflake.yml |
Updates the trigger list and reformats the existing condition without changing its value. |
Review effort: Balanced (adaptive)
henrymercer
marked this pull request as ready for review
November 23, 2026 18:23
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.
The Deflake workflow only reruns failed jobs in workflows listed under
on.workflow_run.workflows, and this list has drifted from the PR checks: three checks were missing, one entry didn't match its check's name, and one named a check that no longer exists.The first commit fixes the list by hand. The second generates it in
pr-checks/sync.ts, so that the existing check that the generated workflows are up to date also catches the list drifting from them. Workflows thatsync.tsdoesn't generate are listed by hand in the newpr-checks/deflake.ts.GitHub treats these entries as glob patterns, so
sync.tsescapes them. It rewrites the whole ofdeflake.ymlwith theyamllibrary, which puts the first three lines of theifcondition on one line without changing its value.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
.test.tsfiles).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist