Skip to content

feat(nodes): accept undocumented --enable-infiniband flag on sf nodes create#263

Closed
sigmachirality wants to merge 1 commit into
indent-2026-05-15-bump-nodes-sdk-alpha-29from
indent-2026-05-15-enable-infiniband-flag
Closed

feat(nodes): accept undocumented --enable-infiniband flag on sf nodes create#263
sigmachirality wants to merge 1 commit into
indent-2026-05-15-bump-nodes-sdk-alpha-29from
indent-2026-05-15-enable-infiniband-flag

Conversation

@sigmachirality
Copy link
Copy Markdown
Member

Summary

Adds a hidden --enable-infiniband flag to sf nodes create that pipes through to _preview_enable_infiniband: true on the create call. The flag is fully functional but never shown in --help output, parent help, or generated man pages — matching the Rust sf-cli's hide = true treatment of the same flag.

Stacked on #262 (depends on @sfcompute/nodes-sdk-alpha@0.1.0-alpha.31 which introduces _preview_enable_infiniband on NodeCreateParams).

Motivation

SYS-691 wired the InfiniBand opt-in end-to-end through the API, gated server-side by an (account, instance SKU) whitelist row. The Rust sf-cli already exposes it as a hidden flag; this PR brings the TypeScript CLI to parity so internal/whitelisted callers can use sf nodes create --enable-infiniband without going through the lower-level Rust binary. Non-whitelisted callers get a 403 from the server — no client-side preflight needed.

The flag is kept hidden because the wire field is in the _preview_ namespace and the convention is to not advertise preview surfaces externally (per sfcompute/sfcompute#5694).

Description of changes

src/lib/nodes/create.ts:

  • New Option("--enable-infiniband") with .hideHelp() so it doesn't appear in any rendered help text.
  • In createNodesAction, conditionally spread { _preview_enable_infiniband: true } into createParams when the option is set.

That's the entire diff (10 lines added).

Testing

  • bun run check — passes.
  • bun run lint — passes (only the same 9 pre-existing warnings as main).
  • Confirmed Option.hideHelp() actually hides the flag by parsing the command in isolation: --enable-infiniband does not appear in helpInformation() output.

Review Callouts

  1. Problem: Stdint-like internal users need IB-enabled nodes via the public CLI without having to drop down to sf-cli (Rust).
  2. API/CLI/Frontend impact: New CLI flag, intentionally undocumented; no help/man page surface. Wire field is _preview_enable_infiniband (server-side aliased to the older enable_infiniband for one release per sfcompute/sfcompute#5694).
  3. Observability: None.
  4. Unhappy paths: Non-whitelisted accounts get 403 from server. handleNodesError surfaces this to the user as a CLI error.

Open in Indent Slack Thread
Tag @indent to continue the conversation here.

…s create`

Surfaces the experimental InfiniBand opt-in (SYS-691) as a hidden flag,
matching the Rust sf-cli's `hide = true` treatment. When set, the CLI
passes `_preview_enable_infiniband: true` through to the node-api
create call. The field is gated server-side by the IB whitelist
(is_infiniband_whitelisted on the resolved cluster), so callers without
access get a 403 — no client-side preflight needed.

`Option.hideHelp()` keeps the flag fully functional but suppresses it
from `sf nodes create --help`, parent help, and generated man pages, so
the surface stays unadvertised while the preview field is in flux
(sfcompute/sfcompute#5694).

Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented May 20, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  src/lib/nodes/create.ts  5% smaller

@sigmachirality sigmachirality added the indent label May 20, 2026 — with indent
@indent
Copy link
Copy Markdown
Contributor

indent Bot commented May 20, 2026

PR Summary

Adds a hidden, undocumented --enable-infiniband flag to sf nodes create to mirror the Rust sf-cli's experimental InfiniBand opt-in (SYS-691). When set, the CLI passes _preview_enable_infiniband: true through to the nodes SDK; authorization is enforced server-side via the IB whitelist (403 for non-whitelisted callers), so no client-side preflight is added.

  • Adds new Option("--enable-infiniband", ...).hideHelp() in src/lib/nodes/create.ts, keeping the flag functional while suppressing it from --help and man pages.
  • Conditionally spreads _preview_enable_infiniband: true into NodeCreateParams only when the user opts in, omitting the key otherwise rather than sending false.
  • Relies on the typed field already present in @sfcompute/nodes-sdk-alpha@0.1.0-alpha.31 (NodeCreateParams._preview_enable_infiniband?: boolean) — no any casts needed and tsc --noEmit is clean.

Issues

No issues found.

CI Checks

Waiting for CI checks...

@indent
Copy link
Copy Markdown
Contributor

indent Bot commented May 20, 2026

Folding into #262 as a single PR per request.

@indent indent Bot closed this May 20, 2026
@indent indent Bot deleted the indent-2026-05-15-enable-infiniband-flag branch May 20, 2026 21:05
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.

1 participant