- Notifications
You must be signed in to change notification settings - Fork923
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
to6a480d0
Compare46d2751
to635c56b
Compare3522bb0
to24b830b
Compare24b830b
to1991e91
Compare1991e91
to95aacbf
Compare2889dac
to0a26d90
Compared7398d9
to353f193
Compare0a26d90
toff6d2de
Compare353f193
to2a37b9b
Compare81d451c
to9ae5ec8
Compare9bc40dd
to0e3dc00
Comparea51570a
to4f52076
Compare@@ -35,6 +36,7 @@ type Executor struct { | |||
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
toff96e32
Compare1d27539
toac9d0e6
Compareba8cf59
toc1d05a0
Compare1e1cb20
tocb43418
Comparec1d05a0
to129235b
Comparecb43418
toa908ce6
Compare129235b
to6a5ee9e
CompareValidation to occur in coder/coder inside wsbuilder for all dynamicparameters.
6a5ee9e
to0523a2f
Comparef4e5548
to0523a2f
Compare82af2e0
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/coder
before being sent to terraform.The heart of this PR is
ResolveParameters
.What else changes?
wsbuilder
now needs to load the terraform files into memory to succeed. This does add a larger memory requirement to workspace builds.Future work