Ruby 3 failures in spec/services/protected_branches/cache_service_spec.rb
Failing job: https://gitlab.com/gitlab-org/gitlab/-/jobs/2967128654
1st Try error in ./spec/services/protected_branches/cache_service_spec.rb:74:
#<Gitlab::AppLogger (class)> received :error with unexpected arguments
expected: ({"class"=>"ProtectedBranches::CacheService", "message"=>/Cache mismatch/, "project_id"=>1451, "project_path"=>"namespace1/project1"})
got: ({"class"=>"ProtectedBranches::CacheService", "message"=>"Cache mismatch 'main': cached value: true, real value: false", "project_id"=>1451, "project_path"=>"namespace1/project1"})
Diff:
@@ -1,5 +1,5 @@
[{"class"=>"ProtectedBranches::CacheService",
- "message"=>/Cache mismatch/,
+ "message"=>"Cache mismatch 'main': cached value: true, real value: false",
"project_id"=>1451,
"project_path"=>"namespace1/project1"}]
RSpec::Retry: 2nd try ./spec/services/protected_branches/cache_service_spec.rb:74
2nd Try error in ./spec/services/protected_branches/cache_service_spec.rb:74:
#<Gitlab::AppLogger (class)> received :error with unexpected arguments
expected: ({"class"=>"ProtectedBranches::CacheService", "message"=>/Cache mismatch/, "project_id"=>1451, "project_path"=>"namespace1/project1"})
got: ({"class"=>"ProtectedBranches::CacheService", "message"=>"Cache mismatch 'main': cached value: true, real value: false", "project_id"=>1451, "project_path"=>"namespace1/project1"})
Diff:
@@ -1,5 +1,5 @@
[{"class"=>"ProtectedBranches::CacheService",
- "message"=>/Cache mismatch/,
+ "message"=>"Cache mismatch 'main': cached value: true, real value: false",
"project_id"=>1451,
"project_path"=>"namespace1/project1"}]
RSpec::Retry: 3rd try ./spec/services/protected_branches/cache_service_spec.rb:74
3rd Try error in ./spec/services/protected_branches/cache_service_spec.rb:74:
#<Gitlab::AppLogger (class)> received :error with unexpected arguments
expected: ({"class"=>"ProtectedBranches::CacheService", "message"=>/Cache mismatch/, "project_id"=>1451, "project_path"=>"namespace1/project1"})
got: ({"class"=>"ProtectedBranches::CacheService", "message"=>"Cache mismatch 'main': cached value: true, real value: false", "project_id"=>1451, "project_path"=>"namespace1/project1"})
Diff:
@@ -1,5 +1,5 @@
[{"class"=>"ProtectedBranches::CacheService",
- "message"=>/Cache mismatch/,
+ "message"=>"Cache mismatch 'main': cached value: true, real value: false",
"project_id"=>1451,
"project_path"=>"namespace1/project1"}]
RSpec::Retry: 4th try ./spec/services/protected_branches/cache_service_spec.rb:74
Failures:
1) ProtectedBranches::CacheService#fetch when dry_run is on when cache mismatch logs an error
Failure/Error: Gitlab::AppLogger.error message
#<Gitlab::AppLogger (class)> received :error with unexpected arguments
expected: ({"class"=>"ProtectedBranches::CacheService", "message"=>/Cache mismatch/, "project_id"=>1451, "project_path"=>"namespace1/project1"})
got: ({"class"=>"ProtectedBranches::CacheService", "message"=>"Cache mismatch 'main': cached value: true, real value: false", "project_id"=>1451, "project_path"=>"namespace1/project1"})
Diff:
@@ -1,5 +1,5 @@
[{"class"=>"ProtectedBranches::CacheService",
- "message"=>/Cache mismatch/,
+ "message"=>"Cache mismatch 'main': cached value: true, real value: false",
"project_id"=>1451,
"project_path"=>"namespace1/project1"}]
# ./app/services/concerns/base_service_utility.rb:32:in `log_error'
# ./app/services/protected_branches/cache_service.rb:56:in `check_and_log_discrepancy'
# ./app/services/protected_branches/cache_service.rb:25:in `block in fetch'
# ./lib/gitlab/redis/wrapper.rb:23:in `block in with'
# ./lib/gitlab/redis/wrapper.rb:23:in `with'
# ./app/services/protected_branches/cache_service.rb:13:in `fetch'
# ./spec/services/protected_branches/cache_service_spec.rb:84:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:441:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:432:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:428:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:56:in `with_raw_context'
# ./spec/spec_helper.rb:428:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:265:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/redis.rb:13:in `block (2 levels) in <main>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <main>'
Finished in 2.78 seconds (files took 37.89 seconds to load)
1 example, 1 failure
Failed examples:
rspec ./spec/services/protected_branches/cache_service_spec.rb:74 # ProtectedBranches::CacheService#fetch when dry_run is on when cache mismatch logs an error
Edited by Roy Zwambag