Skip to content

Commit 672336e

Browse files
committed
let workspaces start even on invalid docker refs
1 parent 2af89a5 commit 672336e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

components/server/src/workspace/workspace-factory.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ export class WorkspaceFactory {
332332
if (WorkspaceImageSourceDocker.is(imageSource) && imageSource.dockerFileHash === ImageFileRevisionMissing) {
333333
// we let the workspace create here and let it fail to build the image
334334
imageSource.dockerFileHash = context.revision;
335+
if (imageSource.dockerFileSource) {
336+
imageSource.dockerFileSource.revision = context.revision;
337+
}
335338
}
336339

337340
let projectId: string | undefined;

components/server/src/workspace/workspace-starter.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,12 @@ export class WorkspaceStarter {
280280
WorkspaceImageSourceDocker.is(imageSource) &&
281281
imageSource.dockerFileHash === ImageFileRevisionMissing
282282
) {
283+
const revision = (workspace.context as CommitContext).revision;
283284
// we let the workspace create here and let it fail to build the image
284-
imageSource.dockerFileHash = (workspace.context as CommitContext).revision;
285+
imageSource.dockerFileHash = revision;
286+
if (imageSource.dockerFileSource) {
287+
imageSource.dockerFileSource.revision = revision;
288+
}
285289
}
286290
log.debug("Found workspace without imageSource, generated one", { imageSource });
287291

0 commit comments

Comments
 (0)