-
Notifications
You must be signed in to change notification settings - Fork 102
OCPBUGS-73760: fix conversion issue for catalog #1338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This bug fix is to avoid the issue docker://registry.redhat.io/redhat/redhat-operator-index:v4.17 error: Manifest list must be converted to type "application/vnd.docker.distribution.manifest.list.v2+json" to be written to destination, but we cannot modify it: "Instructed to preserve digests" When a catalog image is filtered the digest is already different from the original catalog, so it is fine to allow convertions. Signed-off-by: Alex Guidi <aguidi@redhat.com>
|
@aguidirh: This pull request references Jira Issue OCPBUGS-53455, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Signed-off-by: Alex Guidi <aguidi@redhat.com>
dc1f65b to
211f31e
Compare
|
@aguidirh: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@aguidirh: This pull request references Jira Issue OCPBUGS-73760, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@aguidirh: This pull request references Jira Issue OCPBUGS-73760, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adolfo-ab, aguidirh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
This PR fixes a critical bug where mirroring operator catalogs to certain registries (like Nexus) fails with the error:
Manifest list must be converted to type "application/vnd.docker.distribution.manifest.list.v2+json" to be written to destination, but we cannot modify it: "Instructed to preserve digests"The root cause was that when oc-mirror rebuilds/filters operator catalogs, it sets
PreserveDigests=truefor all images. However, rebuilt catalogs have already been modified (filtered), so their digests differ from the original. When copying these rebuilt catalogs to registries that require Docker v2 manifest format conversion, the conversion is blocked by thePreserveDigestsflag, causing the mirror operation to fail.Solution: Set
PreserveDigests=falsefor rebuilt operator catalogs, allowing necessary manifest format conversions while maintaining digest preservation for unmodified images (bundles, related images, etc.).Github / Jira issue: OCPBUGS-73760
Type of change
How Has This Been Tested?
Test Configuration:
registry.redhat.io/redhat/redhat-operator-index:v4.17Test Steps:
./bin/oc-mirror -c <config>.yaml --workspace file://<path> docker://127.0.0.1:8082 --dest-tls-verify=false --v2Expected Outcome
Before the fix:
Manifest list must be converted to type "application/vnd.docker.distribution.manifest.list.v2+json" to be written to destination, but we cannot modify it: "Instructed to preserve digests"After the fix:
Logs showing success:
Additional Notes
This fix specifically targets rebuilt/filtered operator catalogs (identified by
img.Type.IsOperatorCatalog() && img.RebuiltTag != ""). The change:This resolves the issue for registries like Nexus that require Docker v2 manifest format but was previously blocked by the digest preservation constraint.