Skip to content

Commit

Permalink
[server] Mark instances whose image build failed as "stopped"
Browse files Browse the repository at this point in the history
  • Loading branch information
geropl committed Aug 15, 2022
1 parent 30a5834 commit 7d47c9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/server/src/workspace/workspace-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1226,8 +1226,12 @@ export class WorkspaceStarter {
message = err.message;
}

// This instance's image build "failed" as well, so mark it as such.
const now = new Date().toISOString();
instance = await this.workspaceDb.trace({ span }).updateInstancePartial(instance.id, {
status: { ...instance.status, phase: "building", conditions: { failed: message }, message },
status: { ...instance.status, phase: "stopped", conditions: { failed: message }, message },
stoppedTime: now,
stoppingTime: now,
});
await this.messageBus.notifyOnInstanceUpdate(workspace.ownerId, instance);

Expand Down

0 comments on commit 7d47c9e

Please sign in to comment.