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))
|
keys := make([]string, 0, len(records))
|
||||||
for key, record := range records {
|
for key, record := range records {
|
||||||
if record.Status != manifest.AnalyzeArtifactCurrent || record.Output == nil {
|
if record.Status != manifest.AnalyzeArtifactCurrent || record.Output == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if producerRunID != "" && record.ProducerRunID != producerRunID {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
keys = append(keys, key)
|
keys = append(keys, key)
|
||||||
}
|
}
|
||||||
sort.Strings(keys)
|
sort.Strings(keys)
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ func executePlan(ctx context.Context, cfg *config.Config, plan BoundedPlan, opts
|
|||||||
|
|
||||||
sessionOutputs := mapResultOutputs(s.Name(), result, runID)
|
sessionOutputs := mapResultOutputs(s.Name(), result, runID)
|
||||||
if analyzeProjection != nil {
|
if analyzeProjection != nil {
|
||||||
sessionOutputs = analyzeProjectionOutputs(analyzeProjection.session, "")
|
sessionOutputs = analyzeProjectionOutputs(analyzeProjection.session)
|
||||||
}
|
}
|
||||||
succeededAt := nowUTC()
|
succeededAt := nowUTC()
|
||||||
m.MarkStageSucceeded(s.Name(), succeededAt, sessionOutputs)
|
m.MarkStageSucceeded(s.Name(), succeededAt, sessionOutputs)
|
||||||
|
|||||||
@@ -431,11 +431,11 @@ func sameAnalyzeOutputIdentity(left, right manifest.AnalyzeArtifactRecord) bool
|
|||||||
func staleUnscheduledAnalyzeDependents(
|
func staleUnscheduledAnalyzeDependents(
|
||||||
configured map[string]config.ScriptoriumArtifactConfig,
|
configured map[string]config.ScriptoriumArtifactConfig,
|
||||||
changed string,
|
changed string,
|
||||||
invocationKeys map[string]struct{},
|
currentKeys map[string]struct{},
|
||||||
records map[string]manifest.AnalyzeArtifactRecord,
|
records map[string]manifest.AnalyzeArtifactRecord,
|
||||||
) {
|
) {
|
||||||
staleAnalyzeDependentClosure(configured, changed, records, func(key string) bool {
|
staleAnalyzeDependentClosure(configured, changed, records, func(key string) bool {
|
||||||
_, evaluated := invocationKeys[key]
|
_, evaluated := currentKeys[key]
|
||||||
return !evaluated
|
return !evaluated
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user