feat(pipeline): skip the preview build and inherit the previous one
Deploy / deploy (push) Successful in 7m8s
Deploy / deploy (push) Successful in 7m8s
Some exports are deliberately framed differently from their review — unscaled or un-punched-in EXRs — and a preview rebuilt from those frames would be the wrong picture. The previous export's MOV is the correct one. skipPreview renders the EXRs and goes straight to READY_FOR_QC. Available at Queue Export (a "No preview" checkbox in the panel, E1 field) and as an option when overriding a validation failure. The inheritance is as important as the skip: deliveryMovPath, the review MP4, the thumbnail and the Version are carried over from the newest earlier export of that shot which has them. Without it the delivery builder — which takes its MOV from deliveryMovPath — would package EXRs with no MOV at all. Where there is nothing to inherit, the export still reaches QC and the timeline says it has no review media. QC is untouched by any of this: a skipped preview still needs a human pass before the export can be delivered. Panel 2.3.0. Adds migration 20260814000000_export_skip_preview. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,59 @@ export async function buildPreviewManifest(exportRow: ExportForPreview): Promise
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Carries the previous export's review media onto one that skipped its own
|
||||
* preview build (§9).
|
||||
*
|
||||
* An export whose framing differs from the review framing — unscaled or
|
||||
* un-punched-in EXRs — must not have a preview rebuilt from its own frames:
|
||||
* the earlier, correctly-framed MOV *is* the right preview. Inheriting it also
|
||||
* keeps the delivery package whole, since the builder takes its MOV from
|
||||
* `deliveryMovPath`.
|
||||
*
|
||||
* Returns the fields to apply and a note describing what happened, so the
|
||||
* export's timeline records where its media came from.
|
||||
*/
|
||||
export async function inheritPreviewMedia(
|
||||
tx: Prisma.TransactionClient,
|
||||
exportRow: { id: string; shotId: string }
|
||||
): Promise<{ data: Prisma.ExportUpdateInput; note: string }> {
|
||||
const donor = await tx.export.findFirst({
|
||||
where: {
|
||||
shotId: exportRow.shotId,
|
||||
id: { not: exportRow.id },
|
||||
OR: [{ previewMovKey: { not: null } }, { deliveryMovPath: { not: null } }],
|
||||
},
|
||||
orderBy: { versionNumber: "desc" },
|
||||
select: {
|
||||
versionString: true,
|
||||
deliveryMovPath: true,
|
||||
previewMovKey: true,
|
||||
thumbnailKey: true,
|
||||
versionId: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!donor) {
|
||||
return {
|
||||
data: {},
|
||||
note: "no preview built and no earlier export to inherit one from — this export has no review media",
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
data: {
|
||||
deliveryMovPath: donor.deliveryMovPath,
|
||||
previewMovKey: donor.previewMovKey,
|
||||
thumbnailKey: donor.thumbnailKey,
|
||||
// The Version row stays attached to the export that actually produced the
|
||||
// media; this one only points at the same files.
|
||||
versionId: donor.versionId,
|
||||
},
|
||||
note: `preview skipped — review media inherited from ${donor.versionString}`,
|
||||
};
|
||||
}
|
||||
|
||||
/** Creates the PREVIEW_ONLY job that follows a successful EXR render. */
|
||||
export async function createPreviewJob(
|
||||
tx: Prisma.TransactionClient,
|
||||
|
||||
Reference in New Issue
Block a user