Skip to content

ci: Slack digest notification for silent auto-release failures#6337

Open
Eren-Jeager123 wants to merge 3 commits into
mainfrom
feature/autorelease-slack-failure-notification
Open

ci: Slack digest notification for silent auto-release failures#6337
Eren-Jeager123 wants to merge 3 commits into
mainfrom
feature/autorelease-slack-failure-notification

Conversation

@Eren-Jeager123

@Eren-Jeager123 Eren-Jeager123 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

Auto-release workflows (*.autorelease-*.yml, the discover → pipeline pattern) 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:

  • Runs twice daily (16:00 and 20:00 UTC), after the release windows.
  • Sweeps the GitHub Actions API for auto-release runs that failed since the previous sweep.
  • Posts one compact Slack message listing them, or stays silent when nothing failed (no notification noise).
  • Reports each failure exactly once — the two sweeps use complementary lookback windows that tile the day (20:00 sweep looks back 4h; 16:00 sweep looks back 20h, chosen by the sweep hour).
  • Matches 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.
  • Covers workflows by naming convention (name starts 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}}:

🚨 3 autorelease failure(s):
• PyTorch 2.12 EC2 → https://github.com/aws/deep-learning-containers/actions/runs/111
• OpenFold3 SageMaker AL2023 → https://github.com/aws/deep-learning-containers/actions/runs/222
• SGLang EC2 Ubuntu → https://github.com/aws/deep-learning-containers/actions/runs/333

(Slack auto-linkifies each run URL.)

Follow-up required before this alerts

  • Create the Slack Workflow Builder webhook with two variables: count and failures.
  • Store the webhook URL as the repo secret SLACK_RELEASE_FAILURE_WEBHOOK_URL. Until the secret is set, the job runs and no-ops (logs "webhook URL not configured. Skipping").

Testing

  • YAML validated; the jq/awk sweep-and-format pipeline simulated locally (correctly includes in-window Auto Release * failures, excludes out-of-window runs and manual Dispatch - runs, strips the prefix).
  • Payload verified end-to-end against a live Slack Workflow Builder webhook (HTTP 200, message renders with clickable run URLs).
  • workflow_dispatch is enabled for manual verification once the secret is in place.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant