benjreinhart commented on a change in pull request #14008:
URL: https://github.com/apache/superset/pull/14008#discussion_r609155531



##########
File path: .github/workflows/ephemeral-env.yml
##########
@@ -28,6 +29,22 @@ jobs:
           const result = pattern.exec(context.payload.comment.body)
           return result === null ? 'noop' : result[1]
 
+    - name: Eval comment body for feature flags
+      uses: actions/github-script@v3
+      id: eval-feature-flags
+      with:
+        script: |
+          const pattern = /FEATURE_(\w+)=(\w+)/g;
+          let results = [];
+          [...context.payload.comment.body.matchAll(pattern)].forEach(match => 
{
+            const config = {
+              name: `SUPERSET_FEATURE_${match[1]}`,

Review comment:
       Why do we need to prefix these with `SUPERSET_`?

##########
File path: superset/config.py
##########
@@ -374,6 +376,15 @@ def _try_json_readsha(  # pylint: disable=unused-argument
 if DEFAULT_FEATURE_FLAGS["THUMBNAILS"]:
     DEFAULT_FEATURE_FLAGS["LISTVIEWS_DEFAULT_CARD_VIEW"] = True
 
+# Feature flags may also be set via 'SUPERSET_FEATURE_' prefixed environment 
vars.
+DEFAULT_FEATURE_FLAGS.update(
+    {
+        k[len("SUPERSET_FEATURE_") :]: bool(strtobool(v))
+        for k, v in os.environ.items()
+        if re.search(r"^SUPERSET_FEATURE_\w+", k)

Review comment:
       tiny nit but `startswith` might be simpler here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to