Skip to content

Commit b5a3429

Browse files
committed
review comments
1 parent 58ca821 commit b5a3429

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

components/server/src/prebuilds/prebuild-manager.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,11 @@ export class PrebuildManager {
381381
JSON.stringify(filterPrebuildTasks(config?.tasks));
382382
// If there is an existing prebuild that isn't failed and it's based on the current config, we return it here instead of triggering a new prebuild.
383383
if (isSameConfig) {
384-
return { prebuildId: existingPB.id, wsid: existingPB.buildWorkspaceId, done: true };
384+
return {
385+
prebuildId: existingPB.id,
386+
wsid: existingPB.buildWorkspaceId,
387+
done: existingPB.state === "available",
388+
};
385389
}
386390
}
387391
}
@@ -416,8 +420,11 @@ export class PrebuildManager {
416420
true,
417421
);
418422
if (prebuild) {
419-
// TODO(gpl): Why not "done: prebuild.state === "available""?
420-
return { prebuildId: prebuild.id, wsid: prebuild.buildWorkspaceId, done: true };
423+
return {
424+
prebuildId: prebuild.id,
425+
wsid: prebuild.buildWorkspaceId,
426+
done: prebuild.state === "available",
427+
};
421428
}
422429
}
423430

0 commit comments

Comments
 (0)