Skip to content

OTA-1814: docs(alerts): README updates for #2279#2296

Open
nbottari9 wants to merge 1 commit into
openshift:mainfrom
nbottari9:1814-readme-update
Open

OTA-1814: docs(alerts): README updates for #2279#2296
nbottari9 wants to merge 1 commit into
openshift:mainfrom
nbottari9:1814-readme-update

Conversation

@nbottari9

@nbottari9 nbottari9 commented Jul 2, 2026

Copy link
Copy Markdown

README update for #2279

  • Add missing input description for alerts.json
  • Add new input descriptions for -featuregate.yaml and -infrastructure.yaml
  • Added some more context to README

Summary by CodeRabbit

  • Documentation
    • Reorganized the upgrade recommendation examples README for clearer setup and verification steps.
    • Added explicit INPUTS and OUTPUTS sections, including clearer guidance on optional files and supported input formats.
    • Clarified how to generate alert-related inputs and how to update expected test fixtures.

…d infra. add more context

Signed-off-by: Nicholas Bottari <nbottari9@gmail.com>
@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 2, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 2, 2026

Copy link
Copy Markdown

@nbottari9: This pull request references OTA-1814 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

README update for #2279

  • Add missing input description for alerts.json
  • Add new input descriptions for -featuregate.yaml and -infrastructure.yaml
  • Added some more context to README

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.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Walkthrough

This PR updates the README for oc adm upgrade recommend examples, restructuring content into explicit INPUTS and OUTPUTS sections, clarifying optional input files, and reformatting the TESTING section, without altering any code behavior.

Changes

README restructuring

Layer / File(s) Summary
Restructure INPUTS/OUTPUTS/TESTING sections
pkg/cli/admin/upgrade/recommend/examples/README.md
Introduction updated to describe xxx-cv.yaml anchoring; INPUTS section expanded to clarify optional TESTCASE-featuregate.yaml, TESTCASE-infrastructure.yaml, and TESTCASE-alerts.json, plus list-support notes; OUTPUTS reorganized into its own section; TESTING section reformatted while keeping UPDATE=yes go test -v ... guidance.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the README documentation update and correctly references the alerts context, though it is somewhat broad.
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 PR only updates a README; no Ginkgo It/Describe/Context/When titles were added or changed.
Test Structure And Quality ✅ Passed This PR only updates a README for upgrade examples; no Ginkgo test code or test behavior changed, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed PASS: This PR only updates a README; it adds no new Ginkgo tests or MicroShift-sensitive API usage, so the check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only a README was updated; no Ginkgo e2e tests were added or changed, so SNO compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Docs-only README update for upgrade recommend examples; no deployment manifests, controllers, or scheduling constraints were modified.
Ote Binary Stdout Contract ✅ Passed PR only updates the examples README; no process-level entry points or stdout writes were added in pkg/cli/admin/upgrade/recommend.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only updates a README under examples; no new Ginkgo e2e tests or network/IP-sensitive code were added.
No-Weak-Crypto ✅ Passed PR only updates docs in README; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom secret comparisons appear in the changed examples area.
Container-Privileges ✅ Passed PASS: The PR update is documentation-only in README.md; it contains no manifest fields like privileged, hostPID, hostNetwork, or allowPrivilegeEscalation.
No-Sensitive-Data-In-Logs ✅ Passed PR only updates a README; it adds docs/examples but no logging, credentials, IDs, or customer data exposure.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci openshift-ci Bot requested review from atiratree and tchap July 2, 2026 18:34
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nbottari9
Once this PR has been reviewed and has the lgtm label, please assign davidhurta for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@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

🤖 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/cli/admin/upgrade/recommend/examples/README.md`:
- Around line 22-25: The update instructions reference the wrong fixture name;
the examples in examples_test.go derive output files from the testcase name, not
TESTCASE.out. Update the README text to match the existing fixture naming
contract used by examples_test.go and the related example outputs (for example,
the *.output, *.show-outdated-releases-output, and *.version-<VERSION>-output
patterns) so the documented UPDATE workflow points to the correct generated
files.
- Line 16: The README example uses the wrong CLI flag for the upgrade recommend
command. Update the example in the recommend examples README to reference the
`--version` flag exposed by `recommend.go` instead of `--to`, so the documented
command matches the actual `oc adm upgrade recommend` interface and the
`TESTCASE.version-<VERSION>-output` description stays aligned.
🪄 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: 3738f3cc-4c02-4c31-b88d-18782c5b492b

📥 Commits

Reviewing files that changed from the base of the PR and between a7ad572 and 553dca4.

📒 Files selected for processing (1)
  • pkg/cli/admin/upgrade/recommend/examples/README.md

---
* `TESTCASE.output`: expected output of `oc adm upgrade recommend`.
* `TESTCASE.show-outdated-releases-output`: expected output of `oc adm upgrade recommend --show-outdated-releases`.
* `TESTCASE.version-<VERSION>-output`: expected output of `oc adm upgrade recommend --to <VERSION>`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use --version, not --to.

The command contract in recommend.go exposes --version; --to is not a supported flag, so this example will send readers to the wrong CLI surface.

🤖 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 `@pkg/cli/admin/upgrade/recommend/examples/README.md` at line 16, The README
example uses the wrong CLI flag for the upgrade recommend command. Update the
example in the recommend examples README to reference the `--version` flag
exposed by `recommend.go` instead of `--to`, so the documented command matches
the actual `oc adm upgrade recommend` interface and the
`TESTCASE.version-<VERSION>-output` description stays aligned.

Comment on lines +22 to 25
* When the testcase is executed with a non-empty `UPDATE` environmental variable, it will update the `TESTCASE.out` fixture:
```console
$ UPDATE=yes go test -v ./pkg/cli/admin/upgrade/recommend/...
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix the fixture name in the update instructions.

examples_test.go derives output fixtures from *-cv.yaml, and the outputs in this README are named *.output / *.show-outdated-releases-output / *.version-<VERSION>-output; TESTCASE.out does not match that contract.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 24-24: Dollar signs used before commands without showing output

(MD014, commands-show-output)

🤖 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 `@pkg/cli/admin/upgrade/recommend/examples/README.md` around lines 22 - 25, The
update instructions reference the wrong fixture name; the examples in
examples_test.go derive output files from the testcase name, not TESTCASE.out.
Update the README text to match the existing fixture naming contract used by
examples_test.go and the related example outputs (for example, the *.output,
*.show-outdated-releases-output, and *.version-<VERSION>-output patterns) so the
documented UPDATE workflow points to the correct generated files.

* `TESTCASE.show-outdated-releases-output` (output): expected output of `oc adm upgrade recommend --show-outdated-releases`.
* `TESTCASE.version-<VERSION>-output` (output): expected output of `oc adm upgrade recommend --to <VERSION>`.
**INPUTS**
---

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: We would not need a divider line here if we use ## INPUTS in Line 5.

# Examples for `oc adm upgrade recommend`

Each example consists of inputs and outputs, matched by a common substring:
Each testcase is anchored by an `xxx-cv.yaml`, where `xxx` is a common substring that identifies the testcase. The `-cv.yaml` file describes the ClusterVersion object essential to the functionality of `oc adm upgrade recommend`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
Each testcase is anchored by an `xxx-cv.yaml`, where `xxx` is a common substring that identifies the testcase. The `-cv.yaml` file describes the ClusterVersion object essential to the functionality of `oc adm upgrade recommend`
Each testcase is anchored by a `<test-case>-cv.yaml` file which describes the ClusterVersion object and is essential to the testing of `oc adm upgrade recommend`.

* `TESTCASE-cv.yaml`: ClusterVersion object (required, created by `oc get clusterversion version -o yaml`). Lists are also supported.
* `TESTCASE-featuregate.yaml`: FeatureGate object (optional, created by `oc get featuregate cluster -o yaml`). Lists are NOT supported.
* `TESTCASE-infrastructure.yaml`: Infrastructure object (optional, created by `oc get infrastructure cluster -o yaml`). Lists are NOT supported
* `TESTCASE-alerts.json`: Alerts currently present in the cluster (optional, created by `OC_ENABLE_CMD_INSPECT_ALERTS=true oc adm inspect-alerts`)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting, Trevor did not use this command directly in 26ec958

Suggested change
* `TESTCASE-alerts.json`: Alerts currently present in the cluster (optional, created by `OC_ENABLE_CMD_INSPECT_ALERTS=true oc adm inspect-alerts`)
* `TESTCASE-alerts.json`: Running alerts in the cluster (optional, expected output of `OC_ENABLE_CMD_INSPECT_ALERTS=true oc adm inspect-alerts`)

The wording is from

$ OC_ENABLE_CMD_INSPECT_ALERTS=true oc adm inspect-alerts -h
Collect information about running alerts.

Usage:
  oc adm inspect-alerts [flags] [options]

Use "oc options" for a list of global command-line options (applies to all commands).

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants