Skip to content

Commit 4aa82f8

Browse files
committed
Tune release failure alerts for tag runs with failed-job details
1 parent 78f3e42 commit 4aa82f8

4 files changed

Lines changed: 29 additions & 4 deletions

File tree

.github/workflows/release-failure-alert.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: release-failure-alert
22

33
on:
44
workflow_run:
5-
workflows: ["release"]
5+
workflows: ["Release"]
66
types: [completed]
77

88
jobs:
@@ -18,6 +18,11 @@ jobs:
1818
with:
1919
script: |
2020
const run = context.payload.workflow_run;
21+
if (run.event !== "push") {
22+
core.info(`Skipping alert issue for non-tag release run event: ${run.event}`);
23+
return;
24+
}
25+
2126
const owner = context.repo.owner;
2227
const repo = context.repo.repo;
2328
const runId = String(run.id);
@@ -29,6 +34,24 @@ jobs:
2934
return;
3035
}
3136
37+
const jobsResponse = await github.rest.actions.listJobsForWorkflowRun({
38+
owner,
39+
repo,
40+
run_id: run.id,
41+
per_page: 100
42+
});
43+
44+
const failedJobs = jobsResponse.data.jobs.filter((job) =>
45+
["failure", "cancelled", "timed_out", "action_required", "stale"].includes(job.conclusion)
46+
);
47+
48+
const failedJobLines = failedJobs.length === 0
49+
? ["- Failed jobs: unavailable"]
50+
: [
51+
"- Failed jobs:",
52+
...failedJobs.map((job) => ` - ${job.name}: ${job.html_url}`)
53+
];
54+
3255
const body = [
3356
"Release workflow reported a failure.",
3457
"",
@@ -38,6 +61,7 @@ jobs:
3861
`- SHA: ${run.head_sha}`,
3962
`- Triggered by: ${run.actor?.login || "unknown"}`,
4063
`- Conclusion: ${run.conclusion}`,
64+
...failedJobLines,
4165
"",
4266
"Action: inspect failed jobs (artifact build/publish/verification) and apply runbook rollback/retry steps."
4367
].join("\n");

docs/modernization-handoff.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ Delivered:
127127
- macOS Rust build linker guardrail (`dynamic_lookup`) for precompiled packaging paths
128128
- tag-driven release workflow (`.github/workflows/release.yml`)
129129
- release failure alert workflow (`.github/workflows/release-failure-alert.yml`)
130+
- tuned to create issues only for failed tag-triggered release runs, with failed job links in alert body
130131
- maintainer release runbook (`docs/release-runbook.md`)
131132
- manual precompiled candidate workflow now validated on both lanes (`precompiled-candidate-evaluation.yml` run `22556129503`)
132133
- manual precompiled candidate workflow now validated with runtime checks on both lanes (`precompiled-candidate-evaluation.yml` run `22556206925`)
@@ -210,7 +211,7 @@ Priority 2:
210211

211212
Priority 3:
212213

213-
- monitor and tune release-failure issue alerting (`.github/workflows/release-failure-alert.yml`)
214+
- monitor tuned release-failure issue alerting (`.github/workflows/release-failure-alert.yml`) and adjust signal/noise as release cadence grows
214215

215216
## Resume Instructions For A New Conversation
216217

docs/porting-strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Completed in `codex/experiment-ruby3-modernization`:
8585
- Post-publish verification helper added (`bin/verify-release-publish`) to validate RubyGems + GitHub release artifacts by tag.
8686
- CI precompiled guardrail job added (`precompiled-gem-build`) for Linux/macOS packaging checks.
8787
- Release workflow post-publish verification job added (`verify_published_artifacts`).
88-
- Release failure alert workflow added (`.github/workflows/release-failure-alert.yml`) to open issue alerts when `release.yml` fails.
88+
- Release failure alert workflow added (`.github/workflows/release-failure-alert.yml`) to open issue alerts for failed tag-triggered `release.yml` runs.
8989
- Maintainer release runbook added (`docs/release-runbook.md`) with publish and rollback/yank procedures.
9090
- Precompiled platform support policy added (`docs/precompiled-platform-policy.md`).
9191

docs/release-runbook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Candidate expansion workflow:
144144
- environment-gated `publish_rubygems`
145145
- environment-gated `publish_github_release`
146146
- `verify_published_artifacts`
147-
- on `release.yml` failure, `.github/workflows/release-failure-alert.yml` opens a triage issue
147+
- on failed tag-triggered `release.yml` runs, `.github/workflows/release-failure-alert.yml` opens a triage issue with failed job links
148148
4. Approve the protected `release` environment when prompted.
149149
5. Confirm published outputs:
150150
- RubyGems shows `lda-ruby` `0.4.0` source gem and platform gems

0 commit comments

Comments
 (0)