fix: detect runner aborts from raw job logs instead of annotations#744
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the submit-aborted-gha-status composite action to detect runner disconnect/preemption aborts by scanning GitHub Actions raw job logs rather than job annotations, aligning with GitHub’s newer logging behavior for these events.
Changes:
- Switched aborted-job detection from annotation scanning to scanning raw job logs for runner disconnect/shutdown messages.
- Added a local
test.shsmoke test to validate the detection logic against a known run/job. - Updated README behavior text to reflect the new detection mechanism.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| submit-aborted-gha-status/action.yml | Replaces annotation-based abort detection with raw job log scanning and runner name extraction logic. |
| submit-aborted-gha-status/test.sh | Adds a local smoke test script to scan failed jobs and identify runner-abort signatures. |
| submit-aborted-gha-status/README.md | Updates documentation to describe log-based detection behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cmur2
force-pushed
the
submit-aborted-gha-status-log-detection
branch
from
July 9, 2026 14:02
a27ad30 to
2cbad28
Compare
kellervater
approved these changes
Jul 13, 2026
kellervater
left a comment
Member
There was a problem hiding this comment.
lgtm. left a non-blocking comment
GitHub no longer surfaces runner disconnect/shutdown events as job
annotations; the annotation now only carries a generic "The operation
was canceled." message. The tell-tale lines ("... lost communication
with the server." and "The runner has received a shutdown signal.")
now appear only in the raw job logs, so the previous annotation-based
detection stopped recording any aborted-job events to CI Analytics.
Scan the raw job logs (/actions/jobs/{id}/logs) for those messages
instead. The runner name is taken from the job API's runner_name field,
falling back to parsing it from the "lost communication" log line.
Callers must grant the token `actions: read` to read raw job logs
(the old annotations endpoint only needed `checks: read`).
cmur2
force-pushed
the
submit-aborted-gha-status-log-detection
branch
from
July 13, 2026 13:07
2cbad28 to
ba5c15e
Compare
pull Bot
pushed a commit
to Mu-L/camunda
that referenced
this pull request
Jul 13, 2026
…unda#57280) ## What Adds `actions: read` to the `observe-aborted-jobs` job in `check-licenses.yml`. ## Why Companion to [camunda/infra-global-github-actions#744](camunda/infra-global-github-actions#744), which changes `submit-aborted-gha-status` to detect runner aborts by scanning **raw job logs** instead of job **annotations**. GitHub moved the tell-tale `The runner has received a shutdown signal.` message out of annotations (which now only say `The operation was canceled.`) and into the raw logs, so the old annotation-based detection stopped recording preempted/aborted self-hosted runner jobs. Reading raw job logs requires the token to have `actions: read`; the previous annotation approach only needed `checks: read`. This job scoped its permissions to `checks: read` only, so without this change the log fetch fails and aborted-job events go unrecorded. `ci.yml`'s `check-results` job already grants `actions: read`, so no change is needed there. ## Note Merge order: this is safe to merge independently, but the behavior only takes effect once #744 is live on `infra-global-github-actions` `main` (the action is pulled `@main`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
submit-aborted-gha-statusnow detects aborted jobs by scanning the raw job logs (/actions/jobs/{id}/logs) instead of job annotations.Why
GitHub changed how runner disconnect/preemption events are logged. The tell-tale messages:
The self-hosted runner: <name> lost communication with the server.The runner has received a shutdown signal.(emitted when a preemptible runner is reclaimed by the host)no longer appear as job annotations — the annotation now only carries a generic
The operation was canceled.. They only show up in the raw job logs. As a result the previous annotation-based grep matched nothing and CI Analytics stopped recording any aborted-job events.Verified against a real preempted job (camunda/camunda run 28489068489, job 84442217068): its only annotation is
The operation was canceled., while the raw log containsThe runner has received a shutdown signal..How
grep -Efor the two messages.runner_namefield (reliably populated).Example:
Reviewer notes
actions: readto read raw job logs. The old annotations endpoint only requiredchecks: read. Consumers that scoped the job tochecks: readonly (e.g. some workflows in camunda/camunda) need updating — a companion change addsactions: readthere.camunda:test.sh(local smoke test, defaults to the verified example run) and the README wording (annotations → job logs).Related to camunda/camunda#57701
🤖 Generated with Claude Code