diff options
author | charlieablett <cablett@gitlab.com> | 2019-06-19 14:37:54 +0200 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-07-03 22:53:13 +1200 |
commit | c99c30fdd6f3adf4fb29aad4b10e265be69d2d67 (patch) | |
tree | 909c4ce21faa42381f22188590ba3e84cd2344c9 | |
parent | 8b809837f44bbebdac65eebadb09a45fb60c6a65 (diff) | |
download | gitlab-ce-c99c30fdd6f3adf4fb29aad4b10e265be69d2d67.tar.gz |
Remove potentially noisy warning
- If Gitaly calls are missing, it could be due to a conditional and
may just become noise
-rw-r--r-- | app/graphql/types/base_field.rb | 2 | ||||
-rw-r--r-- | spec/graphql/types/base_field_spec.rb | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/app/graphql/types/base_field.rb b/app/graphql/types/base_field.rb index ee23146f711..95db116d6f9 100644 --- a/app/graphql/types/base_field.rb +++ b/app/graphql/types/base_field.rb @@ -60,8 +60,6 @@ module Types # involved with the request. if @calls_gitaly && Gitlab::GitalyClient.get_request_count == 0 raise "Gitaly is called for field '#{name}' - please add `calls_gitaly: true` to the field declaration" - elsif !@calls_gitaly && Gitlab::GitalyClient.get_request_count > 0 - raise "Gitaly not called for field '#{name}' - please remove `calls_gitaly: true` from the field declaration" end rescue => e Gitlab::Sentry.track_exception(e) diff --git a/spec/graphql/types/base_field_spec.rb b/spec/graphql/types/base_field_spec.rb index ebdfa3eaf4d..d7360872508 100644 --- a/spec/graphql/types/base_field_spec.rb +++ b/spec/graphql/types/base_field_spec.rb @@ -127,10 +127,6 @@ describe Types::BaseField do it 'does not raise an error if calls_gitaly is true' do expect { gitaly_field.send(:calls_gitaly_check) }.not_to raise_error end - - it 'raises an error if calls_gitaly is not decalared' do - expect { no_gitaly_field.send(:calls_gitaly_check) }.to raise_error(/please remove `calls_gitaly: true`/) - end end end end |