Skip to content

chore(docs): add a section to avoid oc binary download#486

Merged
dbasunag merged 1 commit intoopendatahub-io:mainfrom
jstourac:ocBinaryReadme
Aug 4, 2025
Merged

chore(docs): add a section to avoid oc binary download#486
dbasunag merged 1 commit intoopendatahub-io:mainfrom
jstourac:ocBinaryReadme

Conversation

@jstourac
Copy link
Copy Markdown
Member

@jstourac jstourac commented Aug 4, 2025

Description

How Has This Been Tested?

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@jstourac jstourac requested a review from a team as a code owner August 4, 2025 13:50
@jstourac jstourac self-assigned this Aug 4, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 4, 2025

The following are automatically added/executed:

  • PR size label.
  • Run pre-commit
  • Run tox
  • Add PR author as the PR assignee
  • Build image based on the PR

Available user actions:

  • To mark a PR as WIP, add /wip in a comment. To remove it from the PR comment /wip cancel to the PR.
  • To block merging of a PR, add /hold in a comment. To un-block merging of PR comment /hold cancel.
  • To mark a PR as approved, add /lgtm in a comment. To remove, add /lgtm cancel.
    lgtm label removed on each new commit push.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
  • To Cherry-pick a merged PR /cherry-pick <target_branch_name> to the PR. If <target_branch_name> is valid,
    and the current PR is merged, a cherry-picked PR would be created and linked to the current PR.
  • To build and push image to quay, add /build-push-pr-image in a comment. This would create an image with tag
    pr-<pr_number> to quay repository. This image tag, however would be deleted on PR merge or close action.
Supported labels

{'/cherry-pick', '/build-push-pr-image', '/hold', '/verified', '/wip', '/lgtm'}

Copy link
Copy Markdown
Member

@jiridanek jiridanek left a comment

Choose a reason for hiding this comment

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

feels overly verbose to me, but the information is very useful

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 4, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a new section detailing how the OpenShift CLI (oc) binary is managed by the test framework.
    • Provided instructions for using a locally installed oc binary, including environment variable setup and compatibility notes.
    • Highlighted benefits of using a local binary, such as improved speed and suitability for restricted environments.

Walkthrough

A new section was added to the documentation, detailing how to configure the test framework to use a locally installed OpenShift CLI (oc) binary instead of downloading it automatically. The section provides setup instructions, usage notes, and outlines the advantages of using a local binary.

Changes

Cohort / File(s) Change Summary
Documentation Update
docs/GETTING_STARTED.md
Added a section describing the use of a local oc binary for the test framework, including configuration steps, usage notes, and benefits.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

commented-by-adolfo-ab


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47cde76 and 31445ef.

📒 Files selected for processing (1)
  • docs/GETTING_STARTED.md (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jiridanek
Copy link
Copy Markdown
Member

@coderabbitai suggest a rewrite that will shorten the added OC_BINARY_PATH docs by half

@dbasunag dbasunag merged commit 1aba6d3 into opendatahub-io:main Aug 4, 2025
8 of 9 checks passed
@jstourac jstourac deleted the ocBinaryReadme branch August 4, 2025 14:20
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 4, 2025

Status of building tag latest: success.
Status of pushing tag latest to image registry: success.

@jiridanek
Copy link
Copy Markdown
Member

@coderabbitai suggest a rewrite that will shorten the added OC_BINARY_PATH docs by half

Comment thread docs/GETTING_STARTED.md
Comment on lines +24 to +48
## 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
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.

@coderabbitai suggest a rewrite that will shorten the added OC_BINARY_PATH docs by half

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Note: 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 -->

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.

make it only as long as it needs to be, assume a competent quality engineer reads the docs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Ensure 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 -->

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 4, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read the current documentation file to see the added OC_BINARY_PATH section
cat docs/GETTING_STARTED.md

Length of output: 3704


@jiridanek Here's a rewrite that shortens the OC_BINARY_PATH documentation by approximately half:

## 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 pytest

Note: Ensure your local binary is executable and cluster-compatible.


This version:
- Reduces the content from ~200 words to ~50 words
- Combines the explanation and usage instructions
- Keeps one comprehensive code example instead of two separate ones
- Removes the verbose benefits section
- Maintains all essential information about functionality and usage

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants