summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-21 09:06:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-21 09:06:22 +0000
commit6791eefead979110cc773720daee6e58c56483d9 (patch)
tree44a167ee57b1314481da4b73c4823875e64124e3
parent8e39b3a3afb6b01ce57819cb2cad5672ba88500e (diff)
downloadgitlab-ce-6791eefead979110cc773720daee6e58c56483d9.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--doc/administration/gitaly/index.md5
-rw-r--r--lib/gitlab/git/commit.rb4
-rw-r--r--lib/gitlab/gitaly_client/commit_service.rb19
-rw-r--r--scripts/review_apps/base-config.yaml4
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb18
-rw-r--r--spec/mailers/abuse_report_mailer_spec.rb2
-rw-r--r--spec/mailers/emails/merge_requests_spec.rb2
-rw-r--r--spec/mailers/emails/pages_domains_spec.rb2
-rw-r--r--spec/mailers/emails/profile_spec.rb2
-rw-r--r--spec/mailers/notify_spec.rb2
-rw-r--r--spec/mailers/repository_check_mailer_spec.rb2
11 files changed, 23 insertions, 39 deletions
diff --git a/doc/administration/gitaly/index.md b/doc/administration/gitaly/index.md
index d5749427f6e..5037e5034c8 100644
--- a/doc/administration/gitaly/index.md
+++ b/doc/administration/gitaly/index.md
@@ -222,6 +222,11 @@ Check the directory layout on your Gitaly server to be sure.
[auth]
token = 'abc123secret'
+
+ [logging]
+ format = 'json'
+ level = 'info'
+ dir = '/var/log/gitaly'
```
1. Append the following to `/home/git/gitaly/config.toml` for each respective server:
diff --git a/lib/gitlab/git/commit.rb b/lib/gitlab/git/commit.rb
index 8fac3621df9..6210223917b 100644
--- a/lib/gitlab/git/commit.rb
+++ b/lib/gitlab/git/commit.rb
@@ -155,10 +155,6 @@ module Gitlab
end
end
- def extract_signature(repository, commit_id)
- repository.gitaly_commit_client.extract_signature(commit_id)
- end
-
def extract_signature_lazily(repository, commit_id)
BatchLoader.for(commit_id).batch(key: repository) do |commit_ids, loader, args|
batch_signature_extraction(args[:key], commit_ids).each do |commit_id, signature_data|
diff --git a/lib/gitlab/gitaly_client/commit_service.rb b/lib/gitlab/gitaly_client/commit_service.rb
index b0559729ff3..dca55091be6 100644
--- a/lib/gitlab/gitaly_client/commit_service.rb
+++ b/lib/gitlab/gitaly_client/commit_service.rb
@@ -348,25 +348,6 @@ module Gitlab
end
end
- def extract_signature(commit_id)
- request = Gitaly::ExtractCommitSignatureRequest.new(repository: @gitaly_repo, commit_id: commit_id)
- response = GitalyClient.call(@repository.storage, :commit_service, :extract_commit_signature, request, timeout: GitalyClient.fast_timeout)
-
- signature = +''.b
- signed_text = +''.b
-
- response.each do |message|
- signature << message.signature
- signed_text << message.signed_text
- end
-
- return if signature.blank? && signed_text.blank?
-
- [signature, signed_text]
- rescue GRPC::InvalidArgument => ex
- raise ArgumentError, ex
- end
-
def get_commit_signatures(commit_ids)
request = Gitaly::GetCommitSignaturesRequest.new(repository: @gitaly_repo, commit_ids: commit_ids)
response = GitalyClient.call(@repository.storage, :commit_service, :get_commit_signatures, request, timeout: GitalyClient.fast_timeout)
diff --git a/scripts/review_apps/base-config.yaml b/scripts/review_apps/base-config.yaml
index 573a5ccde11..ef5e2719fca 100644
--- a/scripts/review_apps/base-config.yaml
+++ b/scripts/review_apps/base-config.yaml
@@ -75,10 +75,10 @@ gitlab:
workhorse:
resources:
requests:
- cpu: 175m
+ cpu: 300m
memory: 100M
limits:
- cpu: 350m
+ cpu: 600m
memory: 200M
readinessProbe:
initialDelaySeconds: 5 # Default is 0
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 23651e3d7f2..cdab7127748 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -428,7 +428,9 @@ describe Gitlab::Git::Commit, :seed_helper do
end
end
- shared_examples 'extracting commit signature' do
+ describe '.extract_signature_lazily' do
+ subject { described_class.extract_signature_lazily(repository, commit_id).itself }
+
context 'when the commit is signed' do
let(:commit_id) { '0b4bc9a49b562e85de7cc9e834518ea6828729b9' }
@@ -492,10 +494,8 @@ describe Gitlab::Git::Commit, :seed_helper do
expect { subject }.to raise_error(ArgumentError)
end
end
- end
- describe '.extract_signature_lazily' do
- describe 'loading signatures in batch once' do
+ context 'when loading signatures in batch once' do
it 'fetches signatures in batch once' do
commit_ids = %w[0b4bc9a49b562e85de7cc9e834518ea6828729b9 4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6]
signatures = commit_ids.map do |commit_id|
@@ -516,16 +516,6 @@ describe Gitlab::Git::Commit, :seed_helper do
2.times { signatures.each(&:itself) }
end
end
-
- subject { described_class.extract_signature_lazily(repository, commit_id).itself }
-
- it_behaves_like 'extracting commit signature'
- end
-
- describe '.extract_signature' do
- subject { described_class.extract_signature(repository, commit_id) }
-
- it_behaves_like 'extracting commit signature'
end
end
diff --git a/spec/mailers/abuse_report_mailer_spec.rb b/spec/mailers/abuse_report_mailer_spec.rb
index 86153071cd3..fcbffb52849 100644
--- a/spec/mailers/abuse_report_mailer_spec.rb
+++ b/spec/mailers/abuse_report_mailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe AbuseReportMailer do
diff --git a/spec/mailers/emails/merge_requests_spec.rb b/spec/mailers/emails/merge_requests_spec.rb
index 2ad572bb5c7..541acc47172 100644
--- a/spec/mailers/emails/merge_requests_spec.rb
+++ b/spec/mailers/emails/merge_requests_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
require 'email_spec'
diff --git a/spec/mailers/emails/pages_domains_spec.rb b/spec/mailers/emails/pages_domains_spec.rb
index c52e3c2191d..e360e38256e 100644
--- a/spec/mailers/emails/pages_domains_spec.rb
+++ b/spec/mailers/emails/pages_domains_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
require 'email_spec'
diff --git a/spec/mailers/emails/profile_spec.rb b/spec/mailers/emails/profile_spec.rb
index 1f7be415e35..d340f207dc7 100644
--- a/spec/mailers/emails/profile_spec.rb
+++ b/spec/mailers/emails/profile_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
require 'email_spec'
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 1991bac0229..cafb96898b3 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
require 'email_spec'
diff --git a/spec/mailers/repository_check_mailer_spec.rb b/spec/mailers/repository_check_mailer_spec.rb
index 757d3dfa797..1fd4d28ca53 100644
--- a/spec/mailers/repository_check_mailer_spec.rb
+++ b/spec/mailers/repository_check_mailer_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe RepositoryCheckMailer do