fix: skip cloud-init wait in Hetzner Docker mode (#2924)
Some checks are pending
CLI Release / Build and release CLI (push) Waiting to run
Lint / ShellCheck (push) Waiting to run
Lint / Biome Lint (push) Waiting to run
Lint / macOS Compatibility (push) Waiting to run

Hetzner's waitForReady() was missing the useDocker check that GCP
already has. Non-minimal agents (openclaw, codex) with --beta docker
waited 5 minutes for a cloud-init marker that never appears on Docker
CE app images.

Adds useDocker to the condition and a source-level regression test
verifying both Hetzner and GCP include the check.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ahmed Abushagur 2026-03-23 19:36:37 -07:00 committed by GitHub
parent 659fd1c6da
commit 3b150eabd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,30 @@
/**
* docker-cloudinit-skip.test.ts Verify Docker mode skips cloud-init wait.
*
* When --beta docker is active, waitForReady() must skip cloud-init polling
* and only wait for SSH. This test reads the orchestrator source files to
* verify the useDocker check is present in the waitForReady condition.
*
* Without this, non-minimal agents (openclaw, codex) wait 5 minutes for a
* cloud-init marker that never appears when using Docker app images.
*/
import { describe, expect, it } from "bun:test";
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
const CLI_SRC = resolve(import.meta.dir, "..");
describe("Docker mode skips cloud-init wait", () => {
it("Hetzner waitForReady includes useDocker in skip condition", () => {
const source = readFileSync(resolve(CLI_SRC, "hetzner/main.ts"), "utf-8");
// The waitForReady condition must include useDocker to skip cloud-init
// when Docker mode is active (matching GCP's implementation)
expect(source).toContain("useDocker || snapshotId || cloud.skipCloudInit");
});
it("GCP waitForReady includes useDocker in skip condition", () => {
const source = readFileSync(resolve(CLI_SRC, "gcp/main.ts"), "utf-8");
expect(source).toContain("useDocker || cloud.skipCloudInit");
});
});

View file

@ -87,7 +87,7 @@ async function main() {
},
getServerName,
async waitForReady() {
if (snapshotId || cloud.skipCloudInit) {
if (useDocker || snapshotId || cloud.skipCloudInit) {
await waitForSshOnly();
} else {
await waitForCloudInit();