mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat!: drop support for legacy parameters (#7663)
This commit is contained in:
@ -131,8 +131,7 @@ func validationEnabled(param TemplateVersionParameter) bool {
|
||||
// correctly validates.
|
||||
// @typescript-ignore ParameterResolver
|
||||
type ParameterResolver struct {
|
||||
Legacy []Parameter
|
||||
Rich []WorkspaceBuildParameter
|
||||
Rich []WorkspaceBuildParameter
|
||||
}
|
||||
|
||||
// ValidateResolve checks the provided value, v, against the parameter, p, and the previous build. If v is nil, it also
|
||||
@ -173,16 +172,5 @@ func (r *ParameterResolver) findLastValue(p TemplateVersionParameter) *Workspace
|
||||
return &rp
|
||||
}
|
||||
}
|
||||
// For migration purposes, we also support using a legacy variable
|
||||
if p.LegacyVariableName != "" {
|
||||
for _, lp := range r.Legacy {
|
||||
if lp.Name == p.LegacyVariableName {
|
||||
return &WorkspaceBuildParameter{
|
||||
Name: p.Name,
|
||||
Value: lp.SourceValue,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user