Allow adding custom metadata to exports #7036
Open
+41
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When exporting repositories from one Pulp instance and importing them on another, multiple exports may arrive simultaneously. It is currently difficult to identify key details (e.g., repository name, export type: full vs. incremental) without inspecting large tar files. This slows down automation and makes import order logic harder.
Closes #6712
Solution
This change introduces a new optional
metafield to the export serializer.This allows exporters/importers to embed identifying information (e.g., repo name, export type, author) directly in the TOC, making exports easier to classify and manage.
Example
Export request
TOC json
{ "meta": { "repositories": ["example/repository"], "author": "pulp", "checksum_type": "crc32", "chunk_size": 53687091200 }, "files": { "export-019a01ce-20251020_1328.tar.0000": "96903fec" } }Exporter list output
{ "params": { "full": true, "meta": { "repositories": [ "example/repository" ], "author": "pulp" }, }, "toc_info": { "file": "/export-019a01d7-20251020_1338-toc.json", "meta": { "repositories": [ "example/repository" ], "author": "pulp" }, "sha256": "49c9ea862f67efc04c4" } ... }