Rename the init action variable out of the reserved namespace - #219
Merged
Conversation
WODBY_* is reserved for platform-owned values, and service manifests may only define names in it when a privileged user publishes into the Wodby organizations. Importing such a manifest anywhere else is rejected, which made the init action unusable outside those orgs. WODBY2_ is not reserved, so WODBY2_SERVICE_INIT_ACTION can be declared by any service manifest and imported anywhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reads
WODBY2_SERVICE_INIT_ACTIONinstead ofWODBY_INIT_ACTION.WODBY_*is reserved:ValidateUserEnvVarNamerejects it, and a service manifest may only declare such a name when a Super Admin, Wodbot, or a full-access member of thewodby-2organization publishes it. Importing one of those manifests into any other organization fails with "Environment variable name ... is reserved by Wodby", which made the init action unusable outside the Wodby orgs.The reserved prefix is
WODBY_exactly, soWODBY2_is outside it — the same escape the existingWODBY2_MIGRATIONS_ADD_LEGACY_WODBY1_ENV_VARSmarker uses. Verified againstutil.ValidateUserEnvVarName:WODBY_INIT_ACTIONis rejected,WODBY2_SERVICE_INIT_ACTIONis allowed.Must be released before the service manifests switch to the new name, otherwise a manifest would set a variable the deployed image does not read and the init action would silently stop running.