-
Notifications
You must be signed in to change notification settings - Fork 453
OTA-1814: docs(alerts): README updates for #2279 #2296
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,20 +1,30 @@ | ||||||
| # 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` | ||||||
|
|
||||||
| * `TESTCASE-cv.yaml` (input): ClusterVersion object (created by `oc get clusterversion version -o yaml`). Lists are also supported. | ||||||
| * `TESTCASE.output` (output): expected output of `oc adm upgrade recommend`. | ||||||
| * `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** | ||||||
| --- | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: We would not need a divider line here if we use |
||||||
| * `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`) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, Trevor did not use this command directly in 26ec958
Suggested change
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). |
||||||
|
|
||||||
| **OUTPUTS** | ||||||
| --- | ||||||
| * `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>`. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Use The command contract in 🤖 Prompt for AI Agents |
||||||
|
|
||||||
| The `TestExamples` test in [`examples_test.go`](../examples_test.go) file above validates all examples. | ||||||
| When the testcase is executed with a non-empty `UPDATE` environmental variable, it will update the `TESTCASE.out` fixture: | ||||||
|
|
||||||
| **TESTING** | ||||||
| --- | ||||||
| * 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/... | ||||||
| ``` | ||||||
|
Comment on lines
+22
to
25
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
🧰 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 |
||||||
|
|
||||||
| You can also pass the inputs to the `oc adm upgrade recommend` directly: | ||||||
| * You can also pass the inputs to the `oc adm upgrade recommend` directly: | ||||||
|
|
||||||
| ```console | ||||||
| $ oc adm upgrade recommend --mock-clusterversion=4.14.1-all-recommended-cv.yaml | ||||||
|
|
||||||
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.