Skip to content

Fix gitaly bundle install flags

Albert requested to merge alberts-keep-gitaly-bundle-path into master

What does this MR do?

Fixes long running Gitaly set up during test. Saves about 68% of the set up time.

tmp/tests/gitaly is deleted and recreated each time gitaly is set up.

The root cause is that bundle install in tmp/tests/gitaly/ruby was installing with BUNDLE_DEPLOYMENT: true, which defaults to installing gems in vendor/bundle instead of $GEM_HOME.

Before:

==> Setting up Gitaly...
    Gitaly set up in 439.994758 seconds..

After:

==> Setting up Gitaly...
    Gitaly set up in 140.915383 seconds...

Steps to test

  1. Delete test gitaly rm -rf tmp/tests/gitaly
  2. Run any rspec test, which will set up fresh gitaly and uses gems from GEM_HOME
  3. Verify there is no gems installed in tmp/tests/gitaly/ruby/vendor/bundle
  4. Simulate outdated gitaly by hard resetting to older commit cd tmp/tests/gitaly && git reset HEAD~1 --hard
  5. Run rspec test again, which will set up gitaly, but does not reinstall gems.
  6. Verify there is no gems installed in tmp/tests/gitaly/ruby/vendor/bundle
Edited by Albert

Merge request reports

Loading