gitaly setup always happens
Overview
When running specs (with spring) the gitaly setup always happens
==> Setting up Gitaly...
Gitaly set up in 18.983991 seconds...
This feels like a regression in GitLab Development Kit. Previously gitaly setup was done once and then we were able to re-use this.
Note: Not sure if this is GDK or GitLab
/cc @seanarnold @nolith @aevstifeev @ashmckenzie
Reproduction
You can see how the setup process works when specs run several times (ss
is my alias for bundle exec spring rspec
). You can see GitLab Elasticsearch Indexer only runs setup once, but not Gitaly
tkgl:gitlab tkuah$ ss spec/models/abuse_report_spec.rb
[TEST PROF INFO] Spring detected
Running via Spring preloader in process 42008
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
==> Setting up Gitaly...
Gitaly set up in 25.519745 seconds...
==> Setting up GitLab Elasticsearch Indexer...
GitLab Elasticsearch Indexer set up in 22.510935 seconds...
............
Finished in 52.88 seconds (files took 2.53 seconds to load)
12 examples, 0 failures
tkgl:gitlab tkuah$ ss spec/models/abuse_report_spec.rb
Running via Spring preloader in process 42230
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
==> Setting up Gitaly...
Gitaly set up in 19.270493 seconds...
............
Finished in 23.66 seconds (files took 2.43 seconds to load)
12 examples, 0 failures
tkgl:gitlab tkuah$ ss spec/models/abuse_report_spec.rb
Running via Spring preloader in process 42356
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
==> Setting up Gitaly...
Gitaly set up in 21.117274 seconds...
............
Finished in 25.54 seconds (files took 2.34 seconds to load)
12 examples, 0 failures
Workaround
After you have setup Gitaly once, run the following command to force the version to match
cat GITALY_SERVER_VERSION > tmp/tests/gitaly/VERSION
Edited by Thong Kuah