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

Fix ClusterOperator event when version changes #787

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

jsafrane
Copy link
Contributor

@jsafrane jsafrane commented Apr 29, 2020

Don't show ugly JSON diff when only the operator version changes.

Before this PR, when only Versions changed in a ClusterOperator:

Status for clusteroperator/csi-snapshot-controller changed: {"conditions":[{"type":"Degraded","status":"False","lastTransitionTime":"2020-04-29T11:32:49Z","reason":"AsExpected"},{"type":"Progressing","status":"False","lastTransitionTime":"2020-04-29T11:34:04Z","reason":"AsExpected"},{"type":"Available","status":"True","lastTransitionTime":"2020-04-29T11:34:04Z","reason":"AsExpected"},{"type":"Upgradeable","status":"True","lastTransitionTime":"2020-04-29T11:32:49Z","reason":"AsExpected"}],"

A: relatedObjects":[{"group":"","resource":"namespaces","name":"openshift-cluster-storage-operator"},{"group":"","resource":"namespaces","name":"openshift-cluster-storage-operator"},{"group":"operator.openshift.io","resource":"csisnapshotcontrollers","name":"cluster"}],"extension":null}


B: versions":[{"name":"csi-snapshot-controller","version":"v2.3.4"},{"name":"operator","version":"v1.2.3"}],"relatedObjects":[{"group":"","resource":"namespaces","name":"openshift-cluster-storage-operator"},{"group":"","resource":"namespaces","name":"openshift-cluster-storage-operator"},{"group":"operator.openshift.io","resource":"csisnapshotcontrollers","name":"cluster"}],"extension":null}

With this PR:
Status for clusteroperator/csi-snapshot-controller changed: status.versions changed from [] to [{"operator" "v1.2.3"} {"csi-snapshot-controller" "v2.3.4"}]

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1829320

Don't show ugly JSON diff when only the operator version changes.
@mfojtik
Copy link
Contributor

mfojtik commented Apr 29, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 29, 2020
@deads2k
Copy link
Contributor

deads2k commented Apr 29, 2020

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, jsafrane, mfojtik

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2020
@openshift-merge-robot openshift-merge-robot merged commit 9e6c27e into openshift:master Apr 29, 2020
jsafrane added a commit to jsafrane/cluster-csi-snapshot-controller-operator that referenced this pull request Apr 29, 2020
bertinatto pushed a commit to bertinatto/library-go that referenced this pull request Jul 2, 2020
Fix ClusterOperator event when version changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants