-
Notifications
You must be signed in to change notification settings - Fork 892
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
Conversation
@@ -0,0 +1 @@ | |||
ALTER TABLE template_version_parameters DROP COLUMN legacy_variable_name; |
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.
What could happen if legacy variables are still present when we upgrade? Should we somehow prevent this migration if any column has a non-empty value here?
I'm not sure what we should do, but perhaps something like this (granted the condition is needed).
DO $$
BEGIN
RAISE 'Bad things will happen!';
END;
$$ LANGUAGE plpgsql;
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.
Legacy variable names are not used since 2 minor releases (v0.24.0, v0.25.0). I would assume that we can just drop the column :) Users who forgot to migrate workspaces will not benefit from the legacy_variable_name
property.
@@ -27,6 +27,8 @@ message RichParameterOption { | |||
|
|||
// RichParameter represents a variable that is exposed. | |||
message RichParameter { | |||
reserved 14; |
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.
Should we reserve the name as well? I doubt it will be a problem, but I'm overly cautious 😄.
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.
Oh yeah, that's a safer approach 👍
This PR catches up with changes introduced to terraform-provider-coder.
It looks big and scary, but in reality, it removes
legacy_variable_name
from API/database/proto, which was used only for migration purposes (not anymore).