-
Notifications
You must be signed in to change notification settings - Fork 612
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
OCPBUGS-43983: update ConditionalUpdates release type #14452
base: master
Are you sure you want to change the base?
Conversation
@yapei: This pull request references Jira Issue OCPBUGS-43983, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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 NOT APPROVED This pull-request has been approved by: yapei The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@cyril-ui-developer Could you help review? |
@yapei: This pull request references Jira Issue OCPBUGS-43983, 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: In 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. |
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: yapei. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. In 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 kubernetes-sigs/prow repository. |
@@ -45,7 +45,16 @@ export const getSortedAvailableUpdates = (cv: ClusterVersionKind): VersionUpdate | |||
}; | |||
|
|||
const getConditionalClusterUpdates = (cv: ClusterVersionKind): ConditionalUpdate[] => { | |||
return cv?.status?.conditionalUpdates || []; | |||
if (cv?.status?.conditionalUpdates) { |
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.
Could we make this clearer?
const getConditionalClusterUpdates = (cv: ClusterVersionKind): ConditionalUpdate[] => {
return cv?.status?.conditionalUpdates?.map((update) => ({
conditions: update.conditions,
release: {
image: update.release.image,
version: update.release.version,
},
})) ?? [];
};
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.
Thanks @cyril-ui-developer Updated!
@yapei: all tests passed! Full PR test history. Your PR dashboard. 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 kubernetes-sigs/prow repository. I understand the commands that are listed here. |
@cyril-ui-developer updated according to the comments, PTAL, thanks! |
conditions: update.conditions, | ||
release: { | ||
image: update.release.image, | ||
version: update.release.version, |
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.
@yapei Hmm, it seems the url
and channels
fields are valid for conditionalUpdates
IIRC : https://docs.openshift.com/container-platform/4.17/rest_api/config_apis/clusterversion-config-openshift-io-v1.html#status-conditionalupdates-release.
If the url
and channels
fields is causing unnecessary warning alert to be triggered, then we have to investigate further.
@wking Does the API not support url
and channels
fields as stated in the doc?
cc: @rhamilto
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.
url
and channels
are +optional
and omitempty
, so they may or may not be present for any Release
(including the status.conditionalUpdates[].release
you're processing here).
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.
url
andchannels
are+optional
andomitempty
, so they may or may not be present for anyRelease
(including thestatus.conditionalUpdates[].release
you're processing here).
@wking Thank you for your response.
@yapei Let's connect to investigate why you are seeing unnecessary warning alert been triggered for conditionalUpdates
.
After: ConditonalUpdate patch will look like following, which will not trigger Admission Webhook Warning
after-fix.mov