- Notifications
You must be signed in to change notification settings - Fork911
chore: remove dynamic-parameters experiment#18290
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
base:main
Are you sure you want to change the base?
Conversation
- Regenerated TypeScript types to remove dynamic-parameters experiment- Updated useDynamicParametersOptOut hook to always return optedOut: true since the experiment was removed- This fixes test failures related to dynamic parameters functionalityCo-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Fix for Test FailuresI've identified and fixed the test failures in this PR. The issues were: 1. |
Additional Fix for wsbuilder Test FailureI've fixed the additional test failure in The Issue:The test was expecting The Fix:
The changes ensure that when classic parameter flow is enabled, we don't make unnecessary database calls to fetch terraform values. |
coderd/parameters_test.go Outdated
@@ -249,6 +249,7 @@ func TestDynamicParametersWithTerraformValues(t *testing.T) { | |||
Value:"GO", | |||
}, | |||
} | |||
request.EnableDynamicParameters=true |
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.
We should really set the template to dynamic params, because we are going to drop this field soon.
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 changed it here:414801d
coderd/wsbuilder/wsbuilder.go Outdated
func (b *Builder) usingDynamicParameters() bool { | ||
vals, err := b.getTemplateTerraformValues() | ||
if b.dynamicParametersEnabled != nil { | ||
return *b.dynamicParametersEnabled | ||
} | ||
tpl, err := b.getTemplate() | ||
if err != nil { | ||
return false // Let another part of the code get this error | ||
} | ||
if tpl.UseClassicParameterFlow { | ||
return false | ||
} | ||
if !ProvisionerVersionSupportsDynamicParameters(vals.ProvisionerdVersion) { | ||
vals, err := b.getTemplateTerraformValues() | ||
if err != nil { | ||
return false | ||
} | ||
ifb.dynamicParametersEnabled != nil { | ||
return*b.dynamicParametersEnabled | ||
if!ProvisionerVersionSupportsDynamicParameters(vals.ProvisionerdVersion) { | ||
returnfalse | ||
} | ||
tpl, err := b.getTemplate() | ||
if err != nil { | ||
return false // Let another part of the code get this error | ||
} | ||
return !tpl.UseClassicParameterFlow | ||
return true | ||
} |
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.
👍
No description provided.