You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently working on upgrading from the deprecated String blocks to the newer Variable objects as part of preparation for the June 2025 deprecation deadline (don't remember exactly, but I have an impression that I've read somewhere). However, I've hit a roadblock with variable naming conventions.
The Issue
When trying to register a block with a variable name that contains hyphens, I'm receiving this validation error:
Failed to register GCP secrets for ci: 1 validation error for `VariableCreate` name.
Value error: Variable names must only contain lowercase letters, numbers, and underscores.
The specific variable name that's failing is "gcp-cred" because it contains a hyphen (-).
Question
Is there a specific technical reason or design principle behind restricting Variable names to only lowercase letters, numbers, and underscores?
This seems more restrictive than many other systems that commonly allow hyphens in identifiers. Since I need to migrate several blocks that use hyphenated naming conventions, understanding the reasoning would help me plan my migration approach better.
Also, if this is an intentional restriction, it might be helpful to have this more explicitly documented in the migration guides for those of us moving from String blocks (which presumably allowed hyphens) to Variables.
Thanks for any insights!
The text was updated successfully, but these errors were encountered:
hi @lelouvincx - thanks for the issue! there was a historical reason for doing this, but at this point I don't think there's a strong reason remaining. we will allow hyphenated variable names
Uh oh!
There was an error while loading. Please reload this page.
Background
I'm currently working on upgrading from the deprecated
String
blocks to the newerVariable
objects as part of preparation for the June 2025 deprecation deadline (don't remember exactly, but I have an impression that I've read somewhere). However, I've hit a roadblock with variable naming conventions.The Issue
When trying to register a block with a variable name that contains hyphens, I'm receiving this validation error:
The specific variable name that's failing is
"gcp-cred"
because it contains a hyphen (-
).Question
Is there a specific technical reason or design principle behind restricting Variable names to only lowercase letters, numbers, and underscores?
This seems more restrictive than many other systems that commonly allow hyphens in identifiers. Since I need to migrate several blocks that use hyphenated naming conventions, understanding the reasoning would help me plan my migration approach better.
Also, if this is an intentional restriction, it might be helpful to have this more explicitly documented in the migration guides for those of us moving from String blocks (which presumably allowed hyphens) to Variables.
Thanks for any insights!
The text was updated successfully, but these errors were encountered: