- Notifications
You must be signed in to change notification settings - Fork906
chore: keep previous workspace build parameters for dynamic params#18059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coderd/wsbuilder/wsbuilder.go Outdated
latestValues := make(map[string]string) | ||
for _, latest := range b.richParameterValues { | ||
latestValues[latest.Name] = latest.Value | ||
} | ||
// Merge the inputs with values from the previous build. | ||
for _, last := range lastBuildParameterValues { | ||
// TODO: Ideally we use the resolver here and look at parameter | ||
// fields such as 'ephemeral'. This requires loading the terraform | ||
// files. For now, just send the previous inputs as is. | ||
if _, exists := latestValues[last.Name]; exists { | ||
continue | ||
} | ||
names = append(names, last.Name) | ||
values = append(values, last.Value) | ||
} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I am skipping validation right now for dynamic params experimental. I have an issue to address this again later.
715169b
toea7c20f
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Some comments, but nothing blocking.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ca8660c
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
The existing code persists all static parameters and their values. Using the previous build as the source if no new inputs are found.
Dynamic params do not have a state of the parameters saved to disk. So instead, all previous values are persisted always, and new inputs override.
Things like ephemeral params are not yet implemented in dynamic params, and will just always persist. Whereas in the past, they were repromtped. This needs to be resolved before GA. (tracked here:#17942)