OCPBUGS-100067: Deduplicate unchanged status upgrade events - #1526
Conversation
Signed-off-by: Stephen Benjamin <stephen@redhat.com>
|
@stbenjam: This pull request references Jira Issue OCPBUGS-100067, 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. |
WalkthroughThe operator now emits “Status upgrade” events only when the progressing condition’s status, reason, or message changes. A unit test covers initial emission, suppression of duplicate events, version updates, and transitions through availability. ChangesProgressing event deduplication
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/operator/status_test.go`:
- Around line 193-196: Update the test around statusAvailable and
statusProgressing to assert the expected availability state immediately after
statusAvailable("") succeeds, before changing optr.operandVersions[0].Version.
Then retain the existing version change and progressing assertion to verify
re-entry after availability rather than only the changed Progressing message.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1e394fb1-60f0-49fc-84ba-7a5628238c9c
📒 Files selected for processing (2)
pkg/operator/status.gopkg/operator/status_test.go
|
/jira refresh |
|
@stbenjam: This pull request references Jira Issue OCPBUGS-100067, which is invalid:
Comment 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. |
|
/jira refresh |
|
@stbenjam: This pull request references Jira Issue OCPBUGS-100067, which is invalid:
Comment 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. |
|
/jira refresh |
|
@stbenjam: This pull request references Jira Issue OCPBUGS-100067, which is invalid:
Comment 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. |
|
/jira refresh |
|
@stbenjam: This pull request references Jira Issue OCPBUGS-100067, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
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. |
wking
left a comment
There was a problem hiding this comment.
e2e-aws-ovn-upgrade looks beautiful for the fix as far as the incoming machine-api-operator-77749d4fc is concerned (the outgoing machine-api-operator-ff54974b7 still struggles, but this patch isn't getting into that outgoing operator):
$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_machine-api-operator/1526/pull-ci-openshift-machine-api-operator-main-e2e-aws-ovn-upgrade/2082126574756302848/artifacts/e2e-aws-ovn-upgrade/gather-extra/artifacts/events.json | jq -r '[.items[] | (.firstTimestamp // .eventTinme // .metadata.creationTimestamp) + " " + (.count | tostring) + " " + (.lastTimestamp // "-") + " " + .metadata.namespace + " " + (.involvedObject | .kind + " " + .name) + " " + .reason + ": " + .message] | sort[]' | grep Progressing | grep machine-api
2026-07-28T16:02:41Z 25 2026-07-28T16:07:18Z default ClusterOperator machine-api Status upgrade: Progressing towards operator: 5.0.0-0.ci-2026-07-28-153051-test-ci-op-l0n3k01i-initial
2026-07-28T16:49:42Z 1 2026-07-28T16:49:42Z default ClusterOperator machine-api Status upgrade: Progressing towards operator: 5.0.0-0.ci-2026-07-28-153052-test-ci-op-l0n3k01i-latest
$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_machine-api-operator/1526/pull-ci-openshift-machine-api-operator-main-e2e-aws-ovn-upgrade/2082126574756302848/artifacts/e2e-aws-ovn-upgrade/gather-extra/artifacts/events.json | jq -r '[.items[] | (.firstTimestamp // .eventTinme // .metadata.creationTimestamp) + " " + (.count | tostring) + " " + (.lastTimestamp // "-") + " " + (.involvedObject | .kind + " " + .name) + " " + .reason + ": " + .message] | sort[]' | grep 'machine-api-operator.*Created'
2026-07-28T15:58:02Z 1 2026-07-28T15:58:02Z ReplicaSet machine-api-operator-ff54974b7 SuccessfulCreate: Created pod: machine-api-operator-ff54974b7-w9tnz
2026-07-28T16:02:41Z 1 2026-07-28T16:02:41Z Pod machine-api-operator-ff54974b7-w9tnz Created: Container created
2026-07-28T16:46:52Z 1 2026-07-28T16:46:52Z ReplicaSet machine-api-operator-77749d4fc SuccessfulCreate: Created pod: machine-api-operator-77749d4fc-spxcz
2026-07-28T16:47:02Z 1 2026-07-28T16:47:02Z Pod machine-api-operator-77749d4fc-spxcz Created: Container created/lgtm
|
/retest-required |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nrb The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by CI |
|
@stbenjam: 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. |
|
/override ci/prow/e2e-metal-ipi-virtualmedia We need this to restore payloads, I don't think the metal failures are related. virtualmedia installed, test failure unrelated. IPv6 is build cluster issues. |
|
@stbenjam: Overrode contexts on behalf of stbenjam: ci/prow/e2e-metal-ipi-virtualmedia 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/e2e-metal-ipi-ovn-ipv6 |
|
@stbenjam: Overrode contexts on behalf of stbenjam: ci/prow/e2e-metal-ipi-ovn-ipv6 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/e2e-aws-operator |
|
@stbenjam: Overrode contexts on behalf of stbenjam: ci/prow/e2e-aws-operator, ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-upgrade, ci/prow/e2e-metal-ipi 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 kubernetes-sigs/prow repository. |
|
/override ci/prow/okd-scos-images |
|
@stbenjam: Overrode contexts on behalf of stbenjam: ci/prow/okd-scos-images 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 kubernetes-sigs/prow repository. |
|
@stbenjam: Jira Issue Verification Checks: Jira Issue OCPBUGS-100067 Jira Issue OCPBUGS-100067 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 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. |
What
Status upgradeonly when theProgressingstatus, reason, or message changes.ClusterOperatorconditions on every reconciliation.Why
During a slow SNO upgrade rollout, MAO reconciles approximately every five seconds and currently emits the same
Status upgradeKubernetes Event each time. Nine of ten jobs for5.0.0-0.nightly-2026-07-28-003649recorded the identical event 25 times and failed the pathological-event invariant, although the upgrades completed successfully.The
ClusterOperatorcondition is the durable representation of an ongoing upgrade. Repeated reconciliations of that unchanged condition should not create new occurrence Events.Bug: https://issues.redhat.com/browse/OCPBUGS-100067
Validation
go test ./pkg/operatormake lintmake testSummary by CodeRabbit
Bug Fixes
Tests