-
Notifications
You must be signed in to change notification settings - Fork 213
OCPBUGS-18454: Avoid using risk names as condition reasons when invalid #962
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-18454: Avoid using risk names as condition reasons when invalid #962
Conversation
|
@petr-muller: This pull request references Jira Issue OCPBUGS-9050, 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 kubernetes/test-infra repository. |
|
@petr-muller: This pull request references Jira Issue OCPBUGS-9050, 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 kubernetes/test-infra repository. |
|
@petr-muller: This pull request references Jira Issue OCPBUGS-18454, 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 kubernetes/test-infra repository. |
|
/hold Reviews welcome but this will need to be adapted to #964 which is more important to merge. |
|
/jira refresh |
|
@petr-muller: This pull request references Jira Issue OCPBUGS-18454, 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: 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/test-infra repository. |
9539629 to
d0576f8
Compare
d0576f8 to
5b39dcc
Compare
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
/remove-lifecycle stale |
5b39dcc to
b0bd4a4
Compare
b0bd4a4 to
3635b10
Compare
The method only uses the `risks` slice so we can only pass that to it
Having all logic at one place allows easier testing and simplifies the callsite logic, too.
There is a clear path through both statuses and reasons, encoding them in simple helper methods reduces the original methods complexity.
a4ae123 to
ad527ba
Compare
|
@LalatenduMohanty @wking addressed reviews, PTAL |
|
/hold cancel |
ad527ba to
71c5a68
Compare
LalatenduMohanty
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: LalatenduMohanty, petr-muller, wking 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 |
|
/retest |
Does not seem related |
|
@petr-muller: Overrode contexts on behalf of petr-muller: ci/prow/e2e-agnostic-ovn-upgrade-into-change 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/test-infra repository. |
|
/label qe-approved |
|
@petr-muller: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
@petr-muller: Jira Issue OCPBUGS-18454: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-18454 has been moved to the MODIFIED state. 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. |
|
[ART PR BUILD NOTIFIER] This PR has been included in build cluster-version-operator-container-v4.16.0-202401272017.p0.ga679864.assembly.stream for distgit cluster-version-operator. |
|
Fix included in accepted release 4.16.0-0.nightly-2024-01-31-073538 |
Until / unless we merge openshift/api#1577, conditional risk names may not be valid condition reason strings, so we need to check them and use a generic (new
RiskAppliesToCluster) reason instead.I took the opportunity and wrote tests and refactored the code slightly (make it easily testable from a single place and get rid of extensive branching logic that was hard to read). I suggest reviewing individual commits.