OCPBUGS-73844: Let import mode be decided by the cluster when not specified#2183
OCPBUGS-73844: Let import mode be decided by the cluster when not specified#2183Prashanth684 wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
@Prashanth684: This pull request references Jira Issue OCPBUGS-73844, 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. |
WalkthroughRemoved automatic defaulting of image ImportMode to "Legacy" across CLI commands and helpers; flag help texts updated to explain behaviors for PreserveOriginal, Legacy, and unspecified (cluster-determined) modes. Tests were updated to expect an empty ImportMode when unset. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing touches
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Prashanth684 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/verified by @xiuwang |
|
@xiuwang: This PR has been marked as verified by 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. |
| cmd.Flags().BoolVar(&o.All, "all", o.All, "If true, import all tags from the provided source on creation or if --from is specified") | ||
| cmd.Flags().StringVar(&o.ReferencePolicy, "reference-policy", o.ReferencePolicy, "Allow to request pullthrough for external image when set to 'local'. Defaults to 'source'.") | ||
| cmd.Flags().StringVar(&o.ImportMode, "import-mode", o.ImportMode, "Imports the full manifest list of a tag when set to 'PreserveOriginal'. Defaults to 'Legacy'.") | ||
| cmd.Flags().StringVar(&o.ImportMode, "import-mode", o.ImportMode, "Imports the full manifest list of a tag when set to 'PreserveOriginal'. When set to 'Legacy', imports a single sub-manifest. When unspecified, the cluster determines the import mode.") |
There was a problem hiding this comment.
Wouldn't this be a breaking change?. Because we implicitly change a default behavior. So people who rely on Legacy behavior by default will start getting failures?.
There was a problem hiding this comment.
The default behavior will only change for clusters installed with the multi-arch payload, where the expectation is that images are manifestlisted. That being said, we should document that on multi-arch clusters, the default behavior is importing manifestlisted images and to get the legacy behavior, --import-mode=Legacy needs to be added.
There was a problem hiding this comment.
That makes sense. Let's update When unspecified, the cluster determines the import mode. to more explicit about the behavior, such as "When unspecified, if the cluster is single-arch, it will be Legacy; if the cluster is multi-arch, it will PreserveOriginal", etc.
4b2b377 to
2ed2d79
Compare
…cified Today, we default to "Legacy" importmode when no option is specified. With the introduction of https://issues.redhat.com/browse/MULTIARCH-4552, the importmode is determined by the Cluster version's `desired.architecture` - which if set to "Multi", the import mode is PreserveOriginal else Legacy. Hence we don't need to default to Legacy all the time.
2ed2d79 to
8a98fbc
Compare
|
@Prashanth684: 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. |
|
/verified by @xiuwang Test |
|
@xiuwang: This PR has been marked as verified by 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. |
|
Just dropped a comment about documentation update. Other than that this looks good to me. Additionally, you need to fix invalid-jira label. |
|
/jira refresh |
|
@flavianmissi: This pull request references Jira Issue OCPBUGS-73844, 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. |
Today, we default to "Legacy" importmode when no option is specified. With the introduction of
https://issues.redhat.com/browse/MULTIARCH-4552, the importmode is determined by the Cluster version's
desired.architecture- which if set to "Multi", the import mode is PreserveOriginal else Legacy. Hence we don't need to default to Legacy all the time.