azure-gate: NixOS-safe bicep — nixpkgs#bicep on PATH + use_binary_from_path #153

Open
benjivers wants to merge 1 commit from fix/azure-gate-nixos-bicep into main
Collaborator

Run #395 (first run with the clone fixes from #145/#148) failed 50s into the Azure gate step:

Could not start dynamically linked executable: .../hostexecutor/.azure/bin/bicep
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box.

az deployment group create transparently downloads its own bicep binary into AZURE_CONFIG_DIR/bin on first use. That binary is a generic dynamically linked Linux executable, and the vxrail-coldstart runner is a NixOS host — it cannot exec it (stub-ld). Teardown worked as designed: the RG was created and deleted within the same minute, nothing leaked.

Fix, two halves:

  • azure-gate.yml: add nixpkgs#bicep to the gate step's nix shell so a Nix-native bicep is on PATH. (Safety-net and janitor steps only run az group commands — no bicep needed there.)
  • gate.sh: after auth, az config set bicep.use_binary_from_path=true — but only when a bicep is already on PATH, so laptop runs keep az's default self-download behavior (which works fine on macOS/generic Linux).

🤖 Generated with Claude Code

Run #395 (first run with the clone fixes from #145/#148) failed 50s into the Azure gate step: ``` Could not start dynamically linked executable: .../hostexecutor/.azure/bin/bicep NixOS cannot run dynamically linked executables intended for generic linux environments out of the box. ``` `az deployment group create` transparently downloads its own bicep binary into `AZURE_CONFIG_DIR/bin` on first use. That binary is a generic dynamically linked Linux executable, and the vxrail-coldstart runner is a NixOS host — it cannot exec it (stub-ld). Teardown worked as designed: the RG was created and deleted within the same minute, nothing leaked. Fix, two halves: - **azure-gate.yml**: add `nixpkgs#bicep` to the gate step's `nix shell` so a Nix-native bicep is on PATH. (Safety-net and janitor steps only run `az group` commands — no bicep needed there.) - **gate.sh**: after auth, `az config set bicep.use_binary_from_path=true` — but only when a bicep is already on PATH, so laptop runs keep az's default self-download behavior (which works fine on macOS/generic Linux). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
azure-gate: NixOS-safe bicep — nixpkgs#bicep on PATH + use_binary_from_path
All checks were successful
guard-ppt / no-ppt (push) Successful in 23s
guard-ppt / no-ppt (pull_request) Successful in 21s
73cdbf6646
Run #395: az deployment group create failed instantly on the vxrail-coldstart
runner — az self-downloads a generic dynamically-linked bicep binary into
AZURE_CONFIG_DIR/bin, which a NixOS host cannot exec (stub-ld). Add
nixpkgs#bicep to the gate step's nix shell and, in gate.sh (only when a bicep
is already on PATH, so laptop runs keep az's own download), set
bicep.use_binary_from_path=true.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All checks were successful
guard-ppt / no-ppt (push) Successful in 23s
Required
Details
guard-ppt / no-ppt (pull_request) Successful in 21s
Required
Details
This pull request has changes conflicting with the target branch.
  • .forgejo/workflows/azure-gate.yml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/azure-gate-nixos-bicep:fix/azure-gate-nixos-bicep
git switch fix/azure-gate-nixos-bicep
Sign in to join this conversation.
No description provided.