Skip to content
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

closurebuilder - Allow any value for MONETATE_FLAG #2

Merged

Conversation

lomegor
Copy link

@lomegor lomegor commented Apr 25, 2018

We don't want to restrict the flags to only False and True values. See https://github.com/monetate/monetate-frontend-api/pull/117/files

@lomegor lomegor requested a review from krismolendyke April 25, 2018 10:31
@@ -47,7 +47,7 @@
^(mc\. # Must be a property of the monetate common namespace. Capture group 1.
[a-zA-Z]+\. # Must have it's own module namespace. Capture group 1.
[A-Z0-9_]+) # Must follow the constant format. Capture group 1.
=(true|false)$ # Must assign a boolean. Capture group 2.
=(.*)$ # Must assign a value. Capture group 2.

Choose a reason for hiding this comment

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

Capturing anything seems a bit "dangerous" since now there will be no true validation on the value of the feature flag. Could potentially put values in there that aren't valid for the flag being set and nothing will be spit out as an error.

Copy link
Author

Choose a reason for hiding this comment

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

Even if we add possible values here, it can still fail because for example a variable that's a number gets overriden with a boolean or viceversa. I agree with your concern, but not sure if there's a good way to solve this.

@lomegor lomegor merged commit a145472 into monetate:r708.monetate May 2, 2018
@lomegor lomegor deleted the allow-any-value-feature-flag branch May 2, 2018 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants