Skip to content

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

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
nbottari9:1814-readme-update
Jul 21, 2026
Merged

OTA-1814: docs(alerts): README updates for #2279#2296
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
nbottari9:1814-readme-update

Conversation

@nbottari9

@nbottari9 nbottari9 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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, with improved guidance on required vs. optional files.
    • 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

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: f36e8be2-2dc8-44d0-9a6c-66c96d6d9691

📥 Commits

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

📒 Files selected for processing (1)
  • pkg/cli/admin/upgrade/recommend/examples/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/cli/admin/upgrade/recommend/examples/README.md

Walkthrough

This PR restructures the oc adm upgrade recommend examples README to clarify testcase inputs, expected outputs, and fixture testing guidance without changing code behavior.

Changes

Recommend examples documentation

Layer / File(s) Summary
Restructure testcase guidance
pkg/cli/admin/upgrade/recommend/examples/README.md
Anchors examples on <test-case>-cv.yaml, separates INPUTS and OUTPUTS, documents optional input files and supported formats, and reformats TESTING instructions.

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

Suggested reviewers: atiratree, tchap

🚥 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 relevant and accurately signals a README documentation update related to alerts and issue #2279.
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 Only a README was changed; no Ginkgo test titles (It/Describe/Context/When) were added or modified.
Test Structure And Quality ✅ Passed PR only changes a README and no test code, so the Ginkgo test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed Only a README changed; no Ginkgo tests or runtime code were added or modified, so MicroShift compatibility is not impacted.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only updates README.md; diff shows no Go test files or new Ginkgo specs, so there are no SNO compatibility concerns.
Topology-Aware Scheduling Compatibility ✅ Passed Only a README was changed; no manifests, controllers, or scheduling logic were modified.
Ote Binary Stdout Contract ✅ Passed Only README changed; no source code, init/main/suite setup, or stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only a README changed; no new Ginkgo/e2e tests or network/IP-sensitive code was added, so the check is not applicable.
No-Weak-Crypto ✅ Passed Only pkg/cli/admin/upgrade/recommend/examples/README.md changed; no crypto code, weak algorithms, or secret comparisons were introduced.
Container-Privileges ✅ Passed Only pkg/cli/admin/upgrade/recommend/examples/README.md changed; no container/K8s manifests or privilege fields were modified.
No-Sensitive-Data-In-Logs ✅ Passed PR only edits README docs; no logging code, secrets, tokens, PII, or sensitive hostnames were added.
✨ 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

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

Comment thread pkg/cli/admin/upgrade/recommend/examples/README.md Outdated
Comment thread pkg/cli/admin/upgrade/recommend/examples/README.md Outdated
* `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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What change should be made here?

Signed-off-by: Nicholas Bottari <nbottari9@gmail.com>
@hongkailiu

Copy link
Copy Markdown
Member

/lgtm

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jul 14, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2026
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2026
@nbottari9

Copy link
Copy Markdown
Contributor Author

/retest

@hongkailiu

Copy link
Copy Markdown
Member

@nbottari9

Copy link
Copy Markdown
Contributor Author

/verified bypass

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

Copy link
Copy Markdown

@nbottari9: The verified label has been added.

Details

In response to this:

/verified bypass

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.

@nbottari9

Copy link
Copy Markdown
Contributor Author

/test images

@openshift-ci

openshift-ci Bot commented Jul 21, 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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 29ec221 into openshift:main Jul 21, 2026
17 checks passed
@nbottari9
nbottari9 deleted the 1814-readme-update branch July 21, 2026 20:26
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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. 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