-
Notifications
You must be signed in to change notification settings - Fork 2
feat(anvil): publish scheduled failures as issues #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
08a6f33
0f0ab97
c91cc44
3cdd505
3c5b6d5
d1e77c9
f34b241
3a64a64
f64bf6c
d43587e
77456af
9ba74a7
95fa86c
1767cf4
9aa3aab
0fd8954
3d22490
54e7d3e
c4b173f
827314b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ jobs: | |
| if: ${{ needs.nightly-gatekeeper.outputs.should_skip != 'true' }} | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| steps: | ||
| # prep | ||
|
|
@@ -57,19 +58,26 @@ jobs: | |
| env: | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖: Non-blocking — this is about |
||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| ISSUE_TITLE="🚨 Nightly Build Failed" | ||
| ISSUE_DATE="$(date +'%Y-%m-%d')" | ||
| ISSUE_FULL_TITLE="$ISSUE_TITLE: $ISSUE_DATE" | ||
| ISSUE_BODY="The nightly scheduled build failed. Please check the logs here: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" | ||
| # Search for open issues with the same base title and label | ||
| EXISTING_ISSUE=$(gh issue list --label "bug" --state open --search "$ISSUE_TITLE" --json number,title | jq -r '.[] | select(.title | startswith("'"$ISSUE_TITLE"'")) | .number' | head -n 1) | ||
| ISSUE_TITLE="[Anvil] Scheduled checks failed" | ||
| MARKER="<!-- anvil scheduled failure -->" | ||
| ISSUE_BODY="$MARKER | ||
|
|
||
| The legacy nightly mutation-testing workflow failed. | ||
|
|
||
| [View workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)" | ||
| # Share Anvil's marker-owned incident so overlapping mutation | ||
| # failures produce one durable issue and one notification stream. | ||
| EXISTING_ISSUE=$(gh issue list \ | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖: Non-blocking — I think the goal is right: a nightly mutation failure and an Anvil scheduled failure are one incident operationally, so converging on one durable issue and one notification owner beats two Teams posts. The part worth weighing is the mechanism's other effect: Two cheap guards would close it, either or both:
Separately, and out of scope for this PR: sharing the output while deliberately keeping the inputs distinct means the repo now runs mutation testing twice ( |
||
| --state open \ | ||
| --search '"anvil scheduled failure" in:body' \ | ||
| --limit 100 \ | ||
| --json number,body \ | ||
| --jq '.[] | select(.body | contains("<!-- anvil scheduled failure -->")) | .number' \ | ||
| | head -n 1) | ||
| if [[ -n "$EXISTING_ISSUE" ]]; then | ||
| # Add a comment to the existing issue | ||
| gh issue comment "$EXISTING_ISSUE" --body "$ISSUE_BODY" | ||
| else | ||
| # Create a new issue | ||
| gh issue create \ | ||
| --title "$ISSUE_FULL_TITLE" \ | ||
| --body "$ISSUE_BODY" \ | ||
| --label "bug" | ||
| --title "$ISSUE_TITLE" \ | ||
| --body "$ISSUE_BODY" | ||
| fi | ||
Uh oh!
There was an error while loading. Please reload this page.