Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yapei
Copy link
Contributor

@yapei yapei commented Oct 31, 2024

After: ConditonalUpdate patch will look like following, which will not trigger Admission Webhook Warning

[{"op":"add","path":"/spec/desiredUpdate","value":{"image":"registry.ci.openshift.org/ocp/release@sha256:20abbd29314c68c67cd6822952f5688bc5955d526b5663e561780d2cffa4277a","version":"4.18.0-0.nightly-2024-10-31-064113"}}]
after-fix.mov

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Oct 31, 2024
@openshift-ci-robot
Copy link
Contributor

@yapei: This pull request references Jira Issue OCPBUGS-43983, which is invalid:

  • expected the bug to target the "4.18.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

After: ConditonalUpdate patch will look like following, which will not trigger Admission Webhook Warning

[{"op":"add","path":"/spec/desiredUpdate","value":{"image":"registry.ci.openshift.org/ocp/release@sha256:20abbd29314c68c67cd6822952f5688bc5955d526b5663e561780d2cffa4277a","version":"4.18.0-0.nightly-2024-10-31-064113"}}]

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 openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Oct 31, 2024
@openshift-ci openshift-ci bot added the component/core Related to console core functionality label Oct 31, 2024
Copy link
Contributor

openshift-ci bot commented Oct 31, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yapei
Once this PR has been reviewed and has the lgtm label, please assign vikram-raj for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yapei
Copy link
Contributor Author

yapei commented Oct 31, 2024

@cyril-ui-developer Could you help review?

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 5, 2024
@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

After: ConditonalUpdate patch will look like following, which will not trigger Admission Webhook Warning

[{"op":"add","path":"/spec/desiredUpdate","value":{"image":"registry.ci.openshift.org/ocp/release@sha256:20abbd29314c68c67cd6822952f5688bc5955d526b5663e561780d2cffa4277a","version":"4.18.0-0.nightly-2024-10-31-064113"}}]
after-fix.mov

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.

Copy link
Contributor

openshift-ci bot commented Nov 5, 2024

@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:

@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
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @yapei

In response to this:

After: ConditonalUpdate patch will look like following, which will not trigger Admission Webhook Warning

[{"op":"add","path":"/spec/desiredUpdate","value":{"image":"registry.ci.openshift.org/ocp/release@sha256:20abbd29314c68c67cd6822952f5688bc5955d526b5663e561780d2cffa4277a","version":"4.18.0-0.nightly-2024-10-31-064113"}}]
after-fix.mov

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.

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) {
Copy link
Contributor

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,
    },
  })) ?? [];
};

Copy link
Contributor Author

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!

Copy link
Contributor

openshift-ci bot commented Nov 6, 2024

@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.

@yapei
Copy link
Contributor Author

yapei commented Nov 6, 2024

@cyril-ui-developer updated according to the comments, PTAL, thanks!

conditions: update.conditions,
release: {
image: update.release.image,
version: update.release.version,
Copy link
Contributor

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

Copy link
Member

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).

Copy link
Contributor

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).

@wking Thank you for your response.

@yapei Let's connect to investigate why you are seeing unnecessary warning alert been triggered for conditionalUpdates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/core Related to console core functionality jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants