Skip to content

Commit 1eb8ee0

Browse files
kylos101roboquat
authored andcommitted
[server] set volumeSnapshotId once within createSpec
Related to #11823
1 parent 6a52dbf commit 1eb8ee0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,11 +1423,11 @@ export class WorkspaceStarter {
14231423
}
14241424
}
14251425

1426-
let volumeSnapshotId = lastValidWorkspaceInstanceId;
1427-
// if this is snapshot or prebuild context, then try to find volume snapshot id in it
1428-
if (SnapshotContext.is(workspace.context) || WithPrebuild.is(workspace.context)) {
1429-
volumeSnapshotId = workspace.context.snapshotBucketId;
1430-
}
1426+
const volumeSnapshotId =
1427+
SnapshotContext.is(workspace.context) || WithPrebuild.is(workspace.context)
1428+
? workspace.context.snapshotBucketId
1429+
: lastValidWorkspaceInstanceId;
1430+
14311431
let volumeSnapshotInfo = new VolumeSnapshotInfo();
14321432
const volumeSnapshots = await this.workspaceDb.trace(traceCtx).findVolumeSnapshotById(volumeSnapshotId);
14331433
if (volumeSnapshots !== undefined) {

0 commit comments

Comments
 (0)