Do no treat non-VCS test components as updatable
All threads resolved!
All threads resolved!
Compare changes
There are no changes yet
No changes between version 2 and version 1
Exit early in setting up the test environment for non-VCS test components.
openbao
is such an example. This component uses
the gitlab:secrets_management:openbao:download_or_clone
Rake task
that downloads the openbao
binary without
setting up the GIT repository in tmp/tests/openbao
.
When the test environment is being set up,
the test helper calls component_timed_setup
which invokes
the GIT binary with the following arguments:
git -C tmp/tests/openbao merge-base --is-ancestor <COMMIT_SHA> HEAD
Due to the design of GIT, it traverses all directories
until it finds the .git
directory against which it can execute
the command mentioned above. In our case, the GIT reaches
the GitLab repository, which might be slow to respond.
It was reported by team members that this patch reduces the setup time from 2+ minutes to 2 seconds depending on the GIT repo status:
Before: Test environment set up in 160.159391346 seconds
After: Test environment set up in 2.480034855 seconds
N/A
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Not required
Numbered steps to set up and validate the change are strongly suggested.
No changes between version 2 and version 1