ci: file a tracking issue when a scheduled smoke run fails - #636
Merged
Conversation
A scheduled run has no PR author to notice it, and the Workbench nightly was red for five consecutive days without surfacing anywhere. connect-integration.yml already posts to Slack on failure, but its webhook secret is Connect-specific and the convention was never extended to the other suites. Adds a notify-on-scheduled-failure composite action and wires it into the status jobs of the Workbench, Connect, Package Manager and mock-IdP workflows. It files one tracking issue per workflow and comments on it for repeat failures, so weeks of nightly breakage produce one issue rather than a pile. Uses the built-in GITHUB_TOKEN, so no new secret is needed. De-duplication matches the issue title exactly against the open issues, compared client-side rather than through --search: the search index tokenises, is only eventually consistent, and reads a colon as a qualifier separator. Closing the issue is how you ask for a fresh one. Gated on failure() and github.event_name == 'schedule', so pull-request failures stay quiet. The nightly-failure label has to be created manually. The action degrades to filing without it and emits a warning. Closes #632
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new notification action’s de-duplication logic is brittle (hard dependency on jq + a low issue-list limit), which can undermine the goal of reliably surfacing scheduled failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR ensures scheduled (nightly) smoke workflow failures are surfaced automatically by filing a de-duplicated tracking issue (or commenting on an existing one), addressing the “silent nightly failures” problem described in #632.
Changes:
- Added a composite action that creates or updates a “Nightly failure: …” GitHub issue for scheduled-run failures.
- Wired the action into the status jobs of the Workbench, Connect, Package Manager, and mock-IdP workflows (gated to
failure()onscheduleruns). - Tightened job permissions and added checkout in status jobs so the local composite action can run with
GITHUB_TOKEN.
File summaries
| File | Description |
|---|---|
| .github/workflows/workbench-smoke.yml | Adds permissions + checkout to status job and calls the new notification action on scheduled failures. |
| .github/workflows/connect-smoke.yml | Adds permissions + checkout to status job and calls the new notification action on scheduled failures. |
| .github/workflows/packagemanager-smoke.yml | Adds permissions + checkout to status job and calls the new notification action on scheduled failures. |
| .github/workflows/mock-idp-e2e.yml | Adds permissions + checkout to status job and calls the new notification action on scheduled failures. |
| .github/actions/notify-on-scheduled-failure/action.yml | New composite action that de-duplicates by exact title and files/comments on a tracking issue for scheduled failures. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The step runs under set -euo pipefail, so a transient gh API error -- or a runner image without jq -- aborted it before anything was filed. That is the exact silence this action exists to prevent. The lookup is now non-fatal and degrades to an empty result, which files a duplicate issue instead. A duplicate is noisy; silence is invisible. Raises the open-issue scan from 200 to 500 so an older still-open tracking issue is not missed and mistaken for absent, which would also produce a duplicate.
Resolves the four smoke-workflow conflicts with #637, which inserted timeout-minutes at the same point in each status job where this branch inserts permissions. Both sides are kept, timeout-minutes first to match the placement #637 used everywhere else (immediately after runs-on). Verified after the merge: no job with runs-on is missing timeout-minutes and none combines uses with timeout-minutes; all four status jobs carry timeout-minutes 5, issues: write, and the notify step gated on schedule; all 22 workflow and action files parse; zizmor unpinned-uses and artipacked both 0.
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.
Closes #632
A scheduled run has no PR author to notice it, and the Workbench nightly was red for five consecutive days without surfacing anywhere.
connect-integration.ymlalready posts to Slack on failure, but its webhook secret is Connect-specific and the convention was never extended to the other suites.Adds a
notify-on-scheduled-failurecomposite action and wires it into the status jobs of the Workbench, Connect, Package Manager and mock-IdP workflows. It files one tracking issue per workflow and comments on it for repeat failures, so weeks of nightly breakage produce one issue rather than a pile. It uses the built-inGITHUB_TOKENwith a narrowly scopedissues: write, so no new secret is required — which is what ruled out simply copying the Connect Slack job, since Workbench and Package Manager would each need their own webhook.De-duplication matches the issue title exactly against the open issues, compared client-side rather than handed to
--search: the search index tokenises its input, is only eventually consistent, and reads a colon as a qualifier separator, none of which a de-duplication key tolerates.--state openis what makes closing the issue the way to ask for a fresh one on the next failure.Every call site is gated on
failure() && github.event_name == 'schedule', so pull-request failures stay quiet.Manual step
The
nightly-failurelabel has to be created in the repository. The action already degrades to filing the issue without a label and emits a workflow warning, so nothing breaks before that happens.Testing
All 22 workflow and action files parse. The body generation was run locally against both the new-issue and repeat-failure paths and produces no leading indentation — four leading spaces would have rendered the entire issue body as a code block, which is what the first draft did. The de-duplication filter was exercised against both a matching and a non-matching issue list. CI's two enforced zizmor audits,
unpinned-usesandartipacked, both report 0.Note for review order
This touches the same four smoke workflows as #633. The edits are in different places — a step inside the status job here, versus
timeout-minuteson job headers there — so whichever merges second should rebase cleanly, but it is not conflict-free by construction.