File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
components/server/src/prebuilds Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments