Skip to content

Fix import into a pulp instance that never saw the content - #2608

Merged
mdellweg merged 1 commit into
pulp:mainfrom
vycius:fix-export-import-fresh-instance
Oct 7, 2026
Merged

mdellweg merged 1 commit into
pulp:mainfrom
vycius:fix-export-import-fresh-instance

Conversation

@vycius

@vycius vycius commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Importing an export into an empty target (a second instance or a fresh domain) failed and could corrupt other domains:

  • avatar_sha256=None was coerced to "" by the default CharWidget on import, tripping the metadata_sha256 digest check and failing the whole import. Declare the field with CharWidget(allow_blank=False).
  • Namespace, collection and deprecation rows were matched and looked up without regard to the target domain, hijacking rows from other domains. Scope import_id_fields and before_import_row lookups with the current domain.

Adds a functional test importing an export into a freshly created domain, which is equivalent to a second, empty pulp instance.

closes #2609

📜 Checklist

  • Commits are cleanly separated with meaningful messages (simple features and bug fixes should be squashed to one commit)
  • A changelog entry or entries has been added for any significant changes
  • Follows the Pulp policy on AI Usage
  • (For new features) - User documentation and test coverage has been added

@dralley

dralley commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

@vycius Could you rebase please?

Importing an export into an empty target (a second instance or a fresh
domain) failed and could corrupt other domains:

- avatar_sha256=None was coerced to "" by the default CharWidget on
  import, tripping the metadata_sha256 digest check and failing the
  whole import. Declare the field with CharWidget(allow_blank=False).
- Namespace, collection and deprecation rows were matched and looked up
  without regard to the target domain, hijacking rows from other
  domains. Scope import_id_fields and before_import_row lookups with
  the current domain.

Adds a functional test importing an export into a freshly created
domain, which is equivalent to a second, empty pulp instance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vycius
vycius force-pushed the fix-export-import-fresh-instance branch from 4d3f2e2 to 879f560 Compare September 24, 2026 18:01
@vycius

vycius commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@vycius Could you rebase please?

Rebased on newest main.

@mdellweg
mdellweg merged commit ed628ed into pulp:main Oct 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot import an exported ansible repository into a new Pulp instance

3 participants