chore: disable parameter validatation for dynamic params for all transitions (#17926)

Dynamic params skip parameter validation in coder/coder.
This is because conditional parameters cannot be validated 
with the static parameters in the database.
This commit is contained in:
Steven Masley
2025-05-20 10:09:53 -05:00
committed by GitHub
parent 93f17bc73e
commit e76d58f2b6
15 changed files with 258 additions and 17 deletions
+26
View File
@@ -839,6 +839,32 @@ func TestWorkspaceBuildWithPreset(t *testing.T) {
req.NoError(err)
}
func TestProvisionerVersionSupportsDynamicParameters(t *testing.T) {
t.Parallel()
for v, dyn := range map[string]bool{
"": false,
"na": false,
"0.0": false,
"0.10": false,
"1.4": false,
"1.5": false,
"1.6": true,
"1.7": true,
"1.8": true,
"2.0": true,
"2.17": true,
"4.0": true,
} {
t.Run(v, func(t *testing.T) {
t.Parallel()
does := wsbuilder.ProvisionerVersionSupportsDynamicParameters(v)
require.Equal(t, dyn, does)
})
}
}
type txExpect func(mTx *dbmock.MockStore)
func expectDB(t *testing.T, opts ...txExpect) *dbmock.MockStore {