Skip to content

Commit 3175a10

Browse files
committed
fix(supervisor): strip image digest in ComputeWorkloadManager
1 parent ccc8fe2 commit 3175a10

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

apps/supervisor/src/workloadManager/compute.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ export class ComputeWorkloadManager implements WorkloadManager {
1717
private readonly logger = new SimpleStructuredLogger("compute-workload-manager");
1818

1919
constructor(private opts: ComputeWorkloadManagerOptions) {
20-
if (!opts.workloadApiDomain) {
21-
this.logger.warn(
22-
"⚠️ workloadApiDomain is unset — VMs need an explicit host IP to reach the supervisor"
23-
);
20+
if (opts.workloadApiDomain) {
21+
this.logger.warn("⚠️ Custom workload API domain", {
22+
domain: opts.workloadApiDomain,
23+
});
2424
}
2525
}
2626

@@ -76,14 +76,17 @@ export class ComputeWorkloadManager implements WorkloadManager {
7676
headers["Authorization"] = `Bearer ${this.opts.gatewayAuthToken}`;
7777
}
7878

79+
// Strip image digest — resolve by tag, not digest
80+
const imageRef = opts.image.split("@")[0]!;
81+
7982
const url = `${this.opts.gatewayUrl}/api/sandboxes`;
8083

8184
const [fetchError, response] = await tryCatch(
8285
fetch(url, {
8386
method: "POST",
8487
headers,
8588
body: JSON.stringify({
86-
image: opts.image,
89+
image: imageRef,
8790
env: envVars,
8891
}),
8992
})

0 commit comments

Comments
 (0)