Skip to content

docs(kwok): add prerequisites and fix copy-paste pitfalls#709

Merged
mchmarny merged 2 commits into
NVIDIA:mainfrom
arun-gupta:feat/local-kwok-testing
Apr 28, 2026
Merged

docs(kwok): add prerequisites and fix copy-paste pitfalls#709
mchmarny merged 2 commits into
NVIDIA:mainfrom
arun-gupta:feat/local-kwok-testing

Conversation

@arun-gupta

Copy link
Copy Markdown
Contributor

Summary

Improve kwok/README.md to be self-contained and usable from a fresh setup — adding prerequisites, fixing copy-paste pitfalls, and linking out to the CLI reference instead of duplicating it.

Motivation / Context

The existing README assumed tools were already installed and commands were run from the right directory. First-time users hit avoidable errors before getting to the actual KWOK workflow.

Fixes: N/A
Related: N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • Docs/examples (docs/, examples/)

Changes

  • Added Prerequisites section: kind, ctlptl, helm, yq, goreleaser, Docker Desktop
  • Clarified that kwok/kwokctl binaries are not required (KWOK controller is applied via kubectl)
  • Added unset GITLAB_TOKEN warning before make build
  • Added repo root note so users don't run make from kwok/
  • Split Quick Start into distinct operations to prevent unintended copy-paste execution
  • Removed inline comments from code blocks (zsh interprets them unexpectedly when pasting blocks)
  • Replaced a redundant local CLI section with a single link to docs/user/cli-reference.md

Testing

Validated end-to-end on Apple Silicon Mac:

  • make build — binary built into dist/
  • make kwok-e2e RECIPE=h100-eks-ubuntu-training-kubeflow — 35 pods scheduled across 2 system nodes and 4 fake H100 GPU nodes, all passing

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert

Rollout notes: N/A — docs only, no functional changes.

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

- Add Prerequisites section listing required tools (kind, ctlptl, helm,
  yq, goreleaser) and Docker Desktop requirement
- Clarify kwok/kwokctl binaries are not needed; KWOK controller is
  applied via kubectl in make kwok-cluster
- Add GITLAB_TOKEN warning before make build
- Add repo root note so users don't run make from kwok/ subdirectory
- Split Quick Start into distinct operations to avoid unintended
  copy-paste execution of multiple targets
- Remove inline comments from code blocks (zsh interprets them
  unexpectedly when pasting blocks)
- Replace redundant local CLI section with link to docs/user/cli-reference.md

Validated on Apple Silicon Mac: make kwok-e2e RECIPE=h100-eks-ubuntu-training-kubeflow
passes with 35 pods scheduled across 2 system nodes and 4 fake H100 GPU nodes.

Signed-off-by: Arun Gupta <[email protected]>
@arun-gupta arun-gupta requested a review from a team as a code owner April 28, 2026 19:12
@copy-pr-bot

copy-pr-bot Bot commented Apr 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The kwok/README.md file is updated with a new prerequisites section detailing explicit tool installation steps and environment requirements. The Quick Start instructions are restructured to clarify that make commands must be executed from the repository root. The documentation now prominently specifies that GITLAB_TOKEN must be unset before running make build, with this instruction added in multiple locations including the build/test command sequences and the "Adding Recipes" section. The previous combined make command block is replaced with more granular, clearly labeled build and test instruction blocks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding a prerequisites section and fixing copy-paste pitfalls in the kwok README documentation.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about improving the kwok README for first-time users with prerequisites, copy-paste fixes, and other usability improvements.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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 the current code and only fix it if needed.

Inline comments:
In `@kwok/README.md`:
- Around line 29-48: Add blank lines before and after each fenced code block in
the "Quick Start" section of README.md so the Markdown renders correctly;
specifically ensure there's an empty line between the preceding paragraph or
heading (e.g., the "Build", "Test a single recipe:", and "Test all recipes:"
lines) and the starting ```bash fence, and an empty line after the closing ```
fence before the next paragraph or heading.
- Around line 23-25: Remove the blank line between the two consecutive
blockquotes in README.md to satisfy MD028: place the `**Note:** The `kwok` and
`kwokctl` binaries...` blockquote immediately above the `**Note:** If
`GITLAB_TOKEN`...` blockquote with no empty line between them (or alternatively
merge both notes into a single blockquote containing two paragraphs) so the
linter no longer flags a blank line between blockquotes.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 52d212be-1e09-4178-92bb-cb2d04c46ef9

📥 Commits

Reviewing files that changed from the base of the PR and between 8ffea23 and a9b5097.

📒 Files selected for processing (1)
  • kwok/README.md

Comment thread kwok/README.md
Comment on lines +23 to +25
> **Note:** The `kwok` and `kwokctl` binaries are not required — the KWOK controller is installed into the cluster automatically by `make kwok-cluster` via `kubectl apply`.

> **Note:** If `GITLAB_TOKEN` is set in your environment, `make build` will fail. Always run `unset GITLAB_TOKEN` before building.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Address blank line between consecutive blockquotes.

Markdown linting (MD028) flags the blank line between these two blockquote notes. While the current structure is readable, standard Markdown style prefers no blank lines between consecutive blockquotes.

📝 Proposed fix to remove blank line between blockquotes
 > **Note:** The `kwok` and `kwokctl` binaries are not required — the KWOK controller is installed into the cluster automatically by `make kwok-cluster` via `kubectl apply`.
-
 > **Note:** If `GITLAB_TOKEN` is set in your environment, `make build` will fail. Always run `unset GITLAB_TOKEN` before building.

Alternatively, you could combine them into a single blockquote with multiple paragraphs:

-> **Note:** The `kwok` and `kwokctl` binaries are not required — the KWOK controller is installed into the cluster automatically by `make kwok-cluster` via `kubectl apply`.
+> **Note:** 
+> - The `kwok` and `kwokctl` binaries are not required — the KWOK controller is installed into the cluster automatically by `make kwok-cluster` via `kubectl apply`.
+> - If `GITLAB_TOKEN` is set in your environment, `make build` will fail. Always run `unset GITLAB_TOKEN` before building.
 
-> **Note:** If `GITLAB_TOKEN` is set in your environment, `make build` will fail. Always run `unset GITLAB_TOKEN` before building.
-
 Before running KWOK tests, use `aicr recipe`, `aicr query`, and `aicr bundle` to generate and inspect configuration without a cluster. See the [CLI reference](../docs/user/cli-reference.md) for details.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> **Note:** The `kwok` and `kwokctl` binaries are not required — the KWOK controller is installed into the cluster automatically by `make kwok-cluster` via `kubectl apply`.
> **Note:** If `GITLAB_TOKEN` is set in your environment, `make build` will fail. Always run `unset GITLAB_TOKEN` before building.
> **Note:** The `kwok` and `kwokctl` binaries are not required — the KWOK controller is installed into the cluster automatically by `make kwok-cluster` via `kubectl apply`.
> **Note:** If `GITLAB_TOKEN` is set in your environment, `make build` will fail. Always run `unset GITLAB_TOKEN` before building.
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 24-24: Blank line inside blockquote

(MD028, no-blanks-blockquote)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kwok/README.md` around lines 23 - 25, Remove the blank line between the two
consecutive blockquotes in README.md to satisfy MD028: place the `**Note:** The
`kwok` and `kwokctl` binaries...` blockquote immediately above the `**Note:** If
`GITLAB_TOKEN`...` blockquote with no empty line between them (or alternatively
merge both notes into a single blockquote containing two paragraphs) so the
linter no longer flags a blank line between blockquotes.

Comment thread kwok/README.md
Comment on lines 29 to 48
## Quick Start

All `make` commands must be run from the **repo root**. Run `cd /path/to/aicr` first, then:

**Build** (one-time, or after code changes):
```bash
unset GITLAB_TOKEN
make build
```

**Test a single recipe:**
```bash
make build # Build aicr binary
make kwok-test-all # Test all recipes (serial)
make kwok-test-all-parallel # Test all recipes (parallel, faster)
make kwok-e2e RECIPE=h100-eks-ubuntu-training-kubeflow # Test single recipe
make kwok-e2e RECIPE=h100-eks-ubuntu-training-kubeflow
```

**Test all recipes:**
```bash
make kwok-test-all
make kwok-test-all-parallel
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add blank lines before fenced code blocks per Markdown best practices.

The Quick Start section is well-structured and clearly separates build from test operations. However, fenced code blocks should be surrounded by blank lines for proper Markdown formatting.

📝 Proposed fix to add blank lines before code blocks
 **Build** (one-time, or after code changes):
+
 ```bash
 unset GITLAB_TOKEN
 make build

Test a single recipe:
+

make kwok-e2e RECIPE=h100-eks-ubuntu-training-kubeflow

Test all recipes:
+

make kwok-test-all
make kwok-test-all-parallel
</details>


The operational flow is clear and the separation of build/test steps helps prevent copy-paste errors.

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
## Quick Start

All `make` commands must be run from the **repo root**. Run `cd /path/to/aicr` first, then:

**Build** (one-time, or after code changes):

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 34-34: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 40-40: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


[warning] 45-45: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@kwok/README.md` around lines 29 - 48, Add blank lines before and after each
fenced code block in the "Quick Start" section of README.md so the Markdown
renders correctly; specifically ensure there's an empty line between the
preceding paragraph or heading (e.g., the "Build", "Test a single recipe:", and
"Test all recipes:" lines) and the starting ```bash fence, and an empty line
after the closing ``` fence before the next paragraph or heading.

@mchmarny mchmarny left a comment

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.

Useful onboarding cleanup. The relative link to ../docs/user/cli-reference.md resolves, the make kwok-cluster/kwok-e2e/kwok-test-all targets in the Makefile match the README claims, and the unset GITLAB_TOKEN guidance lines up with the project's documented goreleaser quirk. Splitting the Quick Start block (so a paste doesn't inadvertently run all three flavors) is a nice touch.

Brew-only install instructions are Mac-specific; that matches the validation context the author called out, and broader OS coverage belongs in the top-level docs. LGTM.

@mchmarny mchmarny merged commit c7c3154 into NVIDIA:main Apr 28, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants