-
-
Notifications
You must be signed in to change notification settings - Fork 161
ci: open issues for unattended scheduled gate failures #9880
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
Closed
proggeramlug
wants to merge
1
commit into
PerryTS:main
from
proggeramlug:fix/9830-scheduled-gate-issues
Closed
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| name: Scheduled Gate Failure Watch | ||
|
|
||
| # A completed red gate on main is not an alert by itself: #9830 measured one | ||
| # correctly failing scheduled workflow that stayed red for nineteen days. This | ||
| # observer turns that result into one durable issue per workflow. Repeated reds | ||
| # update the same issue with the current rows and their delta; the next green | ||
| # closes it. | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: | ||
| - Auto-Optimize App Patterns | ||
| - CI | ||
| - Gate Freshness | ||
| - GC Moving Witnesses | ||
| - gc-native-roots | ||
| - GC Parse-Churn Layout Gate | ||
| - GC Ptr<Shape> OFF-arm witness | ||
| - GC Ratchet | ||
| - GC Root Dominance | ||
| - TLS Budget | ||
| - eh-transport | ||
| - llvm-inprocess | ||
| types: [completed] | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/*.yml | ||
| - scripts/gate_failure_watch.json | ||
| - scripts/gate_failure_watch.py | ||
| - scripts/gate_freshness.json | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: scheduled-gate-failure-watch-${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| validate: | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Self-test the failure observer | ||
| run: python3 scripts/gate_failure_watch.py --self-test | ||
| - name: Check watched-workflow configuration | ||
| run: python3 scripts/gate_failure_watch.py --check-config | ||
|
|
||
| observe: | ||
| if: >- | ||
| github.event_name == 'workflow_run' && | ||
| ( | ||
| github.event.workflow_run.event == 'schedule' || | ||
| ( | ||
| (github.event.workflow_run.event == 'workflow_dispatch' || | ||
| github.event.workflow_run.event == 'repository_dispatch') && | ||
| github.event.workflow_run.head_branch == 'main' | ||
| ) || | ||
| ( | ||
| github.event.workflow_run.event == 'push' && | ||
| (github.event.workflow_run.head_branch == 'main' || | ||
| startsWith(github.event.workflow_run.head_branch, 'v')) | ||
| ) | ||
| ) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| issues: write | ||
| steps: | ||
| # workflow_run carries a write-capable token. Execute only the trusted | ||
| # default-branch script, never the triggering workflow's checkout. | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: main | ||
| persist-credentials: false | ||
| - name: Open, update, or close the workflow's failure issue | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| GITHUB_REPOSITORY: ${{ github.repository }} | ||
| run: python3 scripts/gate_failure_watch.py | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "default_branch": "main", | ||
| "tag_pattern": "^v[0-9]", | ||
| "workflows": [ | ||
| { "path": "auto-opt-app-patterns.yml", "name": "Auto-Optimize App Patterns" }, | ||
| { "path": "eh-transport.yml", "name": "eh-transport" }, | ||
| { "path": "gate-freshness.yml", "name": "Gate Freshness" }, | ||
| { "path": "gc-moving-witnesses.yml", "name": "GC Moving Witnesses" }, | ||
| { "path": "gc-native-roots.yml", "name": "gc-native-roots" }, | ||
| { "path": "gc-parse-churn-gate.yml", "name": "GC Parse-Churn Layout Gate" }, | ||
| { "path": "gc-ptr-shape-off-witness.yml", "name": "GC Ptr<Shape> OFF-arm witness" }, | ||
| { "path": "gc-ratchet.yml", "name": "GC Ratchet" }, | ||
| { "path": "gc-root-dominance.yml", "name": "GC Root Dominance" }, | ||
| { "path": "llvm-inprocess.yml", "name": "llvm-inprocess" }, | ||
| { "path": "test.yml", "name": "CI" }, | ||
| { "path": "tls-budget.yml", "name": "TLS Budget" } | ||
| ], | ||
| "excluded": [ | ||
| { | ||
| "path": "npm-publish-freshness.yml", | ||
| "why": "This workflow already maintains its own sticky failure issue." | ||
| } | ||
| ] | ||
| } |
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.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge PerryTS/perry /tmp/coderabbit-repo-knowledge/perryts-perry-d4a878bc/learningsLength of output: 10014
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 44786
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 3610
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 44760
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 14670
🌐 Web query:
GitHub Actions concurrency workflow_run event payload workflow_id workflow_run.id concurrency group expression💡 Result:
In GitHub Actions, the workflow_run event allows you to trigger a workflow based on the activity (requested, in_progress, or completed) of another workflow [1][2]. The event payload includes a workflow_run object, which contains details about the triggering workflow, including its unique ID (workflow_run.id) and the ID of the workflow definition itself (workflow_id) [3][4]. When configuring concurrency for a workflow triggered by the workflow_run event, you can define a concurrency group using expressions [5][6]. A key limitation to keep in mind is that the concurrency expression at the workflow level can only use the github, inputs, and vars contexts [6][7][8]. Because the workflow_run event payload is exposed through the github.event context, you can access the trigger information within your concurrency expression [6][7]. For example, to create a concurrency group based on the ID of the workflow run that triggered your current workflow, you could use the following expression: concurrency: group: ${{ github.workflow }}-${{ github.event.workflow_run.id }} cancel-in-progress: true In this example, github.event.workflow_run.id dynamically retrieves the unique ID of the triggering workflow run, ensuring that your concurrency group is unique to that specific execution chain [6][7]. Since the concurrency expression is limited to the allowed contexts, you cannot access other, more complex event metadata that is not part of the standard github context [6][7].
Citations:
Use a workflow-specific concurrency group.
workflow_run.iddiffers for each triggering run, so concurrent red runs can both find no issue and create duplicates throughsync_failure_issue(). Key the group ongithub.event.workflow_run.workflow_idand retaingithub.run_idfor pull-request validation runs.🤖 Prompt for AI Agents