- Notifications
You must be signed in to change notification settings - Fork1.1k
feat: implement dynamic parameter validation#18482
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
Emyrk commentedJun 20, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed byGraphite. Learn more aboutstacking. |
ab677c2 to6a480d0Compare46d2751 to635c56bCompare3522bb0 to24b830bCompare24b830b to1991e91Compare1991e91 to95aacbfCompare2889dac to0a26d90Compared7398d9 to353f193Compare0a26d90 toff6d2deCompare353f193 to2a37b9bCompare81d451c to9ae5ec8Compare9bc40dd to0e3dc00Comparea51570a to4f52076Compare| ctx context.Context | ||
| db database.Store | ||
| ps pubsub.Pubsub | ||
| fileCache*files.Cache |
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.
TIL this is a thing!
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.
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.
| // TODO: Fix the `hcl.Diagnostics(...)` type casting. It should not be needed. | ||
| ifhcl.Diagnostics(parameter.Diagnostics).HasErrors() { | ||
| // All validation errors are raised here. | ||
| diags=diags.Extend(hcl.Diagnostics(parameter.Diagnostics)) | ||
| } |
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.
follow-up issue?
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'll do you one better:#18501
Just trying to break out some of the diffs
Uh oh!
There was an error while loading.Please reload this page.
| Severity:hcl.DiagError, | ||
| Summary:"Immutable parameter changed", | ||
| Detail:fmt.Sprintf("Parameter %q is not mutable, so it can't be updated after creating a workspace.",parameter.Name), | ||
| Subject:src, |
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.
Nice 👍
4f52076 toff96e32Compare1d27539 toac9d0e6Compareba8cf59 toc1d05a0Compare1e1cb20 tocb43418Comparec1d05a0 to129235bComparecb43418 toa908ce6Compare129235b to6a5ee9eCompareValidation to occur in coder/coder inside wsbuilder for all dynamicparameters.
6a5ee9e to0523a2fComparef4e5548 to0523a2fCompare82af2e0 intomainUh oh!
There was an error while loading.Please reload this page.

Uh oh!
There was an error while loading.Please reload this page.
What does this do?
This does parameter validation for dynamic parameters in
wsbuilder. All input parameters are validated incoder/coderbefore being sent to terraform.The heart of this PR is
ResolveParameters.What else changes?
wsbuildernow needs to load the terraform files into memory to succeed. This does add a larger memory requirement to workspace builds.Future work