Skip to content

Conversation

@dabarrell
Copy link
Contributor

@dabarrell dabarrell commented Jun 24, 2025

Description

Adds a --validate-dependencies flag to the pipeline upload command, which will fail the upload if any steps depend on keys that don't exist.

Context

Changes

❯ ./buildkite-agent-local pipeline upload --help
Usage:

    buildkite-agent pipeline upload [file] [options...]

<snip>

Options:

<snip>

  --validate-dependencies      When true, validates the dependencies of each step when uploading. [$BUILDKITE_PIPELINE_VALIDATE_DEPENDENCIES]

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

@dabarrell dabarrell force-pushed the db/validate-dependencies branch 3 times, most recently from c4336e8 to 27889b3 Compare July 3, 2025 02:26
@dabarrell dabarrell requested a review from DrJosh9000 July 3, 2025 05:44
Add test for pipeline upload params
@dabarrell dabarrell force-pushed the db/validate-dependencies branch from 6967e15 to d2bf920 Compare July 3, 2025 05:48
@dabarrell dabarrell requested a review from a team July 3, 2025 05:48
cli.BoolFlag{
Name: "validate-dependencies",
Usage: "When true, validates the dependencies of each step when uploading.",
EnvVar: "BUILDKITE_PIPELINE_VALIDATE_DEPENDENCIES",
Copy link
Contributor Author

@dabarrell dabarrell Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The env vars in this command don't seem to follow the same pattern, so I just chose one that matched --replace. Alternatively: BUILDKITE_AGENT_PIPELINE_UPLOAD_VALIDATE_DEPENDENCIES ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUILDKITE_PIPELINE_VALIDATE_DEPENDENCIES sounds OK to me.

@dabarrell dabarrell marked this pull request as ready for review July 3, 2025 05:49
@dabarrell dabarrell requested a review from moskyb July 3, 2025 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants