Adopt ConfigKit overlays for pipeline selection
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package manifest
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -71,13 +72,25 @@ type StageRecord struct {
|
||||
// EffectiveConfigProvenance records bounded non-secret configuration identity
|
||||
// for one resolved invocation.
|
||||
type EffectiveConfigProvenance struct {
|
||||
SelectedProfile *SelectedProfileProvenance `json:"selected_profile,omitempty"`
|
||||
SelectedOverlay *SelectedOverlayProvenance `json:"selected_overlay,omitempty"`
|
||||
EffectiveConfigDigest string `json:"effective_config_digest,omitempty"`
|
||||
}
|
||||
|
||||
// SelectedProfileProvenance identifies an explicitly or default-selected
|
||||
// pipeline profile without recording profile content.
|
||||
type SelectedProfileProvenance struct {
|
||||
// UnmarshalJSON accepts unknown informational provenance from older manifests.
|
||||
// The enclosing manifest and its execution state remain strictly decoded.
|
||||
func (p *EffectiveConfigProvenance) UnmarshalJSON(data []byte) error {
|
||||
type provenance EffectiveConfigProvenance
|
||||
var decoded provenance
|
||||
if err := json.Unmarshal(data, &decoded); err != nil {
|
||||
return err
|
||||
}
|
||||
*p = EffectiveConfigProvenance(decoded)
|
||||
return nil
|
||||
}
|
||||
|
||||
// SelectedOverlayProvenance identifies an explicitly or default-selected
|
||||
// pipeline overlay without recording overlay content.
|
||||
type SelectedOverlayProvenance struct {
|
||||
Name string `json:"name"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user