Commit c99c30fd authored by charlieablett's avatar charlieablett

Remove potentially noisy warning

- If Gitaly calls are missing, it could be due to a conditional and
may just become noise
parent 8b809837
...@@ -60,8 +60,6 @@ module Types ...@@ -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 ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment