Skip to content

Commit 8a6043d

Browse files
feat(nodes): accept undocumented --enable-infiniband flag on sf nodes 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>
1 parent 6e5bd5e commit 8a6043d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/lib/nodes/create.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ const create = new Command("create")
135135
"ID of the VM image to boot on the nodes. View available images with `sf node images list`.",
136136
),
137137
)
138+
.addOption(
139+
// Hidden experimental flag. Requires the (account, instance SKU) pair to
140+
// be in the IB whitelist server-side; otherwise the request is rejected
141+
// with 403. Kept undocumented while the field is in preview.
142+
new Option(
143+
"--enable-infiniband",
144+
"Enable InfiniBand on the nodes (experimental, undocumented).",
145+
).hideHelp(),
146+
)
138147
.addOption(yesOption)
139148
.addOption(jsonOption)
140149
.hook("preAction", (command) => {
@@ -274,6 +283,7 @@ async function createNodesAction(
274283
cloud_init_user_data: encodedUserData,
275284
image_id: options.image,
276285
node_type: isReserved ? "reserved" : "autoreserved",
286+
...(options.enableInfiniband ? { _preview_enable_infiniband: true } : {}),
277287
};
278288

279289
if (isReserved) {

0 commit comments

Comments
 (0)