Retain authoritative pipeline and campaign load results
This commit is contained in:
@@ -255,7 +255,7 @@ func MarshalEffectivePipeline(cfg *PipelineConfig) ([]byte, error) {
|
||||
|
||||
func effectivePipelineOwners(cfg *PipelineConfig) (map[string][]string, error) {
|
||||
owners := make(map[string][]string)
|
||||
if cfg == nil || cfg.resolution == nil {
|
||||
if cfg.ConfigKitResult() == nil {
|
||||
return owners, nil
|
||||
}
|
||||
paths, err := pipelineMetadataPaths(cfg)
|
||||
@@ -263,13 +263,14 @@ func effectivePipelineOwners(cfg *PipelineConfig) (map[string][]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
pathsByID := pipelineSourcePaths(cfg)
|
||||
metadata := cfg.ConfigKitResult().Metadata()
|
||||
for _, value := range paths {
|
||||
info, ok := cfg.resolution.configkitMetadata.Lookup(configkit.Keys(value.segments...))
|
||||
info, ok := metadata.Lookup(configkit.Keys(value.segments...))
|
||||
sources := []string{pipelineDefaultOwnershipSource}
|
||||
if ok {
|
||||
sources = ownershipSources(info.Origin, pathsByID)
|
||||
if info.Origin.Layer == configkit.LayerResolution {
|
||||
for _, change := range cfg.resolution.configkitMetadata.History(configkit.Keys(value.segments...)) {
|
||||
for _, change := range metadata.History(configkit.Keys(value.segments...)) {
|
||||
if change.Origin.Layer != configkit.LayerResolution {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user