Commit bd5aa2b6 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '216959-enable-project-ndjson-feature-flags' into 'master'

Enable project ndjson ff by default

Closes #216959

See merge request gitlab-org/gitlab!31601
parents ee31658d 1c2469f3
---
title: Use data-interchange format based on .ndjson for Project import and export.
merge_request: 31601
author:
type: performance
......@@ -35,9 +35,13 @@ describe Gitlab::ImportExport::Project::TreeSaver do
let_it_be(:exportable_path) { 'project' }
before_all do
Feature.enable(:project_export_as_ndjson) if ndjson_enabled
project.add_maintainer(user)
expect(project_tree_saver.save).to be true
RSpec::Mocks.with_temporary_scope do
allow(Feature).to receive(:enabled?) { true }
stub_feature_flags(project_export_as_ndjson: ndjson_enabled)
project.add_maintainer(user)
expect(project_tree_saver.save).to be true
end
end
let_it_be(:issue_json) { get_json(full_path, exportable_path, :issues, ndjson_enabled).first }
......
......@@ -54,7 +54,7 @@ module Gitlab
end
def ndjson_relation_reader
return unless Feature.enabled?(:project_import_ndjson, project.namespace)
return unless Feature.enabled?(:project_import_ndjson, project.namespace, default_enabled: true)
ImportExport::JSON::NdjsonReader.new(
File.join(shared.export_path, 'tree')
......
......@@ -54,7 +54,7 @@ module Gitlab
def json_writer
@json_writer ||= begin
if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace)
if ::Feature.enabled?(:project_export_as_ndjson, @project.namespace, default_enabled: true)
full_path = File.join(@shared.export_path, 'tree')
Gitlab::ImportExport::JSON::NdjsonWriter.new(full_path)
else
......
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