Fix: Buildkite detective skip conditions exit cleanly instead of failing#1947
Conversation
The skip() function in the buildkite PR detective workflow now exits with code 0 instead of 1 when conditions don't require analysis (no PR, build not failed, or no failed jobs). This prevents the workflow from reporting false failures when it should skip gracefully. Closes #1946 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
|
@copilot run the make compile |
|
@copilot given https://github.github.com/gh-aw/ can we configure the skip for the other jobs to be skipped conditionally somehow? |
Run make compile to update all lock files with compiler improvements: - Fix report-failure-as-issue to use input parameter instead of hardcoded "true" - Update workflow metadata hashes Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Done! I've run |
Yes, there are two approaches to conditionally skip the agent job when there's no data: Option 1: Move data fetch to activation job (better architecture) agent:
needs: activation
if: needs.activation.outputs.has_data == 'true'Option 2: Use noop safe output (current architecture) Option 1 is cleaner because it avoids starting the agent job entirely when there's nothing to do. The current fix (exit 0) prevents false failures, but the agent still runs and consumes resources. Would you like me to implement Option 1? |
TL;DR
Remediation
Investigation detailsRoot CauseThe failing step is a generated-artifact consistency check, not a runtime or logic failure. Source workflow changes landed without the corresponding regenerated lock files, so the CI diff check fails. Evidence
Validation
Follow-up
What is this? | From workflow: Trigger PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
The buildkite PR detective workflow was reporting failures when skip conditions were met (no PR association, build not failed, no failed jobs). The
skip()function usedsys.exit(1), causing the job to fail rather than complete successfully.Changes
.github/workflows/gh-aw-estc-pr-buildkite-detective.md: Changedskip()function exit code from 1 to 0.github/workflows/gh-aw-estc-pr-buildkite-detective.lock.yml: Recompiled workflow with updated exit codeThe workflow still emits notice messages but now completes successfully when skipping, preventing false failure notifications.