Master failure: spec/lib/gitlab/gpg_spec.rb:145
Job #864932909 failed for e1d7aca7:
Failures:
1) Gitlab::Gpg.using_tmp_keychain keeps track of created and removed keychains in counters
Failure/Error: expect(created.get).to eq(initial_created + 1)
expected: 14.0
got: 13.0
(compared using ==)
# ./spec/lib/gitlab/gpg_spec.rb:153:in `block (4 levels) in <top (required)>'
# ./lib/gitlab/gpg.rb:103:in `optimistic_using_tmp_keychain'
# ./lib/gitlab/gpg.rb:82:in `block (2 levels) in using_tmp_keychain'
# ./lib/gitlab/gpg.rb:81:in `synchronize'
# ./lib/gitlab/gpg.rb:81:in `block in using_tmp_keychain'
# ./lib/gitlab/gpg.rb:80:in `using_tmp_keychain'
# ./spec/lib/gitlab/gpg_spec.rb:152:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:351:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:342:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:338:in `block (3 levels) in <top (required)>'
# ./spec/spec_helper.rb:338:in `block (2 levels) in <top (required)>'
Minimal repoduction:
bundle exec spring rspec -f d spec/services/git/branch_hooks_service_spec.rb:227 spec/services/metrics/dashboard/custom_dashboard_service_spec.rb:35 spec/lib/gitlab/gpg_spec.rb:155
- spec/services/git/branch_hooks_service_spec.rb:227 calls Gpg.using_tmp_keychain somewhere which memoizes the class level instance variable
:@tmp_keychains_created
- spec/services/metrics/dashboard/custom_dashboard_service_spec.rb:35 destroys Prometheus DB files with the
:prometheus
annotation - spec/lib/gitlab/gpg_spec.rb:155 then tries to query a new Prometheus counter, which has no increments. The increments happen instead in the counter stored inside the memoized class instance variable.
Edited by Thong Kuah