Skip to content
Snippets Groups Projects

Do no treat non-VCS test components as updatable

Merged Vitaly Slobodin requested to merge vs/test-env-check-component-is-vcs into master
All threads resolved!

What does this MR do and why?

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

References

N/A

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Not required

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Vitaly Slobodin

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Doug Stull resolved all threads

    resolved all threads

  • Doug Stull approved this merge request

    approved this merge request

  • Doug Stull enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • merged

  • Doug Stull mentioned in commit 2d48aab1

    mentioned in commit 2d48aab1

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading