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

git-mirrors promoted from experiment, enabled by git-mirrors-path #1272

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pda
Copy link
Member

@pda pda commented Aug 20, 2020

This draft pull request promotes the git-mirrors functionality from experiment to standard.
It still requires git-mirrors-path to be configured, otherwise it remains disabled. This makes it pretty safe to promote from experiment status, with a few caveats below.

elastic-ci-stack-for-aws consideration

Note that elastic-ci-stack-for-aws prior to buildkite/elastic-ci-stack-for-aws#698 does provide a git-mirrors-path even when the stack chooses not to enable the experiment. That means shipping this PR could result in surprising/disruptive behaviour if it's used in an elastic-stack prior to that PR merged.

test coverage

This PR regrettably removes test coverage for git-mirrors, because that coverage was being driven externally via TEST_EXPERIMENTS:

if exp := os.Getenv(`TEST_EXPERIMENT`); exp != "" {

… as well as special handling in BootstrapTester:

if experiments.IsEnabled(`git-mirrors`) {
gitMirrorsDir, err := ioutil.TempDir("", "bootstrap-git-mirrors")
if err != nil {
return nil, err
}
bt.GitMirrorsDir = gitMirrorsDir
bt.Env = append(bt.Env, "BUILDKITE_GIT_MIRRORS_PATH="+gitMirrorsDir)
}

… and a special CI test entrypoint:

echo '+++ Running integration tests for git-mirrors experiment'
TEST_EXPERIMENT=git-mirrors gotestsum --junitfile "junit-${OSTYPE}-git-mirrors.xml" -- -count=1 -failfast ./bootstrap/integration

I think this PR should add some test coverage back in, but via a dedicated test which sets up a git-mirror-path at at least traverses the happy path of the code.

Base automatically changed from master to main February 1, 2021 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants