Add opt-in configuration overrides
This commit is contained in:
@@ -32,8 +32,9 @@ type inspectionInput struct {
|
||||
}
|
||||
|
||||
type applicationCacheKey struct {
|
||||
selection ckconfig.Selection
|
||||
campaign commandkit.Supplied[string]
|
||||
config commandkit.Supplied[string]
|
||||
overlay commandkit.Supplied[string]
|
||||
campaign commandkit.Supplied[string]
|
||||
}
|
||||
|
||||
// runCache belongs to one invocation and is shared only where the application
|
||||
@@ -80,7 +81,7 @@ func loadApplicationConfig(ctx context.Context, selection ckconfig.Selection, in
|
||||
if input != nil {
|
||||
campaignInput = input.Campaign
|
||||
}
|
||||
key := applicationCacheKey{selection: selection, campaign: campaignInput}
|
||||
key := applicationCacheKey{config: selection.Config, overlay: selection.Overlay, campaign: campaignInput}
|
||||
if cache != nil {
|
||||
if cached, ok := cache.applications[key]; ok {
|
||||
return cached, nil
|
||||
|
||||
@@ -266,7 +266,7 @@ func TestBuildValidationRequestDefaultsOnlyAbsentVariables(t *testing.T) {
|
||||
if !reflect.DeepEqual(got.Inputs, inputs) || !reflect.DeepEqual(seed.Request.Vars, explicit) {
|
||||
t.Fatalf("seed bindings changed: built=%#v seed=%#v", got.Inputs, explicit)
|
||||
}
|
||||
key := applicationCacheKey{selection: seed.Selection, campaign: input.Campaign}
|
||||
key := applicationCacheKey{config: seed.Selection.Config, overlay: seed.Selection.Overlay, campaign: input.Campaign}
|
||||
cached := cache.applications[key]
|
||||
if cached == nil {
|
||||
t.Fatal("builder did not load application configuration into invocation state")
|
||||
|
||||
Reference in New Issue
Block a user