Remove potentially noisy warning
- If Gitaly calls are missing, it could be due to a conditional and may just become noise
This commit is contained in:
parent
8b809837f4
commit
c99c30fdd6
2 changed files with 0 additions and 6 deletions
|
@ -60,8 +60,6 @@ module Types
|
||||||
# involved with the request.
|
# involved with the request.
|
||||||
if @calls_gitaly && Gitlab::GitalyClient.get_request_count == 0
|
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"
|
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
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
Gitlab::Sentry.track_exception(e)
|
Gitlab::Sentry.track_exception(e)
|
||||||
|
|
|
@ -127,10 +127,6 @@ describe Types::BaseField do
|
||||||
it 'does not raise an error if calls_gitaly is true' do
|
it 'does not raise an error if calls_gitaly is true' do
|
||||||
expect { gitaly_field.send(:calls_gitaly_check) }.not_to raise_error
|
expect { gitaly_field.send(:calls_gitaly_check) }.not_to raise_error
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue