Skip to content

NO-JIRA: Re-enable tests for the recommend cmd if alertsByCVO - #31440

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
hongkailiu:OTA-1814-re-enable
Jul 30, 2026
Merged

NO-JIRA: Re-enable tests for the recommend cmd if alertsByCVO#31440
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
hongkailiu:OTA-1814-re-enable

Conversation

@hongkailiu

@hongkailiu hongkailiu commented Jul 28, 2026

Copy link
Copy Markdown
Member

It was disabled in #31417.

Requiring openshift/oc#2322

/hold

Summary by CodeRabbit

  • Tests
    • Updated upgrade command recommendation tests to respect feature-gate settings for risk/alert evaluation.
    • Adjusted expected results for HyperShift environments, using branched assertions based on whether alerts are evaluated.
    • Improved coverage for conditional recommendations and for the --version target, including updated accept-guidance expectations when alerts-by-CVO is enabled.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 28, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@hongkailiu: This pull request explicitly references no jira issue.

Details

In response to this:

It was disabled in #31417.

Requiring openshift/oc#2322

/hold

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-ci openshift-ci Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 28, 2026
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: c1b0b5b5-be55-4a27-aa41-1fb7335b31d8

📥 Commits

Reviewing files that changed from the base of the PR and between f1b04d8 and 7ba69fd.

📒 Files selected for processing (1)
  • test/extended/cli/adm_upgrade/recommend.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/extended/cli/adm_upgrade/recommend.go

Walkthrough

The upgrade recommendation test detects HyperShift and the FeatureGateClusterUpdateAcceptRisks setting for the target ClusterVersion, then adjusts conditional recommendation and --version expectations based on whether CVO evaluates update-accept risks.

Changes

Upgrade risk test behavior

Layer / File(s) Summary
Alert evaluation state and setup
test/extended/cli/adm_upgrade/recommend.go
Initializes shared HyperShift and alert-evaluation state, adds feature-gate lookup through alertsEvaluatedByCVO, and reuses the computed HyperShift value during setup.
Conditional recommendation expectations
test/extended/cli/adm_upgrade/recommend.go
Branches recommendation and --version assertions on alertsByCVO, retaining regex-based checks when CVO does not evaluate alerts and expecting accept guidance otherwise.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: petr-muller, davidhurta


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The PR adds a failure message that prints raw oc adm upgrade recommend output, which can include internal service URLs/IPs. Remove the raw output dump or redact URLs/IPs before including command output in assertion messages.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: re-enabling recommend command tests when alertsByCVO is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All Ginkgo titles in the changed file are static strings; the PR only changed test bodies and left names deterministic.
Test Structure And Quality ✅ Passed PASS: The suite keeps each It focused, uses Ordered BeforeAll/AfterAll with explicit clusterrolebinding cleanup, and only uses finite sleeps plus a timed deployment-ready helper.
Microshift Test Compatibility ✅ Passed The test is MicroShift-guarded in BeforeAll via exutil.IsMicroShiftCluster() and g.Skip() before any ClusterVersion/FeatureGate use.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The changed recommend tests only exercise ClusterVersion/update-service behavior and create one deployment/service; no SNO-unsafe node-count, drain, anti-affinity, or topology assumptions were found.
Topology-Aware Scheduling Compatibility ✅ Passed Only a test file changed; the diff adds no manifests, controllers, or pod scheduling logic/topology assumptions.
Ote Binary Stdout Contract ✅ Passed No stdout writes or process-level hooks (main/init/TestMain/BeforeSuite/etc.) were added; the file only uses test setup and helper functions.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4-only assumptions or public-internet dependencies found; the helper uses net.JoinHostPort and binds the local server on ::.
No-Weak-Crypto ✅ Passed Changed file is test-only and the diff adds no weak-crypto APIs, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The PR only changes a test file and adds no privileged or securityContext settings in any manifest.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
test/extended/cli/adm_upgrade/recommend.go (1)

280-281: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Keep the helper comment rationale-focused.

Replace the behavior restatement and pinned implementation link with a short explanation of why HyperShift is excluded.

As per coding guidelines, Go comments should be minimal and explain why rather than what.

🤖 Prompt for 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.

In `@test/extended/cli/adm_upgrade/recommend.go` around lines 280 - 281, Update
the comment for alertsEvaluatedByCVO to briefly explain why HyperShift or hosted
clusters are excluded, removing the behavior restatement and pinned upstream
implementation link.

Source: Coding guidelines

🤖 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 `@test/extended/cli/adm_upgrade/recommend.go`:
- Around line 243-247: Implement the CVO-specific expectation in the alertsByCVO
branch of the recommendation check: define the expected output pattern for
CVO-evaluated accept risks and assert it there instead of allowing the shared
matchRegexp call to use the legacy pattern. Preserve the existing legacy regex
path when alertsByCVO is false.
- Around line 286-289: Update the FeatureGates().Get error handling to return
false, nil when apierrors.IsNotFound(err) indicates the cluster FeatureGate
resource is missing, while continuing to return false, err for all other errors.

---

Nitpick comments:
In `@test/extended/cli/adm_upgrade/recommend.go`:
- Around line 280-281: Update the comment for alertsEvaluatedByCVO to briefly
explain why HyperShift or hosted clusters are excluded, removing the behavior
restatement and pinned upstream implementation link.
🪄 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 YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 761a1860-2775-4386-a781-fd1df64ba976

📥 Commits

Reviewing files that changed from the base of the PR and between 18c766f and 23d8c3b.

📒 Files selected for processing (1)
  • test/extended/cli/adm_upgrade/recommend.go

Comment thread test/extended/cli/adm_upgrade/recommend.go
Comment thread test/extended/cli/adm_upgrade/recommend.go
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2026
@hongkailiu
hongkailiu force-pushed the OTA-1814-re-enable branch from 23d8c3b to f1b04d8 Compare July 28, 2026 17:07
@hongkailiu
hongkailiu marked this pull request as ready for review July 29, 2026 10:34
@hongkailiu

hongkailiu commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3

@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 29, 2026
@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/091b0b00-8b39-11f1-843e-e9ec4b2febbb-0

@openshift-ci
openshift-ci Bot requested review from DavidHurta and petr-muller July 29, 2026 10:35
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@hongkailiu
hongkailiu force-pushed the OTA-1814-re-enable branch from f1b04d8 to 7ba69fd Compare July 29, 2026 14:13
@hongkailiu

Copy link
Copy Markdown
Member Author

/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/ced35cd0-8b57-11f1-9d0e-6f83db47a6b0-0

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@hongkailiu

Copy link
Copy Markdown
Member Author

install failure on the previous one.

/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/9749fb90-8b87-11f1-92da-599146efaf38-0

@hongkailiu

Copy link
Copy Markdown
Member Author

/retest-required

@hongkailiu

Copy link
Copy Markdown
Member Author

Took this run from this comment:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/openshift-origin-31440-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3/2082555896579231744/artifacts/e2e-aws-ovn-techpreview-serial/openshift-e2e-test/artifacts/e2e.log | rg 'runs successfully (with|when)'
started: 0/10/34 "[Serial][sig-cli] oc adm upgrade recommend When the update service has conditional recommendations runs successfully when listing all updates [Suite:openshift/conformance/serial]"
passed: (20.7s) 2026-07-29T22:05:59 "[Serial][sig-cli] oc adm upgrade recommend When the update service has conditional recommendations runs successfully when listing all updates [Suite:openshift/conformance/serial]"
started: 0/30/34 "[Serial][sig-cli] oc adm upgrade recommend runs successfully with an empty channel [Suite:openshift/conformance/serial]"
passed: (17.1s) 2026-07-29T22:14:50 "[Serial][sig-cli] oc adm upgrade recommend runs successfully with an empty channel [Suite:openshift/conformance/serial]"

/verified by @hongkailiu

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@hongkailiu: This PR has been marked as verified by @hongkailiu.

Details

In response to this:

Took this run from this comment:

$ curl -s https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/logs/openshift-origin-31440-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3/2082555896579231744/artifacts/e2e-aws-ovn-techpreview-serial/openshift-e2e-test/artifacts/e2e.log | rg 'runs successfully (with|when)'
started: 0/10/34 "[Serial][sig-cli] oc adm upgrade recommend When the update service has conditional recommendations runs successfully when listing all updates [Suite:openshift/conformance/serial]"
passed: (20.7s) 2026-07-29T22:05:59 "[Serial][sig-cli] oc adm upgrade recommend When the update service has conditional recommendations runs successfully when listing all updates [Suite:openshift/conformance/serial]"
started: 0/30/34 "[Serial][sig-cli] oc adm upgrade recommend runs successfully with an empty channel [Suite:openshift/conformance/serial]"
passed: (17.1s) 2026-07-29T22:14:50 "[Serial][sig-cli] oc adm upgrade recommend runs successfully with an empty channel [Suite:openshift/conformance/serial]"

/verified by @hongkailiu

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.

@hongkailiu

Copy link
Copy Markdown
Member Author

/test e2e-gcp-ovn

1 similar comment
@hongkailiu

Copy link
Copy Markdown
Member Author

/test e2e-gcp-ovn

@hongkailiu

Copy link
Copy Markdown
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 Jul 30, 2026
@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DavidHurta, hongkailiu

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:

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 lgtm Indicates that a PR is ready to be merged. label Jul 30, 2026
@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@hongkailiu: 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-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 2422d0e into openshift:main Jul 30, 2026
22 checks passed
openshift-merge-bot Bot added a commit that referenced this pull request Jul 31, 2026
TRT-2869: Revert #31440 "NO-JIRA: Re-enable tests for the recommend cmd if alertsByCVO"
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/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants