Resolve "TestEnv#set_repo_refs fails to update refs sometimes"
What does this MR do?
This merge request solves an error that would happen in development when a new branch/commit/ref was added to gitlab-test
but the bare repos under tmp/tests/gitlab-test_bare
/tmp/tests/gitlab-test-fork_bare
wouldn't get updated when git fetch
was run.
The bare repos are removed the first time TestEnv#set_repo_refs
fails, so that newly cloned bare repos have the correct refs.
Are there points in the code the reviewer needs to double check?
The branch will be profiled in Redash, in any case.
Why was this MR needed?
Because it was annoying to ask people to rm -rf tmp/tests
a few times per day! :)
What are the relevant issue numbers?
Closes #31562 (closed)
Merge request reports
Activity
added 98 commits
-
5989d91a...e3fa5275 - 95 commits from branch
master
- f8674ac3 - Factorize TestEvent#copy_repo
- 85777341 - If TestEnv#set_repo_refs fails, clean bare repos and retry once
- b716ef22 - Shorten the last two commit SHA, because CONSISTENCY
Toggle commit list-
5989d91a...e3fa5275 - 95 commits from branch
added 259 commits
-
b716ef22...17806d76 - 256 commits from branch
master
- 2a767003 - Factorize TestEvent#copy_repo
- 5adb1d98 - If TestEnv#set_repo_refs fails, clean test repos and retry
- 322c4481 - Shorten the last two commit SHA, because CONSISTENCY
Toggle commit list-
b716ef22...17806d76 - 256 commits from branch
added 23 commits
-
322c4481...bcc5135b - 20 commits from branch
master
- 5b228615 - Factorize TestEvent#copy_repo
- ac6c4af0 - If TestEnv#set_repo_refs fails, clean test repos and retry
- 590f5a69 - Shorten the last two commit SHA, because CONSISTENCY
Toggle commit list-
322c4481...bcc5135b - 20 commits from branch
@rspeicher I've implemented a simpler approach as the first MR for this issue: the test repos are removed and recreated if refs cannot be updated (this is done only once of course).
assigned to @rspeicher
@rymai Woops, I did the review backwards. Anyway, pending changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1905.
assigned to @rymai
added 66 commits
-
590f5a69...a5f06563 - 63 commits from branch
master
- eef0ff32 - Factorize TestEvent#copy_repo
- 21df200b - If TestEnv#set_repo_refs fails, clean test repos and retry
- 4f4167f0 - Shorten the last two commit SHA, because CONSISTENCY
Toggle commit list-
590f5a69...a5f06563 - 63 commits from branch
@rspeicher Should be better now, thanks!!
assigned to @rspeicher
enabled an automatic merge when the pipeline for 4f4167f0 succeeds
added 93 commits
-
4f4167f0...a67bb1f0 - 90 commits from branch
master
- 628cc848 - Factorize TestEvent#copy_repo
- 7e56ac8f - If TestEnv#set_repo_refs fails, clean test repos and retry
- ba441bb6 - Shorten the last two commit SHA, because CONSISTENCY
Toggle commit list-
4f4167f0...a67bb1f0 - 90 commits from branch
@rspeicher There was a Rubocop offense, I've also rebased!
@rymai Weird, why didn't the EE counterpart have the same offense?
mentioned in commit c9c4d537
mentioned in merge request !11939 (merged)