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-499: fix: order conditions by type to limit un-needed updates #667

Merged

Conversation

eggfoobar
Copy link
Contributor

@eggfoobar eggfoobar commented Aug 23, 2022

Signed-off-by: ehila [email protected]

Sorts the conditions array to avoid un-needed updates cluster operator status field

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

N/A

Documentation

N/A

Unit Tests

  • pkg/controller/status/conditions_test.go

Privacy

N/A

Changelog

N/A

Breaking Changes

No

References

https://issues.redhat.com/browse/TRT-481

@openshift-ci openshift-ci bot requested review from iNecas and tisnik August 23, 2022 16:21
@eggfoobar
Copy link
Contributor Author

/retest-required

@tremes
Copy link
Contributor

tremes commented Aug 24, 2022

Hi @eggfoobar thanks for your PR. I was looking at the related JIRA issue and it didn't tell me much. Can you elaborate please a little bit more why these conditions need to be sorted?
I think you will need a new OCPBUG for this

@eggfoobar
Copy link
Contributor Author

Hey @tremes absolutely! The issue we saw was some extra activity updating the Status.Conditions of the operator that didn't seem to be needed. They all seem to be just updates that were re-ordering the conditions. This PR just sorts those conditions so later on in the code when the DeepEqual check is done to see if an update is needed, it should only trigger on changes not on re-orders

@eggfoobar
Copy link
Contributor Author

eggfoobar commented Aug 24, 2022

Went ahead and created the bug for this as well, https://issues.redhat.com/browse/OCPBUGS-499

@tremes
Copy link
Contributor

tremes commented Aug 24, 2022

Thanks. Please change the title of the PR to OCPBUGS-499: fix: order conditions by type to limit un-needed updates and feel free to assignt the task to yourself :)

@eggfoobar eggfoobar changed the title TRT-481: fix: order conditions by type to limit un-needed updates OCPBUGS-499: fix: order conditions by type to limit un-needed updates Aug 24, 2022
@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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 24, 2022
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 24, 2022

@eggfoobar: This pull request references [Jira Issue OCPBUGS-499](https://issues.redhat.com//browse/OCPBUGS-499), which is invalid:

  • expected the bug to target the "4.12.0" version, but it targets "4.12" instead

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.

In response to this:

Signed-off-by: ehila [email protected]

Sorts the conditions array to avoid un-needed updates cluster operator status field

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

N/A

Documentation

N/A

Unit Tests

  • pkg/controller/status/conditions_test.go

Privacy

N/A

Changelog

N/A

Breaking Changes

No

References

https://issues.redhat.com/browse/TRT-481

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/test-infra repository.

@eggfoobar
Copy link
Contributor Author

/jira refresh

@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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Aug 24, 2022
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 24, 2022

@eggfoobar: This pull request references [Jira Issue OCPBUGS-499](https://issues.redhat.com//browse/OCPBUGS-499), 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.12.0) matches configured target version for branch (4.12.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST)

In response to this:

/jira refresh

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Aug 24, 2022
@tremes
Copy link
Contributor

tremes commented Aug 24, 2022

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2022
@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eggfoobar, tremes

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 11da6c7 and 8 for PR HEAD 12adc54 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 11da6c7 and 7 for PR HEAD 12adc54 in total

@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2022

@eggfoobar: 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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit f9c4fe5 into openshift:master Aug 24, 2022
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 24, 2022

@eggfoobar: All pull requests linked via external trackers have merged:

[Jira Issue OCPBUGS-499](https://issues.redhat.com//browse/OCPBUGS-499) has been moved to the MODIFIED state.

In response to this:

Signed-off-by: ehila [email protected]

Sorts the conditions array to avoid un-needed updates cluster operator status field

Categories

  • Bugfix
  • Enhancement
  • Backporting
  • Others (CI, Infrastructure, Documentation)

Sample Archive

N/A

Documentation

N/A

Unit Tests

  • pkg/controller/status/conditions_test.go

Privacy

N/A

Changelog

N/A

Breaking Changes

No

References

https://issues.redhat.com/browse/TRT-481

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/test-infra repository.

tremes pushed a commit to tremes/insights-operator that referenced this pull request Jan 3, 2023
tremes pushed a commit to tremes/insights-operator that referenced this pull request Jan 3, 2023
tremes pushed a commit to tremes/insights-operator that referenced this pull request Jan 17, 2023
openshift-merge-robot pushed a commit that referenced this pull request Jan 23, 2023
…steroperator co… (#718)

* OCPBUGS-5349: do not periodically update Available clusteroperator co… (#709)

* OCPBUGS-5347: do not periodically update Available clusteroperator condition in disabled state

* Make sure the conditions time are correct

* fix: order conditions by type to limit un-needed updates (#667)

Signed-off-by: ehila <[email protected]>

Signed-off-by: ehila <[email protected]>

Signed-off-by: ehila <[email protected]>
Co-authored-by: E Hila <[email protected]>
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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants