ci: Slack digest notification for silent auto-release failures#6337
Open
Eren-Jeager123 wants to merge 3 commits into
Open
ci: Slack digest notification for silent auto-release failures#6337Eren-Jeager123 wants to merge 3 commits into
Eren-Jeager123 wants to merge 3 commits into
Conversation
Auto-release workflows (discover -> pipeline) fail silently today: a scheduled release breaks with no PR involved and nobody watching the Actions tab. Add a digest that runs twice daily (16:00 and 20:00 UTC), sweeps the GitHub API for auto-release runs that failed since the previous sweep, and posts ONE compact Slack message listing them. Stays silent when nothing failed, so no notification noise; each failure is reported exactly once via complementary lookback windows that tile the day (20:00 sweep looks back 4h, 16:00 sweep looks back 20h, chosen by the sweep hour). Runs are matched on failure time (updated_at) not start time, so heavy GPU builds that start before a sweep but fail within the window are still caught. Coverage is by naming convention (name starts with 'Auto Release'), so new autorelease variants (e.g. PyTorch 2.12) are picked up automatically with no list to maintain. Manual 'Dispatch -' release runs are excluded. Flat key/value payload (count/failures) to a Slack Workflow Builder webhook. Webhook stored as secret SLACK_RELEASE_FAILURE_WEBHOOK_URL.
Strip the redundant 'Auto Release - ' prefix from each failure label (the channel already implies auto-release), and render each bullet as a Slack hyperlink '<url|label>' so the full run URL isn't shown inline.
Slack Workflow Builder inserts variable values as plain text and does not render mrkdwn hyperlinks (<url|label>) from a variable, so the links showed up literally. Switch each bullet to '• <label> → <url>'; Workflow Builder auto-linkifies the bare URL. Label still has the 'Auto Release -' prefix stripped.
Eren-Jeager123
added a commit
that referenced
this pull request
Jul 7, 2026
Alternative to the scheduled failure digest (#6337): add a notify-failure job to each of the 10 *.pipeline.yml orchestrators. It needs every job in the pipeline and runs on failure(), so any failed job posts to Slack immediately — no scan timing, no dedup logic, and a failed rerun re-posts. Guarded on the same release context as release-gate (main + autorelease/ dispatch-release ref + inputs.release), so PR runs never notify. Payload is {workflow, url}; the workflow label strips the 'Auto Release - ' prefix and adds the config basename since one workflow releases several configs via matrix. Webhook secret: SLACK_RELEASE_FAILURE_WEBHOOK_URL.
Eren-Jeager123
added a commit
that referenced
this pull request
Jul 7, 2026
Alternative to the scheduled failure digest (#6337): notify Slack the moment an auto-release run fails — no scan timing, no dedup logic, and a failed rerun re-posts. Shared logic lives in a composite action (.github/actions/ notify-slack-failure) so the 10 *.pipeline.yml orchestrators only add a thin notify-failure job that needs every pipeline job, runs on failure(), and calls the action. Guarded on the same release context as release-gate (main + autorelease/dispatch-release ref + inputs.release), so PR runs never notify. Payload is {workflow, url}; the label strips the 'Auto Release - ' prefix and adds the config basename (one workflow releases several configs via matrix). Webhook secret: SLACK_RELEASE_FAILURE_WEBHOOK_URL.
Eren-Jeager123
added a commit
that referenced
this pull request
Jul 7, 2026
Alternative to the scheduled failure digest (#6337): notify Slack the moment an auto-release run fails — no scan timing, no dedup logic, and a failed rerun re-posts. Shared logic lives in a composite action (.github/actions/ notify-slack-failure) so the 10 *.pipeline.yml orchestrators only add a thin notify-failure job that needs every pipeline job, runs on failure(), and calls the action. Guarded on the same release context as release-gate (main + autorelease/dispatch-release ref + inputs.release), so PR runs never notify. Payload is {workflow, url}; the label strips the 'Auto Release - ' prefix and adds the config basename (one workflow releases several configs via matrix). Webhook secret: SLACK_RELEASE_FAILURE_WEBHOOK_URL.
Eren-Jeager123
added a commit
that referenced
this pull request
Jul 7, 2026
…6354) Alternative to the scheduled failure digest (#6337): notify Slack the moment an auto-release run fails — no scan timing, no dedup logic, and a failed rerun re-posts. Shared logic lives in a composite action (.github/actions/ notify-slack-failure) so the 10 *.pipeline.yml orchestrators only add a thin notify-failure job that needs every pipeline job, runs on failure(), and calls the action. Guarded on the same release context as release-gate (main + autorelease/dispatch-release ref + inputs.release), so PR runs never notify. Payload is {workflow, url}; the label strips the 'Auto Release - ' prefix and adds the config basename (one workflow releases several configs via matrix). Webhook secret: SLACK_RELEASE_FAILURE_WEBHOOK_URL.
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.
Problem
Auto-release workflows (
*.autorelease-*.yml, thediscover → pipelinepattern) fail silently: a scheduled release breaks, no PR is involved, and nobody is watching the Actions tab. There is no signal today.Solution
Add a scheduled digest workflow (
.github/workflows/_scheduled.notify-release-failure.yml) that:updated_at), not start time, so heavy GPU builds that start before a sweep but fail within the window are still caught.namestarts with"Auto Release") — new variants (e.g. PyTorch 2.12) are picked up automatically with no list to maintain. Manual"Dispatch -"release runs are intentionally excluded (a human is already watching those).Slack contract
Flat key/value payload to a Slack Workflow Builder webhook (mirrors the existing autocurrency pattern in
scripts/ci/autocurrency/utils.sh; Slack owns formatting/routing):{ "count": "3", "failures": "• PyTorch 2.12 EC2 → https://github.com/aws/deep-learning-containers/actions/runs/111\n• OpenFold3 SageMaker AL2023 → https://github.com/aws/deep-learning-containers/actions/runs/222\n• SGLang EC2 Ubuntu → https://github.com/aws/deep-learning-containers/actions/runs/333" }count— number of failed auto-release runs in the window.failures— pre-formatted multi-line list, one failure per line (• <label> → <run-url>). The redundant"Auto Release - "prefix is stripped from each label. URLs are bare because Slack Workflow Builder inserts variable values as plain text and does not render mrkdwn hyperlinks (<url|label>) from a variable — it does auto-linkify bare URLs.Example message
With PyTorch 2.12, OpenFold3, and SGLang Ubuntu all failing in a window, and a Slack template of
🚨 {{inputs.count}} autorelease failure(s):\n{{inputs.failures}}:(Slack auto-linkifies each run URL.)
Follow-up required before this alerts
countandfailures.SLACK_RELEASE_FAILURE_WEBHOOK_URL. Until the secret is set, the job runs and no-ops (logs "webhook URL not configured. Skipping").Testing
jq/awksweep-and-format pipeline simulated locally (correctly includes in-windowAuto Release *failures, excludes out-of-window runs and manualDispatch -runs, strips the prefix).workflow_dispatchis enabled for manual verification once the secret is in place.