Skip to content

fix: use correct --type flag for brev create command#477

Closed
franknvda1 wants to merge 1 commit into
NVIDIA:mainfrom
franknvda1:fix/frankr-deploy_flag
Closed

fix: use correct --type flag for brev create command#477
franknvda1 wants to merge 1 commit into
NVIDIA:mainfrom
franknvda1:fix/frankr-deploy_flag

Conversation

@franknvda1

@franknvda1 franknvda1 commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

The --gpu flag is not a valid brev CLI option; replaced with --type to match the current brev CLI API.

Summary

Related Issue

Changes

Type of Change

  • Code change for a new feature, bug fix, or refactor.
  • Code change with doc updates.
  • Doc only. Prose changes without code sample modifications.
  • Doc only. Includes code sample changes.

Testing

  • make check passes.
  • npm test passes.
  • make docs builds without warnings. (for doc-only changes)

Checklist

General

Code Changes

  • make format applied (TypeScript and Python).
  • Tests added or updated for new or changed behavior.
  • No secrets, API keys, or credentials committed.
  • Doc pages updated for any user-facing behavior changes (new commands, changed defaults, new features, bug fixes that contradict existing docs).

Doc Changes

  • Follows the style guide. Try running the update-docs agent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docs catch up the docs for the new changes I made in this PR."
  • New pages include SPDX license header and frontmatter, if creating a new page.
  • Cross-references and links verified.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the instance creation parameter in the deployment process to properly specify instance types.

The --gpu flag is not a valid brev CLI option; replaced with --type
to match the current brev CLI API.
@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The deploy function in the Brev CLI tool updates the instance creation command, changing the GPU specification flag from --gpu to --type. All other deployment operations remain unchanged.

Changes

Cohort / File(s) Summary
Brev Deploy Configuration
bin/nemoclaw.js
Updated the brev instance creation command to use --type flag instead of --gpu flag when specifying GPU type during deployment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A flag was switched with careful paw,
From --gpu to --type we saw,
The deploy still hops with grace so true,
One little change, the code feels new! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main change: fixing the brev create command to use --type flag instead of --gpu flag.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bin/nemoclaw.js`:
- Line 130: The command injection risk comes from interpolating untrusted
variables into a shell string in the run(...) call; update the code that invokes
run(`brev create ${name} --type "${gpu}"`) to avoid shell interpolation by using
a safe API that accepts the executable and argument list (e.g., spawn/execFile)
or by validating/whitelisting inputs first; specifically, validate/whitelist gpu
values (e.g., allowed types) and sanitize/validate name (reject or escape
dangerous chars) and then call the subprocess with separate args rather than a
single interpolated string so the shell cannot interpret injected
operators—locate the run invocation in bin/nemoclaw.js and replace it with a
safe argument-based invocation using the validated variables.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 93687f3b-a3c1-40be-8101-3d3169337f70

📥 Commits

Reviewing files that changed from the base of the PR and between dbfd78c and 56ec36f.

📒 Files selected for processing (1)
  • bin/nemoclaw.js

Comment thread bin/nemoclaw.js
@psorensen-nvidia psorensen-nvidia added platform: brev Affects Brev hosted development environments status: triage labels Mar 20, 2026
@wscurran wscurran added good first issue Small, clear, safe task for new contributors fix and removed status: triage labels Mar 30, 2026
@wscurran

Copy link
Copy Markdown
Contributor

✨ Thanks for submitting this PR with a clear fix, it addresses an issue with the brev create command and proposes a fix to improve the Brev platform integration, which could make it easier for users to get started with NemoClaw on Brev.

@wscurran

Copy link
Copy Markdown
Contributor

Thanks for catching this — the --gpu flag was indeed incorrect. The fix is already in the codebase: src/lib/deploy.ts on main uses --type for the brev create call. Closing as superseded.

@wscurran wscurran closed this Apr 14, 2026
@wscurran wscurran added bug-fix PR fixes a bug or regression and removed fix labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PR fixes a bug or regression good first issue Small, clear, safe task for new contributors platform: brev Affects Brev hosted development environments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants