Pulpcore import check should fail if the import and export versions dont match
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 598
- Forks
- 168
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 86
Description
Version
Please provide the versions of the pulpcore and plugin packages in use, and how they are installed. If you are using Pulp via Katello, please provide the Katello version.
Katello: 4.1 and above
pulpcore 3.14 and above
Describe the bug
Pulp importer has an api endpoint to check if the content is importable indeed (throws errors like permission checks, checksum not matching etc.) See https://docs.pulpproject.org/pulpcore/restapi.html#tag/Importers:-Pulp-Import-Check
However this call does not fail if the pulp versions in the toc don't match the pulpcore running on the system. This error is displayed only when the Import operation is happening
To Reproduce
Steps to reproduce the behavior:
- Make sure the pulpcore versions dont match for the import and export satellites.
- Have a synced repository.
- Generate an export dump
- copy the dump to an importable locaion
- run
https://pulp/pulp/api/v3/importers/core/pulp/import-check/with toc pointing to the dump - Notice no errors are displayed.
Expected behavior
The export and import versions are mismatched.
This entire logic must run in the import call.
https://github.com/pulp/pulpcore/blob/main/pulpcore/app/tasks/importer.py#L93-L118
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pulpcore/app/tasks/importer.py lines 93-118 and the documented import-check endpoint. Reproduce the check with mismatched export and import versions, then verify that it reports “The export and import versions are mismatched” before the import proceeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100