From 00ac8d131f4bfe7609754dce7a626a22c5e71a87 Mon Sep 17 00:00:00 2001 From: Daniel Tao Date: Mon, 18 May 2026 07:38:33 +0000 Subject: [PATCH] feat(nodes): accept undocumented --enable-infiniband flag on `sf nodes create` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/lib/nodes/create.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/nodes/create.ts b/src/lib/nodes/create.ts index 73e2b55d..249066a1 100644 --- a/src/lib/nodes/create.ts +++ b/src/lib/nodes/create.ts @@ -135,6 +135,15 @@ const create = new Command("create") "ID of the VM image to boot on the nodes. View available images with `sf node images list`.", ), ) + .addOption( + // Hidden experimental flag. Requires the (account, instance SKU) pair to + // be in the IB whitelist server-side; otherwise the request is rejected + // with 403. Kept undocumented while the field is in preview. + new Option( + "--enable-infiniband", + "Enable InfiniBand on the nodes (experimental, undocumented).", + ).hideHelp(), + ) .addOption(yesOption) .addOption(jsonOption) .hook("preAction", (command) => { @@ -274,6 +283,7 @@ async function createNodesAction( cloud_init_user_data: encodedUserData, image_id: options.image, node_type: isReserved ? "reserved" : "autoreserved", + ...(options.enableInfiniband ? { _preview_enable_infiniband: true } : {}), }; if (isReserved) {