Finish analyze projection cleanup

This commit is contained in:
2026-09-04 00:09:31 +00:00
parent f7ce1dcd56
commit ec072dc163
3 changed files with 4 additions and 7 deletions

View File

@@ -88,15 +88,12 @@ func applyAnalyzeProjection(
}
}
func analyzeProjectionOutputs(records map[string]manifest.AnalyzeArtifactRecord, producerRunID string) []manifest.ArtifactRecord {
func analyzeProjectionOutputs(records map[string]manifest.AnalyzeArtifactRecord) []manifest.ArtifactRecord {
keys := make([]string, 0, len(records))
for key, record := range records {
if record.Status != manifest.AnalyzeArtifactCurrent || record.Output == nil {
continue
}
if producerRunID != "" && record.ProducerRunID != producerRunID {
continue
}
keys = append(keys, key)
}
sort.Strings(keys)

View File

@@ -364,7 +364,7 @@ func executePlan(ctx context.Context, cfg *config.Config, plan BoundedPlan, opts
sessionOutputs := mapResultOutputs(s.Name(), result, runID)
if analyzeProjection != nil {
sessionOutputs = analyzeProjectionOutputs(analyzeProjection.session, "")
sessionOutputs = analyzeProjectionOutputs(analyzeProjection.session)
}
succeededAt := nowUTC()
m.MarkStageSucceeded(s.Name(), succeededAt, sessionOutputs)

View File

@@ -431,11 +431,11 @@ func sameAnalyzeOutputIdentity(left, right manifest.AnalyzeArtifactRecord) bool
func staleUnscheduledAnalyzeDependents(
configured map[string]config.ScriptoriumArtifactConfig,
changed string,
invocationKeys map[string]struct{},
currentKeys map[string]struct{},
records map[string]manifest.AnalyzeArtifactRecord,
) {
staleAnalyzeDependentClosure(configured, changed, records, func(key string) bool {
_, evaluated := invocationKeys[key]
_, evaluated := currentKeys[key]
return !evaluated
})
}