Skip to content

Commit 667c937

Browse files
committed
refactor: default alwaysResolve to true
1 parent eaa8fec commit 667c937

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/devspace/config/loader/variable/resolver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (r *resolver) findVariablesInclude(haystack interface{}, include []*regexp.
144144

145145
// add always resolve variables
146146
for _, v := range r.vars {
147-
if v.AlwaysResolve {
147+
if v.AlwaysResolve == nil || *v.AlwaysResolve {
148148
varsUsed[v.Name] = true
149149
}
150150
}

pkg/devspace/config/versions/latest/schema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,8 @@ type Variable struct {
14921492
// system.
14931493
Commands []VariableCommand `yaml:"commands,omitempty" json:"commands,omitempty" jsonschema_extras:"group=execution"`
14941494

1495-
// AlwaysResolve makes sure this variable will always be resolved and not only if it is used somewhere
1496-
AlwaysResolve bool `yaml:"alwaysResolve,omitempty" json:"alwaysResolve,omitempty"`
1495+
// AlwaysResolve makes sure this variable will always be resolved and not only if it is used somewhere. Defaults to true.
1496+
AlwaysResolve *bool `yaml:"alwaysResolve,omitempty" json:"alwaysResolve,omitempty"`
14971497

14981498
// Source defines where the variable should be taken from
14991499
Source VariableSource `yaml:"source,omitempty" json:"source,omitempty" jsonschema:"enum=all,enum=env,enum=input,enum=command,enum=none"`

pkg/devspace/config/versions/v1beta11/upgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (c *Config) Upgrade(log log.Logger) (config.Config, error) {
8383
ValidationPattern: v.ValidationPattern,
8484
ValidationMessage: v.ValidationMessage,
8585
NoCache: v.NoCache,
86-
AlwaysResolve: v.AlwaysResolve,
86+
AlwaysResolve: &v.AlwaysResolve,
8787
Value: v.Value,
8888
Default: v.Default,
8989
Source: next.VariableSource(v.Source),

0 commit comments

Comments
 (0)