Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7db41ada
Commit
7db41ada
authored
Jan 25, 2022
by
Kassio Borges
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove export_reduce_relation_batch_size feature flag
Changelog: changed
parent
f43fcde5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
59 deletions
+12
-59
config/feature_flags/development/export_reduce_relation_batch_size.yml
...e_flags/development/export_reduce_relation_batch_size.yml
+0
-8
lib/gitlab/import_export/json/streaming_serializer.rb
lib/gitlab/import_export/json/streaming_serializer.rb
+2
-7
spec/lib/gitlab/import_export/json/streaming_serializer_spec.rb
...ib/gitlab/import_export/json/streaming_serializer_spec.rb
+2
-18
spec/lib/gitlab/import_export/legacy_relation_tree_saver_spec.rb
...b/gitlab/import_export/legacy_relation_tree_saver_spec.rb
+8
-26
No files found.
config/feature_flags/development/export_reduce_relation_batch_size.yml
deleted
100644 → 0
View file @
f43fcde5
---
name
:
export_reduce_relation_batch_size
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34057
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/282245
milestone
:
'
13.1'
type
:
development
group
:
group::import
default_enabled
:
false
lib/gitlab/import_export/json/streaming_serializer.rb
View file @
7db41ada
...
...
@@ -6,16 +6,11 @@ module Gitlab
class
StreamingSerializer
include
Gitlab
::
ImportExport
::
CommandLineUtil
BATCH_SIZE
=
100
SMALLER_BATCH_SIZE
=
2
BATCH_SIZE
=
2
def
self
.
batch_size
(
exportable
)
if
Feature
.
enabled?
(
:export_reduce_relation_batch_size
,
exportable
)
SMALLER_BATCH_SIZE
else
BATCH_SIZE
end
end
class
Raw
<
String
def
to_json
(
*
_args
)
...
...
spec/lib/gitlab/import_export/json/streaming_serializer_spec.rb
View file @
7db41ada
...
...
@@ -183,24 +183,8 @@ RSpec.describe Gitlab::ImportExport::Json::StreamingSerializer do
end
describe
'.batch_size'
do
context
'when export_reduce_relation_batch_size feature flag is enabled'
do
before
do
stub_feature_flags
(
export_reduce_relation_batch_size:
true
)
end
it
'returns 20'
do
expect
(
described_class
.
batch_size
(
exportable
)).
to
eq
(
described_class
::
SMALLER_BATCH_SIZE
)
end
end
context
'when export_reduce_relation_batch_size feature flag is disabled'
do
before
do
stub_feature_flags
(
export_reduce_relation_batch_size:
false
)
end
it
'returns default batch size'
do
expect
(
described_class
.
batch_size
(
exportable
)).
to
eq
(
described_class
::
BATCH_SIZE
)
end
end
end
end
spec/lib/gitlab/import_export/legacy_relation_tree_saver_spec.rb
View file @
7db41ada
...
...
@@ -8,13 +8,12 @@ RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do
let
(
:tree
)
{
{}
}
describe
'#serialize'
do
shared_examples
'FastHashSerializer with batch size'
do
|
batch_size
|
let
(
:serializer
)
{
instance_double
(
Gitlab
::
ImportExport
::
FastHashSerializer
)
}
it
'uses FastHashSerializer'
do
expect
(
Gitlab
::
ImportExport
::
FastHashSerializer
)
.
to
receive
(
:new
)
.
with
(
exportable
,
tree
,
batch_size:
batch_size
)
.
with
(
exportable
,
tree
,
batch_size:
Gitlab
::
ImportExport
::
Json
::
StreamingSerializer
::
BATCH_SIZE
)
.
and_return
(
serializer
)
expect
(
serializer
).
to
receive
(
:execute
)
...
...
@@ -22,21 +21,4 @@ RSpec.describe Gitlab::ImportExport::LegacyRelationTreeSaver do
relation_tree_saver
.
serialize
(
exportable
,
tree
)
end
end
context
'when export_reduce_relation_batch_size feature flag is enabled'
do
before
do
stub_feature_flags
(
export_reduce_relation_batch_size:
true
)
end
include_examples
'FastHashSerializer with batch size'
,
Gitlab
::
ImportExport
::
Json
::
StreamingSerializer
::
SMALLER_BATCH_SIZE
end
context
'when export_reduce_relation_batch_size feature flag is disabled'
do
before
do
stub_feature_flags
(
export_reduce_relation_batch_size:
false
)
end
include_examples
'FastHashSerializer with batch size'
,
Gitlab
::
ImportExport
::
Json
::
StreamingSerializer
::
BATCH_SIZE
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment