Skip to content

Commit 0ef5dd2

Browse files
ci: auto-create GitHub issue on nightly E2E failure (#508)
* ci: auto-create GitHub issue on nightly E2E failure * ci: rebase to include changes upstream Signed-off-by: Jaya Venkatesh <[email protected]> * ci: fix notify-on-failure for skipped gpu-e2e and generic artifact refs --------- Signed-off-by: Jaya Venkatesh <[email protected]>
1 parent b789cc2 commit 0ef5dd2

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

‎.github/workflows/nightly-e2e.yaml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# gpu-e2e Local Ollama inference on a GPU self-hosted runner.
99
# Controlled by the GPU_E2E_ENABLED repository variable.
1010
# Set vars.GPU_E2E_ENABLED to "true" in repo settings to enable.
11+
# notify-on-failure Auto-creates a GitHub issue when any E2E job fails.
1112
#
1213
# Runs directly on the runner (not inside Docker) because OpenShell bootstraps
1314
# a K3s cluster inside a privileged Docker container — nesting would break networking.
@@ -132,3 +133,43 @@ jobs:
132133
name: gpu-e2e-test-log
133134
path: /tmp/nemoclaw-gpu-e2e-test.log
134135
if-no-files-found: ignore
136+
137+
notify-on-failure:
138+
runs-on: ubuntu-latest
139+
needs: [cloud-e2e, cloud-experimental-e2e, gpu-e2e]
140+
if: ${{ always() && (needs.cloud-e2e.result == 'failure' || needs.cloud-experimental-e2e.result == 'failure' || needs.gpu-e2e.result == 'failure') }}
141+
permissions:
142+
issues: write
143+
steps:
144+
- name: Create or update failure issue
145+
uses: actions/github-script@v7
146+
with:
147+
script: |
148+
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
149+
const title = 'Nightly E2E failed';
150+
151+
const { data: existing } = await github.rest.issues.listForRepo({
152+
owner: context.repo.owner,
153+
repo: context.repo.repo,
154+
state: 'open',
155+
labels: 'CI/CD',
156+
per_page: 100,
157+
});
158+
const match = existing.find(i => !i.pull_request && i.title.startsWith(title));
159+
160+
if (match) {
161+
await github.rest.issues.createComment({
162+
owner: context.repo.owner,
163+
repo: context.repo.repo,
164+
issue_number: match.number,
165+
body: `Failed again on ${new Date().toISOString().split('T')[0]}.\n\n**Run:** ${runUrl}\n**Artifacts:** Check the run artifacts for install/test logs (artifact names vary by job).`,
166+
});
167+
} else {
168+
await github.rest.issues.create({
169+
owner: context.repo.owner,
170+
repo: context.repo.repo,
171+
title: `${title} — ${new Date().toISOString().split('T')[0]}`,
172+
body: `The nightly E2E pipeline failed.\n\n**Run:** ${runUrl}\n**Artifacts:** Check the run artifacts for install/test logs (artifact names vary by job).`,
173+
labels: ['bug', 'CI/CD'],
174+
});
175+
}

0 commit comments

Comments
 (0)