chore(docs): add a section to avoid oc binary download#486
chore(docs): add a section to avoid oc binary download#486dbasunag merged 1 commit intoopendatahub-io:mainfrom
Conversation
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/cherry-pick', '/build-push-pr-image', '/hold', '/verified', '/wip', '/lgtm'} |
jiridanek
left a comment
There was a problem hiding this comment.
feels overly verbose to me, but the information is very useful
|
Caution Review failedThe pull request is closed. 📝 WalkthroughSummary by CodeRabbit
WalkthroughA new section was added to the documentation, detailing how to configure the test framework to use a locally installed OpenShift CLI ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
@coderabbitai suggest a rewrite that will shorten the added |
|
Status of building tag latest: success. |
|
@coderabbitai suggest a rewrite that will shorten the added OC_BINARY_PATH docs by half |
| ## OpenShift CLI (oc) Binary | ||
|
|
||
| By default, the test framework automatically downloads the OpenShift CLI binary from the target cluster's console CLI download service. This ensures compatibility between the client and cluster versions. | ||
|
|
||
| ### Using a Local oc Binary | ||
|
|
||
| If you already have the `oc` binary installed locally, you can avoid the download by setting the `OC_BINARY_PATH` environment variable: | ||
|
|
||
| ```bash | ||
| export OC_BINARY_PATH=/usr/local/bin/oc | ||
| ``` | ||
|
|
||
| Or run tests with the variable: | ||
|
|
||
| ```bash | ||
| OC_BINARY_PATH=/usr/local/bin/oc uv run pytest | ||
| ``` | ||
|
|
||
| **Note:** Ensure your local `oc` binary is executable and compatible with your target cluster version. | ||
|
|
||
| ### Benefits of Using Local Binary | ||
|
|
||
| - Faster test startup (no download time) | ||
| - Consistent tooling across different test runs | ||
| - Useful in air-gapped environments or when internet access is limited |
There was a problem hiding this comment.
@coderabbitai suggest a rewrite that will shorten the added OC_BINARY_PATH docs by half
There was a problem hiding this comment.
@jiridanek, here's a condensed version that cuts the documentation roughly in half:
## OpenShift CLI (oc) Binary
By default, the test framework downloads the OpenShift CLI binary from the target cluster. To use a local `oc` binary instead, set the `OC_BINARY_PATH` environment variable:
```bash
export OC_BINARY_PATH=/usr/local/bin/oc
# Or run inline:
OC_BINARY_PATH=/usr/local/bin/oc uv run pytestNote: Ensure your local oc binary is executable and compatible with your target cluster version.
Benefits: faster test startup, consistent tooling, and useful for air-gapped environments.
This reduces the section from 26 lines to 13 lines while preserving the essential information about setting the environment variable, compatibility requirements, and key benefits.
<!-- This is an auto-generated reply by CodeRabbit -->
There was a problem hiding this comment.
make it only as long as it needs to be, assume a competent quality engineer reads the docs
There was a problem hiding this comment.
@jiridanek, here's the minimal version for competent quality engineers:
## OpenShift CLI (oc) Binary
To use a local `oc` binary instead of auto-download, set `OC_BINARY_PATH`:
```bash
export OC_BINARY_PATH=/usr/local/bin/oc
# Or: OC_BINARY_PATH=/usr/local/bin/oc uv run pytestEnsure binary compatibility with target cluster version.
This cuts it down to just 7 lines, covering only the essential "how-to" and compatibility requirement that a quality engineer needs to know.
---
<details>
<summary>🧠 Learnings used</summary>
Learnt from: dbasunag
PR: #338
File: tests/model_registry/rbac/test_mr_rbac.py:24-53
Timestamp: 2025-06-06T12:22:57.057Z
Learning: In the opendatahub-tests repository, prefer keeping test parameterization configurations inline rather than extracting them to separate variables/constants, as it makes triaging easier by avoiding the need to jump between different parts of the file to understand the test setup.
</details>
<!-- This is an auto-generated reply by CodeRabbit -->
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 3704 @jiridanek Here's a rewrite that shortens the ## OpenShift CLI (oc) Binary
By default, the test framework downloads the OpenShift CLI binary from the target cluster to ensure version compatibility. To use a local `oc` binary instead, set the `OC_BINARY_PATH` environment variable:
```bash
export OC_BINARY_PATH=/usr/local/bin/oc
# or inline
OC_BINARY_PATH=/usr/local/bin/oc uv run pytestNote: Ensure your local binary is executable and cluster-compatible. |
Description
How Has This Been Tested?
Merge criteria: