docs(admin-cli): clarify expected machine option behavior - #4898
Conversation
|
@coderabbitai full_review, thanks! |
Summary by CodeRabbit
WalkthroughThe pull request updates expected machine add and patch CLI help text. It clarifies pause behavior, DPF defaults and preservation, BMC IP allocation scope, and interface replacement semantics. Parsing and conversion behavior remain unchanged. ChangesExpected Machine CLI Help
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🐇 ✅ Action performedFull review finished. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/admin-cli/src/expected_machines/add/args.rs (1)
154-162: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRegenerate the expected-machine reference pages.
The
after_long_helpexamples exist in bothArgsstructs, but both committed Markdown pages lack theEXAMPLES:sections and still contain stale help text. Regenerate the add and patch pages.🤖 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 `@crates/admin-cli/src/expected_machines/add/args.rs` around lines 154 - 162, Regenerate the expected-machine reference Markdown pages from both Args structs so they include the existing after_long_help EXAMPLES sections and current help text. Apply this to crates/admin-cli/src/expected_machines/add/args.rs lines 154-162 and 193, and crates/admin-cli/src/expected_machines/patch/args.rs lines 171-179, 213, and 222; update the corresponding add and patch committed Markdown pages, with no direct source change required at these sites.Sources: Coding guidelines, Path instructions
🤖 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.
Nitpick comments:
In `@crates/admin-cli/src/expected_machines/add/args.rs`:
- Around line 154-162: Regenerate the expected-machine reference Markdown pages
from both Args structs so they include the existing after_long_help EXAMPLES
sections and current help text. Apply this to
crates/admin-cli/src/expected_machines/add/args.rs lines 154-162 and 193, and
crates/admin-cli/src/expected_machines/patch/args.rs lines 171-179, 213, and
222; update the corresponding add and patch committed Markdown pages, with no
direct source change required at these sites.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2ecfb887-a706-4f95-8e79-23d8343e14f1
📒 Files selected for processing (2)
crates/admin-cli/src/expected_machines/add/args.rscrates/admin-cli/src/expected_machines/patch/args.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@crates/admin-cli/src/expected_machines/add/args.rs`:
- Around line 154-162: Regenerate the expected-machine reference pages using the
repository’s gen-cli-docs task with the Bookworm/Pandoc toolchain, ensuring all
eight add examples and seven patch examples are included. Commit the resulting
updates to both generated reference pages without modifying the Rust help
definitions.
🪄 Autofix
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: CHILL
Plan: Enterprise
Run ID: dcb2fd1e-81df-46c7-a079-6bd02416c76b
📒 Files selected for processing (2)
crates/admin-cli/src/expected_machines/add/args.rscrates/admin-cli/src/expected_machines/patch/args.rs
| help = "Initial pause state applied when the BMC endpoint for this machine is first explored. `true` pauses ingestion and automatic power-on; `false` pauses neither. Defaults to `false`." | ||
| )] | ||
| default_pause_ingestion_and_poweron: Option<bool>, | ||
|
|
||
| #[clap( | ||
| long, | ||
| action = clap::ArgAction::Set, | ||
| value_name = "DPF_ENABLED", | ||
| help = "DPF enable/disable for this machine. Default is updated as true.", | ||
| help = "Whether DPF is enabled for this machine. Defaults to true.", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
for file in \
crates/admin-cli/src/expected_machines/add/args.rs \
crates/admin-cli/src/expected_machines/patch/args.rs
do
echo "== $file =="
rg -n -B8 -A8 'after_long_help|EXAMPLES:|struct Args' "$file"
done
fd -t f . | rg 'expected-machine-(add|patch)\.(md|roff)$'Repository: NVIDIA/infra-controller
Length of output: 3490
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== add help block =="
sed -n '28,75p' crates/admin-cli/src/expected_machines/add/args.rs
echo "== patch help block =="
sed -n '52,92p' crates/admin-cli/src/expected_machines/patch/args.rs
echo "== generated add page =="
sed -n '1,180p' docs/manuals/nico-admin-cli/commands/expected-machine/expected-machine-add.md
echo "== generated patch page =="
sed -n '1,180p' docs/manuals/nico-admin-cli/commands/expected-machine/expected-machine-patch.md
echo "== documentation generation references =="
rg -n -i 'bookworm|pandoc|clap_mangen|expected-machine-(add|patch)|nico-admin-cli' \
Makefile* justfile* .github scripts docs crates 2>/dev/null | head -250Repository: NVIDIA/infra-controller
Length of output: 48024
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== documentation generation task =="
sed -n '100,132p' Makefile.toml
echo "== CLI documentation generator references =="
rg -n -C3 'generate-cli-docs|after_long_help|long_help|Examples|examples' crates/admin-cli/src crates/admin-cli/Cargo.toml
echo "== tracked documentation status =="
git status --short -- \
crates/admin-cli/src/expected_machines/add/args.rs \
crates/admin-cli/src/expected_machines/patch/args.rs \
docs/manuals/nico-admin-cli/commands/expected-machine/expected-machine-add.md \
docs/manuals/nico-admin-cli/commands/expected-machine/expected-machine-patch.mdRepository: NVIDIA/infra-controller
Length of output: 50382
Regenerate the expected-machine reference pages.
The Rust help blocks contain eight add examples and seven patch examples, but the generated pages contain only four examples each. Run the repository’s gen-cli-docs task with the Bookworm/Pandoc toolchain and commit both updated pages.
🤖 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 `@crates/admin-cli/src/expected_machines/add/args.rs` around lines 154 - 162,
Regenerate the expected-machine reference pages using the repository’s
gen-cli-docs task with the Bookworm/Pandoc toolchain, ensuring all eight add
examples and seven patch examples are included. Commit the resulting updates to
both generated reference pages without modifying the Rust help definitions.
Sources: Path instructions, Learnings
Keep Expected Machine help grammatical in both the live CLI and generated reference pages. Rephrase wording that loses apostrophes during the roff-to-Markdown conversion, and distinguish initial pause and DPF behavior between add and patch. This supports NVIDIA#4894 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pull-request-4898.docs.buildwithfern.com/infra-controller |
Keep Expected Machine help grammatical in both the live CLI and generated reference pages.
The roff-to-Markdown conversion drops apostrophes, so phrases such as
machine'srender incorrectly. This rephrases those options without apostrophes and documents the actual initial-only pause semantics plus the different DPF behavior for add and patch.Related issues
Type of Change
Breaking Changes
Testing
Additional Notes
Verified the live
nico-admin-cli expected-machine add --helpandpatch --helpcontracts, then rendered the affected pages through the Bookworm roff/Pandoc pipeline. The generated reference updates remain isolated in the docs-only #4418 PR.Validation also included nightly formatting, full workspace Clippy, custom Carbide lints, and the focused
nico-admin-clitests.