Integrate cleanup into pipeline execution

This commit is contained in:
2026-09-05 15:27:08 +00:00
parent 8d9eb5cc40
commit adc60aa588
25 changed files with 405 additions and 1013 deletions

View File

@@ -223,17 +223,18 @@ func TestInvalidationDependents(t *testing.T) {
stage string
want []string
}{
{"prepare", []string{"transcribe", "merge", "polish", "normalize", "trim", "render", "extract", "analyze", "publish", "notify"}},
{"transcribe", []string{"merge", "polish", "normalize", "trim", "render", "extract", "analyze", "publish", "notify"}},
{"merge", []string{"polish", "normalize", "trim", "render", "extract", "analyze", "publish", "notify"}},
{"polish", []string{"normalize", "trim", "render", "extract", "analyze", "publish", "notify"}},
{"normalize", []string{"trim", "render", "extract", "analyze", "publish", "notify"}},
{"trim", []string{"render", "extract", "analyze", "publish", "notify"}},
{"render", []string{"analyze", "publish", "notify"}},
{"extract", []string{"analyze", "publish", "notify"}},
{"analyze", []string{"publish", "notify"}},
{"publish", []string{"notify"}},
{"notify", []string{}},
{"prepare", []string{"transcribe", "merge", "polish", "normalize", "trim", "render", "extract", "analyze", "publish", "notify", "cleanup"}},
{"transcribe", []string{"merge", "polish", "normalize", "trim", "render", "extract", "analyze", "publish", "notify", "cleanup"}},
{"merge", []string{"polish", "normalize", "trim", "render", "extract", "analyze", "publish", "notify", "cleanup"}},
{"polish", []string{"normalize", "trim", "render", "extract", "analyze", "publish", "notify", "cleanup"}},
{"normalize", []string{"trim", "render", "extract", "analyze", "publish", "notify", "cleanup"}},
{"trim", []string{"render", "extract", "analyze", "publish", "notify", "cleanup"}},
{"render", []string{"analyze", "publish", "notify", "cleanup"}},
{"extract", []string{"analyze", "publish", "notify", "cleanup"}},
{"analyze", []string{"publish", "notify", "cleanup"}},
{"publish", []string{"notify", "cleanup"}},
{"notify", []string{"cleanup"}},
{"cleanup", []string{}},
}
for _, test := range tests {
t.Run(test.stage, func(t *testing.T) {
@@ -290,7 +291,7 @@ func TestInvalidateDependentSucceededStagesWithReason(t *testing.T) {
if err != nil {
t.Fatalf("invalidateDependentSucceededStagesWithReason() error = %v", err)
}
want := []string{"normalize", "trim", "render", "extract", "publish", "notify"}
want := []string{"normalize", "trim", "render", "extract", "publish", "notify", "cleanup"}
if !reflect.DeepEqual(got, want) {
t.Fatalf("invalidateDependentSucceededStagesWithReason() = %#v, want %#v", got, want)
}
@@ -316,7 +317,7 @@ func TestRenderAndExtractInvalidationAreIndependent(t *testing.T) {
if err != nil {
t.Fatalf("invalidate dependents: %v", err)
}
want := []string{"analyze", "publish", "notify"}
want := []string{"analyze", "publish", "notify", "cleanup"}
if !reflect.DeepEqual(got, want) {
t.Fatalf("invalidated = %#v, want %#v", got, want)
}