Cache final typed producer artifacts under the initial native request hash
This commit is contained in:
@@ -52,13 +52,14 @@ type preparedLaneExecutor struct {
|
||||
}
|
||||
|
||||
type preparedTypedLane struct {
|
||||
extractor any
|
||||
merger any
|
||||
normalizer any
|
||||
extract typedExtractOperation
|
||||
merge typedMergeOperation
|
||||
normalize typedNormalizeOperation
|
||||
codec artifactCodecEntry
|
||||
extractor any
|
||||
merger any
|
||||
normalizer any
|
||||
extract typedExtractOperation
|
||||
merge typedMergeOperation
|
||||
normalize typedNormalizeOperation
|
||||
codec artifactCodecEntry
|
||||
cacheEvidence func(any) ([]source.SourceRef, error)
|
||||
}
|
||||
|
||||
type preparedEvidencePlan struct {
|
||||
@@ -228,6 +229,13 @@ func prepareLane(pipeline ResolvedPipeline, lane ResolvedArtifactLane, registrie
|
||||
return preparedLaneExecutor{}, constructionError(pipeline.ID, lane.ID, StageExtract, lane.Extract.Module, "", codecErr)
|
||||
}
|
||||
executor.typed = &preparedTypedLane{extractor: module, extract: extractEntry.extract, codec: codec}
|
||||
if registry := registries.ArtifactEvidence; registry != nil {
|
||||
if evidence, ok := registry.entries[lane.ArtifactKind]; ok {
|
||||
// Projectors retain their own exact-type check. A mismatch is an
|
||||
// unusable cache entry, not a reason to inspect domain JSON.
|
||||
executor.typed.cacheEvidence = evidence.project
|
||||
}
|
||||
}
|
||||
|
||||
executor.extractValidators, err = prepareValidatorChain(pipeline, registries, deps, StageExtract, lane.ID, lane.Extract.Module, lane.ExtractReferences.ReferenceSet)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user