Skip to content

feat!: drop LegacyVariableName from coder parameter #8360

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean FE
  • Loading branch information
mtojek committed Jul 7, 2023
commit bf7aec65c105391fc5e11777827b54b693820c4d
2 changes: 1 addition & 1 deletion provisionersdk/proto/provisioner.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ message RichParameterOption {

// RichParameter represents a variable that is exposed.
message RichParameter {
reserved 14;
reserved 14;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we reserve the name as well? I doubt it will be a problem, but I'm overly cautious 😄.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, that's a safer approach 👍


string name = 1;
string description = 2;
Expand Down
6 changes: 0 additions & 6 deletions site/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1175,18 +1175,12 @@ const getMissingParameters = (
const requiredParameters: TypesGen.TemplateVersionParameter[] = []

templateParameters.forEach((p) => {
// Legacy parameters should not be required. Backend can just migrate them.
const isLegacy = p.legacy_variable_name !== undefined
// It is mutable and required. Mutable values can be changed after so we
// don't need to ask them if they are not required.
const isMutableAndRequired = p.mutable && p.required
// Is immutable, so we can check if it is its first time on the build
const isImmutable = !p.mutable

if (isLegacy) {
return
}

if (isMutableAndRequired || isImmutable) {
requiredParameters.push(p)
return
Expand Down