Skip to content
Snippets Groups Projects
Commit a430cca9 authored by Patrick Bajao's avatar Patrick Bajao
Browse files

Merge branch 'rodrigo/358745-fix-project-attributes-pipeline-reenqueue' into 'master'

Fix ProjectAttributesPipeline re-enqueue in BulkImport

See merge request gitlab-org/gitlab!87580
parents b003ead8 b32b4770
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,7 +8,7 @@ module BulkImports
 
file_extraction_pipeline!
 
relation_name 'self'
relation_name BulkImports::FileTransfer::BaseConfig::SELF_RELATION
 
extractor ::BulkImports::Common::Extractors::JsonExtractor, relation: relation
 
Loading
Loading
Loading
Loading
@@ -8,6 +8,8 @@ module BulkImports
 
file_extraction_pipeline!
 
relation_name BulkImports::FileTransfer::BaseConfig::SELF_RELATION
transformer ::BulkImports::Common::Transformers::ProhibitedAttributesTransformer
 
def extract(_context)
Loading
Loading
@@ -57,7 +59,7 @@ module BulkImports
def download_service
@download_service ||= BulkImports::FileDownloadService.new(
configuration: context.configuration,
relative_url: context.entity.relation_download_url_path(BulkImports::FileTransfer::BaseConfig::SELF_RELATION),
relative_url: context.entity.relation_download_url_path(self.class.relation),
tmpdir: tmpdir,
filename: compressed_filename
)
Loading
Loading
@@ -72,7 +74,7 @@ module BulkImports
end
 
def filename
"#{BulkImports::FileTransfer::BaseConfig::SELF_RELATION}.json"
"#{self.class.relation}.json"
end
 
def json_decode(string)
Loading
Loading
Loading
Loading
@@ -73,4 +73,8 @@ RSpec.describe BulkImports::Groups::Pipelines::GroupAttributesPipeline do
pipeline.after_run(nil)
end
end
describe '.relation' do
it { expect(described_class.relation).to eq('self') }
end
end
Loading
Loading
@@ -176,4 +176,8 @@ RSpec.describe BulkImports::Projects::Pipelines::ProjectAttributesPipeline do
end
end
end
describe '.relation' do
it { expect(described_class.relation).to eq('self') }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment