Skip to content

Expand buildx exit codes to include buildkit-specific error classifications #3174

@thompson-shaun

Description

@thompson-shaun

Description

Motivation

Currently, buildx doesn't provide granular exit codes that correspond to specific error types from buildkit. This makes it difficult to programmatically determine the exact nature of a failure, especially in CI/CD environments where automatic retry or fallback logic might depend on the specific type of error.

Proposal

Expand the buildx exit code system to map buildkit's error classifications to unique exit codes. As an initial implementation, focus on the "internal" errors defined in the moby/buildkit errdef package.

Follow-on work

  • Expand codes to cover additional error categories/cases
    - GHA handling

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions