diff --git a/Gemfile b/Gemfile index f346bdfac70822ace25bd3b65d194de1bc84d459..9a23c4f7d11d08bcc83d5bea281fae38c64f11bb 100644 --- a/Gemfile +++ b/Gemfile @@ -464,9 +464,9 @@ end # Gitaly GRPC protocol definitions gem 'gitaly', '~> 13.3.0-rc1' -gem 'grpc', '~> 1.24.0' +gem 'grpc', '~> 1.30.2' -gem 'google-protobuf', '~> 3.8.0' +gem 'google-protobuf', '~> 3.12' gem 'toml-rb', '~> 1.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 5f4f5252f5a0e8914b634b79cd4f32ef2e49f47b..257cfb6b52c89225f522da935c218cbeb16ca808 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -450,9 +450,9 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.0) signet (~> 0.12) - google-protobuf (3.8.0) - googleapis-common-protos-types (1.0.4) - google-protobuf (~> 3.0) + google-protobuf (3.12.4) + googleapis-common-protos-types (1.0.5) + google-protobuf (~> 3.11) googleauth (0.12.0) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) @@ -491,8 +491,8 @@ GEM graphql (~> 1.6) html-pipeline (~> 2.8) sass (~> 3.4) - grpc (1.24.0) - google-protobuf (~> 3.8) + grpc (1.30.2) + google-protobuf (~> 3.12) googleapis-common-protos-types (~> 1.0) gssapi (1.2.0) ffi (>= 1.0.1) @@ -1278,7 +1278,7 @@ DEPENDENCIES gitlab_omniauth-ldap (~> 2.1.1) gon (~> 6.2) google-api-client (~> 0.33) - google-protobuf (~> 3.8.0) + google-protobuf (~> 3.12) gpgme (~> 2.0.19) grape (= 1.4.0) grape-entity (~> 0.7.1) @@ -1287,7 +1287,7 @@ DEPENDENCIES graphiql-rails (~> 1.4.10) graphql (~> 1.10.5) graphql-docs (~> 1.6.0) - grpc (~> 1.24.0) + grpc (~> 1.30.2) gssapi guard-rspec haml_lint (~> 0.34.0) diff --git a/ee/spec/services/merge_trains/create_pipeline_service_spec.rb b/ee/spec/services/merge_trains/create_pipeline_service_spec.rb index f28d5f8e13c30b79a4a5f1ec31c050a7618a2924..a012acaf2932442728bf50749e26010dc96852bd 100644 --- a/ee/spec/services/merge_trains/create_pipeline_service_spec.rb +++ b/ee/spec/services/merge_trains/create_pipeline_service_spec.rb @@ -30,7 +30,7 @@ specify do expect(subject[:status]).to eq(:error) - expect(subject[:message]).to eq(expected_reason) + expect(subject[:message]).to match(/^#{expected_reason}/) end end diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index b69930b447cc2ab86d28334ad90cb72c9e879d78..b7ce1eba3f9ca8f2ea666d7f6049c1154ba394b4 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -117,7 +117,7 @@ def gitaly_payload(action) return unless %w[git-receive-pack git-upload-pack git-upload-archive].include?(action) { - repository: repository.gitaly_repository, + repository: repository.gitaly_repository.to_h, address: Gitlab::GitalyClient.address(repository.shard), token: Gitlab::GitalyClient.token(repository.shard), features: Feature::Gitaly.server_feature_flags diff --git a/lib/gitlab/diff/stats_cache.rb b/lib/gitlab/diff/stats_cache.rb index a918fc0820164ce6a1e183ac777ad9853e01f119..eb0ef4200dcd5ce227876dd7f9d8e410dda7d135 100644 --- a/lib/gitlab/diff/stats_cache.rb +++ b/lib/gitlab/diff/stats_cache.rb @@ -29,7 +29,7 @@ def write_if_empty(stats) return if cache.exist?(key) return unless stats - cache.write(key, stats.as_json, expires_in: EXPIRATION) + cache.write(key, stats.map(&:to_h).as_json, expires_in: EXPIRATION) clear_memoization(:cached_values) end diff --git a/spec/graphql/mutations/commits/create_spec.rb b/spec/graphql/mutations/commits/create_spec.rb index bb0b8c577b0935ecbd6f013122fa0becfba9f92a..fb1baafe7bd4d4bde171e534515d49e7d177bf23 100644 --- a/spec/graphql/mutations/commits/create_spec.rb +++ b/spec/graphql/mutations/commits/create_spec.rb @@ -147,7 +147,7 @@ it 'returns errors' do expect(mutated_commit).to be_nil - expect(subject[:errors]).to eq(['3:UserCommitFiles: empty CommitMessage']) + expect(subject[:errors].to_s).to match(/3:UserCommitFiles: empty CommitMessage/) end end diff --git a/spec/lib/gitlab/diff/stats_cache_spec.rb b/spec/lib/gitlab/diff/stats_cache_spec.rb index 451fd52c084ed97f7b10ef4483d7987b7af5f50c..5b01c1913bf3098e86a79d5061a6200a4bdf51ba 100644 --- a/spec/lib/gitlab/diff/stats_cache_spec.rb +++ b/spec/lib/gitlab/diff/stats_cache_spec.rb @@ -9,6 +9,7 @@ let(:cachable_key) { 'cachecachecache' } let(:stat) { Gitaly::DiffStats.new(path: 'temp', additions: 10, deletions: 15) } let(:stats) { Gitlab::Git::DiffStatsCollection.new([stat]) } + let(:serialized_stats) { stats.map(&:to_h).as_json } let(:cache) { Rails.cache } describe '#read' do @@ -38,7 +39,7 @@ it 'writes the stats' do expect(cache) .to receive(:write) - .with(key, stats.as_json, expires_in: described_class::EXPIRATION) + .with(key, serialized_stats, expires_in: described_class::EXPIRATION) .and_call_original stats_cache.write_if_empty(stats) @@ -53,7 +54,7 @@ it 'writes the stats' do expect(cache) .to receive(:write) - .with(key, stats.as_json, expires_in: described_class::EXPIRATION) + .with(key, serialized_stats, expires_in: described_class::EXPIRATION) .and_call_original stats_cache.write_if_empty(stats)