Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class IncrementalWorkspaceService {
return history;
}

public async findGoodBaseForIncrementalBuild(
public async findBaseForIncrementalWorkspace(
context: CommitContext,
config: WorkspaceConfig,
history: WithCommitHistory,
Expand Down
14 changes: 11 additions & 3 deletions components/server/src/prebuilds/prebuild-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ export class PrebuildManager {
JSON.stringify(filterPrebuildTasks(config?.tasks));
// 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.
if (isSameConfig) {
return { prebuildId: existingPB.id, wsid: existingPB.buildWorkspaceId, done: true };
return {
prebuildId: existingPB.id,
wsid: existingPB.buildWorkspaceId,
done: existingPB.state === "available",
};
}
}
}
Expand All @@ -407,7 +411,7 @@ export class PrebuildManager {
commitHistory: repoHist.commitHistory.slice(0, prebuildInterval),
})),
};
const prebuild = await this.incrementalPrebuildsService.findGoodBaseForIncrementalBuild(
const prebuild = await this.incrementalPrebuildsService.findBaseForIncrementalWorkspace(
context,
config,
history,
Expand All @@ -416,7 +420,11 @@ export class PrebuildManager {
true,
);
if (prebuild) {
return { prebuildId: prebuild.id, wsid: prebuild.buildWorkspaceId, done: true };
return {
prebuildId: prebuild.id,
wsid: prebuild.buildWorkspaceId,
done: prebuild.state === "available",
};
}
}

Expand Down
Loading
Loading