Open parthaa opened 2 years ago
I'm going to leave this as an issue, rather than feature - but I will point out that the current REST API does exactly what it was asked for and documented, as described here in the initial ticket : https://pulp.plan.io/issues/7549 . This request makes sense, but it's a new requirement, not a bug.
versions.json is contained inside the .tar.gz export-file. This means that implementing this requires at best opening the tarfile and extracting versions.json. At worst, it requires us to reassemble the tarfile, if it is in chunks, validating along the way.
The implication here is that this request can't be met in a way that preserves the non-intrusive nature of the /import-check/
API. I don't see a way clear to implementing this request, in a way that preserves the desired characteristics of /import-check/
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:
https://pulp/pulp/api/v3/importers/core/pulp/import-check/
with toc pointing to the dumpExpected 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