-
Notifications
You must be signed in to change notification settings - Fork 426
OCPBUGS-73844: Let import mode be decided by the cluster when not specified #2183
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
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 failuıres?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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. |
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.