Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set git-mirrors-path when EnableAgentGitMirrorsExperiment #698

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

pda
Copy link
Member

@pda pda commented Aug 18, 2020

We currently set git-mirrors-path even when EnableAgentGitMirrorsExperiment is false. That would lead to unexpected activation of the feature if a newer version of https://github.com/buildkite/agent promotes git-mirrors from experiment status.

This patch configures git-mirrors-path as an empty string unless EnableAgentGitMirrorsExperiment is true.

If/when buildkite-agent promotes git-mirrors from experimental, the
presence of git-mirrors-path will enable the feature. We currently set
git-mirrors-path even when EnableAgentGitMirrorsExperiment is false,
which would lead to unexpected activation of the feature.
@@ -86,7 +87,7 @@ timestamp-lines=${Env:BUILDKITE_AGENT_TIMESTAMP_LINES}
hooks-path="C:\buildkite-agent\hooks"
build-path="C:\buildkite-agent\builds"
plugins-path="C:\buildkite-agent\plugins"
git-mirrors-path="C:\buildkite-agent\git-mirrors"
git-mirrors-path="${Env:BUILDKITE_AGENT_GIT_MIRRORS_PATH}"
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know much Windows / PowerShell and was worried this might fail if the env wasn't set at all, which is the case when BUILDKITE_AGENT_ENABLE_GIT_MIRRORS_EXPERIMENT is false.

I've confirmed¹ that it results in git-mirrors-path="" in the Windows buildkite-agent.cfg file when that env var isn't present 👌🏼

¹ a decade of using AWS/EC2, and this is the first time I've ever connected to a windows instance 😬

@pda pda merged commit 5b2aadb into master Aug 19, 2020
@pda pda deleted the git-mirrors-path-empty-unless-enabled branch August 19, 2020 01:52
@pda
Copy link
Member Author

pda commented Aug 19, 2020

I've also cherry-picked this onto the v4-development branch as dccac50.

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.

1 participant