Repository navigation
skip exits with 1 for the buildkite pr build analyser #1946
Description
Activity
github-actions commented
on Aug 28, 2026 on Aug 28, 2026 – with GitHub ActionsContributorMore actionstl;dr: the workflow currently treats skip as a hard failure (
exit 1), so your issue is valid — the fix should make skip paths exit successfully and gate downstream analysis on an explicit signal.Recommendation
Update
.github/workflows/gh-aw-estc-pr-buildkite-detective.mdso skip conditions do not fail the step/job. Concretely, change theskip()helper tosys.exit(0)and add a small explicit output/signal (for exampleshould_analyze=true|false) that downstream steps use inif:guards.This preserves current behavior for real errors while making expected no-op conditions (no PR, non-failed build, no failed script jobs) cleanly skip analysis.
Findings
- In the source workflow, skip is explicitly implemented as failure:
.github/workflows/gh-aw-estc-pr-buildkite-detective.md:139-143def skip(reason): ... sys.exit(1)
- Skip is invoked for expected/non-error paths:
.github/workflows/gh-aw-estc-pr-buildkite-detective.md:145(no PR).github/workflows/gh-aw-estc-pr-buildkite-detective.md:148(build state not failed/failing).github/workflows/gh-aw-estc-pr-buildkite-detective.md:172(no failed script jobs)
- The generated lock file mirrors this behavior (so this is not a compile mismatch):
.github/workflows/gh-aw-estc-pr-buildkite-detective.lock.yml:573
- Related issues I checked (
#1098,#647) are about comment spam/reuse and do not address skip exit-code semantics.
Verification
I validated the behavior by inspecting the source and generated workflow files and by simulating the
skip()control path: it returns exit code1today.Detailed Action Plan
- In
.github/workflows/gh-aw-estc-pr-buildkite-detective.md, update the Python helper:- At
skip(reason), replacesys.exit(1)withsys.exit(0).
- At
- Emit an explicit step output for downstream control (e.g.,
should_analyze=falseon skip,truewhen failures are found). - Guard subsequent analysis/comment steps with
if: ... && steps.<resolve-step>.outputs.should_analyze == 'true'so skip short-circuits the rest. - Re-run
make compileso.lock.ymlregenerates from the source. - Add/update a focused test/fixture (if present for workflow rendering/behavior) to assert skip scenarios are non-failing.
Related Items
Type Link Relevance Issue #1946 Current report: skip should not fail run Issue #1098 Same workflow family; comment spam concern (different problem) Issue #647 Same workflow family; comment reuse concern (different problem) File .github/workflows/gh-aw-estc-pr-buildkite-detective.md:139-173Source of skip logic and call sites File .github/workflows/gh-aw-estc-pr-buildkite-detective.lock.yml:573Generated workflow confirms same skip semantics
What is this? | From workflow: Trigger Issue Triage
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
- In the source workflow, skip is explicitly implemented as failure:
- linked a pull request that will close this issueFix: Buildkite detective skip conditions exit cleanly instead of failing #1947
on Aug 28, 2026 - added a commit that references this issue
on Aug 28, 2026
Given https://github.com/elastic/ai-github-actions/blob/main/.github/workflows/gh-aw-estc-pr-buildkite-detective.md?plain=1
if skip then it fails
But that's not what I think we should use, we should skip the next steps instead of running the analysis any further.
If it fails then the job failed and it will get reported, while I don't think we should use this as is.
Analyse how we can improve this