Repository navigation
ci(nightly-e2e): scope concurrency group by event and branch - #2379
Conversation
The nightly-e2e workflow used a flat concurrency group that let workflow_dispatch runs cancel the scheduled nightly cron (and vice versa). Two consecutive nightly cron runs were cancelled by dispatch runs on fix/slack-auth-crash-2340, leaving no nightly data since Apr 21. Changes: - Scope concurrency group by event_name and branch so scheduled runs and dispatch runs never interfere. Dispatch runs on different branches also get their own groups. - Extend notify-on-failure to fire on cancelled jobs (not just failures) as defense-in-depth. The notification now lists which jobs failed vs cancelled for faster triage. Fixes #2375
📝 WalkthroughWalkthroughThe workflow's concurrency group is refined from a single value to event-scoped buckets, preventing workflow_dispatch and scheduled runs from interfering. The notification job is expanded to trigger and report on both failures and cancellations, improving observability of interrupted runs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/nightly-e2e.yaml (1)
700-707: Consider neutral outcome wording for cancellation-only runs.Lines 700 and 707 always say “failed,” which can be inaccurate when only cancellations occurred.
✏️ Suggested wording tweak
+ const outcome = failed.length && cancelled.length + ? 'failed and was partially cancelled' + : failed.length + ? 'failed' + : 'was cancelled'; if (match) { await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: match.number, - body: `Failed again on ${new Date().toISOString().split('T')[0]}.\n\n**Run:** ${runUrl}\n${summary}\n**Artifacts:** Check the run artifacts for install/test logs (artifact names vary by job).`, + body: `Nightly E2E ${outcome} on ${new Date().toISOString().split('T')[0]}.\n\n**Run:** ${runUrl}\n${summary}\n**Artifacts:** Check the run artifacts for install/test logs (artifact names vary by job).`, }); } else { await github.rest.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: `${title} — ${new Date().toISOString().split('T')[0]}`, - body: `The nightly E2E pipeline failed.\n\n**Run:** ${runUrl}\n${summary}\n**Artifacts:** Check the run artifacts for install/test logs (artifact names vary by job).`, + body: `The nightly E2E pipeline ${outcome}.\n\n**Run:** ${runUrl}\n${summary}\n**Artifacts:** Check the run artifacts for install/test logs (artifact names vary by job).`, labels: ['bug', 'CI/CD'], }); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/nightly-e2e.yaml around lines 700 - 707, The issue: the issue body and title use the word "failed" unconditionally (in the github.rest.issues.create calls that build title and body using title, runUrl, and summary), which is misleading for cancellation-only runs; fix it by computing a neutral outcome label (e.g., outcomeLabel = summary.includes('cancel') ? 'Cancelled/Attention' : 'Failed') or derive from the run conclusion variable, then use that outcomeLabel in the title and in the body instead of hardcoding "failed"; update the two github.rest.issues.create invocations to interpolate outcomeLabel into title and body (keep runUrl, summary and artifacts text unchanged).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/nightly-e2e.yaml:
- Around line 700-707: The issue: the issue body and title use the word "failed"
unconditionally (in the github.rest.issues.create calls that build title and
body using title, runUrl, and summary), which is misleading for
cancellation-only runs; fix it by computing a neutral outcome label (e.g.,
outcomeLabel = summary.includes('cancel') ? 'Cancelled/Attention' : 'Failed') or
derive from the run conclusion variable, then use that outcomeLabel in the title
and in the body instead of hardcoding "failed"; update the two
github.rest.issues.create invocations to interpolate outcomeLabel into title and
body (keep runUrl, summary and artifacts text unchanged).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 519fb189-d40e-45eb-9a02-86aa4a0f8efa
📒 Files selected for processing (1)
.github/workflows/nightly-e2e.yaml
…ds list) Merge main into fix/nightly-e2e-repairs-v4, resolving the conflict in .github/workflows/nightly-e2e.yaml: - Keep multi-line needs array format (PR readability) - Restore cloud-experimental-e2e in needs list (from main) - Adopt cancelled-job notification condition (from #2379) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
The nightly-e2e workflow used a flat concurrency group (
nightly-e2e) that letworkflow_dispatchruns cancel the scheduled nightly cron and vice versa. The last two consecutive nightly cron runs (Apr 22–23) were both cancelled by dispatch runs onfix/slack-auth-crash-2340, leaving no nightly data since Apr 21.Related Issue
Fixes #2375
Changes
nightly-e2e-schedule-schedule) while dispatch runs are scoped per-branch (nightly-e2e-workflow_dispatch-refs/heads/<branch>). Dispatch runs on different branches no longer interfere with each other or the cron.notify-on-failureto fire on cancelled jobs — theifcondition now includescontains(needs.*.result, 'cancelled')as defense-in-depth. If a run is ever cancelled unexpectedly, the team gets notified.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesAI Disclosure
Summary by CodeRabbit