4.2 KiB
Buildkite Build and Job States
Understanding Buildkite states is critical for correctly interpreting build status. Some states are misleading or require additional context.
Build States
Terminal States
passed- All jobs completed successfullyfailed- One or more jobs failedcanceled- Build was manually canceledskipped- Build was skipped (e.g., due to branch filters)blocked- Build is waiting for manual approval via block step
Active States
running- Build is currently executingscheduled- Build is queued and waiting to startcreating- Build is being created
Job States
Terminal States
passed- Job completed successfullyfailed- Job failed with non-zero exit codecanceled- Job was canceledskipped- Job was skippedtimed_out- Job exceeded time limit
Special States (Often Misleading)
-
broken- This is the most misleading state. It can mean:- Job was skipped because an earlier job in the pipeline failed
- Job was skipped due to dependency conditions not being met
- Job was skipped due to conditional logic in the pipeline config
- NOT necessarily a failure of this specific job
Example: In the zen-payroll pipeline, many jobs show as "broken" but are actually skipped because their dependencies indicated they weren't needed (e.g., no relevant file changes).
-
soft_failed- Job failed but was marked as "soft fail" (doesn't block pipeline)- Shows as failed but doesn't cause overall build failure
- Often used for optional checks or flaky tests
Active States
waiting- Job is waiting for dependencieswaiting_failed- Job was waiting but its dependency failedassigned- Job has been assigned to an agentaccepted- Agent has accepted the jobrunning- Job is currently executingblocked- Job is a block step waiting for manual unblock
Interpreting Build Status
Progressive Disclosure Pattern
When checking build status, follow this pattern:
- Start with overall state:
passed,failed,canceled,blocked - If failed, check job summary: How many jobs failed vs broken vs passed?
- Examine failed jobs specifically: Don't assume "broken" means the job itself failed
- Check annotations: Some projects surface important failures in annotations
- Inspect logs: For actual failures, read the job logs
Common Pitfalls
-
Treating "broken" as "failed": A "broken" job is often just skipped due to pipeline logic, not an actual failure.
-
Ignoring soft fails: Jobs marked as
soft_failedmay contain important information even though they don't block the build. -
Missing blocked builds: A
blockedbuild is waiting for approval and won't progress without manual intervention. -
Overlooking job dependencies: Jobs may be skipped (
broken) because their dependencies weren't met, which is expected behavior.
Project-Specific Patterns
zen-payroll Pipeline
- Heavy use of conditional execution: Many jobs are conditionally skipped based on file changes
- "broken" is normal: A build with many "broken" jobs may still be perfectly healthy
- Check annotations: Important test failures are often surfaced in build annotations
- Multiple test suites: Different test types (unit, integration, system) have different failure patterns
Smaller Pipelines (e.g., gusto-karafka)
- Fewer conditional jobs: Most jobs are expected to run
- "broken" usually indicates a problem: Less conditional logic means broken jobs are more likely to be actual issues
- Simpler job graphs: Easier to trace why a job didn't run
- May not use annotations: Failures are usually just in job logs
When to Investigate
Investigate a build when:
- Overall build state is
failed - Jobs show
failedstate (not justbroken) - Build is
blockedand you need to unblock it - Annotations contain error messages
- Job logs show actual errors (red output, stack traces, test failures)
Don't automatically investigate when:
- Build is
passed(even if some jobs arebroken) - Jobs are
soft_failedunless specifically requested - Jobs are
brokendue to conditional execution (check pipeline config)