Commit 73126b0f authored by Sean Arnold's avatar Sean Arnold

Merge branch 'remove-json_limited_encoder' into 'master'

Remove json_limited_encoder feature flag

See merge request gitlab-org/gitlab!80627
parents 04ed5d64 28287bda
---
name: json_limited_encoder
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38687
rollout_issue_url:
milestone: '13.3'
type: development
group: group::source code
default_enabled: true
......@@ -248,8 +248,6 @@ module Gitlab
# @return [String]
# @raise [LimitExceeded] if the resulting json string is bigger than the specified limit
def self.encode(object, limit: 25.megabytes)
return ::Gitlab::Json.dump(object) unless Feature.enabled?(:json_limited_encoder, default_enabled: :yaml)
buffer = StringIO.new
buffer_size = 0
......
......@@ -440,15 +440,5 @@ RSpec.describe Gitlab::Json do
expect(subject.size).to eq(10001)
end
end
context 'when json_limited_encoder is disabled' do
let(:obj) { [{ test: true }] * 1000 }
it 'does not raise an error' do
stub_feature_flags(json_limited_encoder: false)
expect { subject }.not_to raise_error
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