fix(render): resolve template id for render jobs + mock-fallback when no .aep
Build backend images / build content-svc (push) Failing after 1m30s
Build backend images / build file-svc (push) Failing after 1m23s
Build backend images / build gateway (push) Failing after 5m47s
Build backend images / build identity-svc (push) Failing after 1m23s
Build backend images / build notification-svc (push) Failing after 1m51s
Build backend images / build render-svc (push) Failing after 1m23s
Build backend images / build studio-svc (push) Failing after 1m23s
Build backend images / build content-svc (push) Failing after 1m30s
Build backend images / build file-svc (push) Failing after 1m23s
Build backend images / build gateway (push) Failing after 5m47s
Build backend images / build identity-svc (push) Failing after 1m23s
Build backend images / build notification-svc (push) Failing after 1m51s
Build backend images / build render-svc (push) Failing after 1m23s
Build backend images / build studio-svc (push) Failing after 1m23s
THE bug behind "AEPFilePath is required for real AE render": CreateJob inserted
original_project_id = saved_project_id (VALUES $3,$3), so the claim looked for the
render bundle at templates/{saved_project_id}/ — which never exists. The bundle
lives at templates/{TEMPLATE_id}/. Now original_project_id is resolved from
studio.saved_projects.original_project_id (the template the project was built from).
(Direct-SQL test renders masked this by setting the template id explicitly.)
Also harden the node-agent: Run() falls back to mock render when AEPFilePath is
empty even if AE is installed (previously hard-errored), so a missing/un-promoted
template degrades gracefully instead of failing the job.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,14 @@ func Run(ctx context.Context, aePath, workDir string, job *Job, onProgress Progr
|
||||
}
|
||||
outputPath := filepath.Join(outputDir, "output.mp4")
|
||||
|
||||
if aePath == "" {
|
||||
// Mock render when AE isn't installed (aePath empty) OR when this job has no
|
||||
// template project to render (AEPFilePath empty — the template bundle wasn't
|
||||
// uploaded/promoted yet). Mock drives progress+preview to completion so the job
|
||||
// doesn't hard-fail; a real render requires both AE and a downloaded .aep.
|
||||
if aePath == "" || job.AEPFilePath == "" {
|
||||
if aePath != "" && job.AEPFilePath == "" {
|
||||
log.Printf("[job %s] no template .aep available — falling back to mock render", job.JobID)
|
||||
}
|
||||
return mockRender(ctx, job, outputPath, onProgress, onPreview)
|
||||
}
|
||||
return aeRender(ctx, aePath, job, outputPath, onProgress, onPreview)
|
||||
|
||||
Reference in New Issue
Block a user