Skip to content

Commit

Permalink
reupload build contexts for rebuilding (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
FGRCL authored Aug 1, 2024
1 parent c3cba4b commit b1824e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/server/pipelineSerialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export async function executePipeline(
specs["name"] = name;
specs["id"] = id;

await uploadBuildContexts(anvilHostConfiguration, specs, buffer);
await uploadBuildContexts(anvilHostConfiguration, specs, buffer, rebuild);

return await createExecution(
anvilHostConfiguration,
Expand Down Expand Up @@ -272,14 +272,14 @@ async function uploadBlocks(
return pipelineSpecs;
}

async function uploadBuildContexts(configuration, pipelineSpecs, buffer) {
async function uploadBuildContexts(configuration, pipelineSpecs, buffer, rebuild) {
const buildContextStatuses = await getBuildContextStatus(
configuration,
pipelineSpecs,
);
await Promise.all(
buildContextStatuses
.filter((status) => !status.isUploaded)
.filter((status) => !status.isUploaded || rebuild)
.map((status) => [path.join(buffer, status.blockKey), status.s3Key])
.map(([blockPath, s3Key]) =>
uploadDirectory(s3Key, blockPath, configuration),
Expand Down

0 comments on commit b1824e2

Please sign in to comment.