Skip to content

Conversation

@DrJosh9000
Copy link
Contributor

Description

If BUILDKITE_PLUGINS_ALWAYS_CLONE_FRESH is enabled via pipeline or step env, the agent should continue to respect that, rather than overriding with a config option that defaults to false. If the option is set to true, then any other value will still be overridden.

Context

Fixes #3643

https://linear.app/buildkite/issue/PS-1503

Changes

Per the description.

Testing

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

Disclosures / Credits

I did not use AI tools at all

// Allow BUILDKITE_PLUGINS_ALWAYS_CLONE_FRESH to be enabled either by config
// or by pipeline/step env.
if r.conf.AgentConfiguration.PluginsAlwaysCloneFresh {
setEnv("BUILDKITE_PLUGINS_ALWAYS_CLONE_FRESH", "true")
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we need a setEnvOnlyTrue function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe! Such a cleanup can probably go in another PR.

@DrJosh9000 DrJosh9000 merged commit 3f1e856 into main Dec 17, 2025
2 checks passed
@DrJosh9000 DrJosh9000 deleted the ps-1503-buildkite_plugins_always_clone_fresh branch December 17, 2025 04:36
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.

BUILDKITE_PLUGINS_ALWAYS_CLONE_FRESH no longer respected in recent agent versions

3 participants