Skip to content

Conversation

@petr-muller
Copy link
Member

@petr-muller petr-muller commented Sep 1, 2023

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.

@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. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 1, 2023
@openshift-ci-robot
Copy link
Contributor

@petr-muller: This pull request references Jira Issue OCPBUGS-9050, which is invalid:

  • expected the bug to target the "4.14.0" version, but it targets "4.12.z" 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.

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

Details

In response to this:

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

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

@petr-muller: This pull request references Jira Issue OCPBUGS-9050, which is invalid:

  • expected the bug to target the "4.14.0" version, but it targets "4.12.z" 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.

Details

In response to this:

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.

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 petr-muller changed the title OCPBUGS-9050: Avoid using risk names as condition reasons when invalid OCPBUGS-18454: Avoid using risk names as condition reasons when invalid Sep 1, 2023
@openshift-ci-robot
Copy link
Contributor

@petr-muller: This pull request references Jira Issue OCPBUGS-18454, which is invalid:

  • expected the bug to target the "4.14.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.

Details

In response to this:

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.

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
Copy link
Member Author

/hold

Reviews welcome but this will need to be adapted to #964 which is more important to merge.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 7, 2023
@petr-muller
Copy link
Member 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. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 8, 2023
@openshift-ci-robot
Copy link
Contributor

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

Requesting review from QA contact:
/cc @shellyyang1989

Details

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.

@petr-muller petr-muller force-pushed the conditional-risk-name-invalid-reason-name branch 2 times, most recently from 9539629 to d0576f8 Compare September 12, 2023 13:11
@petr-muller petr-muller force-pushed the conditional-risk-name-invalid-reason-name branch from d0576f8 to 5b39dcc Compare September 20, 2023 12:01
@petr-muller
Copy link
Member Author

#964 merged but not this PR needs to wait for #939 and #961 to avoid conflicts

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 26, 2023
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 26, 2023
@petr-muller
Copy link
Member Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 2, 2024
@petr-muller petr-muller force-pushed the conditional-risk-name-invalid-reason-name branch from 5b39dcc to b0bd4a4 Compare January 15, 2024 17:11
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2024
@petr-muller petr-muller force-pushed the conditional-risk-name-invalid-reason-name branch from b0bd4a4 to 3635b10 Compare January 15, 2024 17:23
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2024
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.
@petr-muller petr-muller force-pushed the conditional-risk-name-invalid-reason-name branch from a4ae123 to ad527ba Compare January 19, 2024 18:22
@petr-muller
Copy link
Member Author

@LalatenduMohanty @wking addressed reviews, PTAL

@petr-muller
Copy link
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 19, 2024
@petr-muller petr-muller force-pushed the conditional-risk-name-invalid-reason-name branch from ad527ba to 71c5a68 Compare January 22, 2024 17:05
Copy link
Member

@LalatenduMohanty LalatenduMohanty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 22, 2024
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 22, 2024

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [LalatenduMohanty,petr-muller,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@petr-muller
Copy link
Member Author

/retest

@petr-muller
Copy link
Member Author

: [sig-cluster-lifecycle] pathological event should not see excessive Back-off restarting failed containers
{  event [namespace/openshift-console node/ci-op-icws625r-deec6-675nt-master-2 pod/console-6c8659cb4-5ffv7 hmsg/385654efc2 - Back-off restarting failed container console in pod console-6c8659cb4-5ffv7_openshift-console(f816a379-3140-4d58-9975-1a21d6954f0b)] happened 53 times}

Does not seem related
/override ci/prow/e2e-agnostic-ovn-upgrade-into-change

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 23, 2024

@petr-muller: Overrode contexts on behalf of petr-muller: ci/prow/e2e-agnostic-ovn-upgrade-into-change

Details

In response to this:

: [sig-cluster-lifecycle] pathological event should not see excessive Back-off restarting failed containers
{  event [namespace/openshift-console node/ci-op-icws625r-deec6-675nt-master-2 pod/console-6c8659cb4-5ffv7 hmsg/385654efc2 - Back-off restarting failed container console in pod console-6c8659cb4-5ffv7_openshift-console(f816a379-3140-4d58-9975-1a21d6954f0b)] happened 53 times}

Does not seem related
/override ci/prow/e2e-agnostic-ovn-upgrade-into-change

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.

@shellyyang1989
Copy link
Contributor

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jan 26, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 2f1f8d6 and 2 for PR HEAD 71c5a68 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 26, 2024

@petr-muller: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-bot openshift-merge-bot bot merged commit a679864 into openshift:master Jan 26, 2024
@openshift-ci-robot
Copy link
Contributor

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

Details

In response to this:

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.

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-bot
Copy link
Contributor

[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.
All builds following this will include this PR.

@petr-muller petr-muller deleted the conditional-risk-name-invalid-reason-name branch January 30, 2024 14:26
@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-01-31-073538

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. 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. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants