Finish analyze projection cleanup
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user