Commit 8b8c2810 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'qmnguyen0711/group-sidekiq-exceed-limit-exceptions' into 'master'

Remove size information from the message of ExceedLimitError

See merge request gitlab-org/gitlab!61895
parents 947701c2 8c31a871
...@@ -13,7 +13,7 @@ module Gitlab ...@@ -13,7 +13,7 @@ module Gitlab
@size = size @size = size
@size_limit = size_limit @size_limit = size_limit
super "#{@worker_class} job exceeds payload size limit (#{size}/#{size_limit})" super "#{@worker_class} job exceeds payload size limit"
end end
def sentry_extra_data def sentry_extra_data
......
...@@ -22,7 +22,7 @@ RSpec.describe Gitlab::SidekiqMiddleware::SizeLimiter::ExceedLimitError do ...@@ -22,7 +22,7 @@ RSpec.describe Gitlab::SidekiqMiddleware::SizeLimiter::ExceedLimitError do
it 'encapsulates worker info' do it 'encapsulates worker info' do
exception = described_class.new(TestSizeLimiterWorker, 500, 300) exception = described_class.new(TestSizeLimiterWorker, 500, 300)
expect(exception.message).to eql("TestSizeLimiterWorker job exceeds payload size limit (500/300)") expect(exception.message).to eql("TestSizeLimiterWorker job exceeds payload size limit")
expect(exception.worker_class).to eql(TestSizeLimiterWorker) expect(exception.worker_class).to eql(TestSizeLimiterWorker)
expect(exception.size).to be(500) expect(exception.size).to be(500)
expect(exception.size_limit).to be(300) expect(exception.size_limit).to be(300)
......
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