You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dpgaspar (via GitHub)" <gi...@apache.org> on 2023/06/15 10:12:13 UTC

[GitHub] [superset] dpgaspar commented on a diff in pull request #24404: chore: deprecate FLASK_ENV and improve conf.ENVIRONMENT_TAG_CONFIG

dpgaspar commented on code in PR #24404:
URL: https://github.com/apache/superset/pull/24404#discussion_r1230772242


##########
superset/views/base.py:
##########
@@ -334,6 +334,30 @@ def render_app_template(self) -> FlaskResponse:
         )
 
 
+def get_environment_tag() -> dict[str, Any]:
+    # Whether flask is in debug mode (--debug)
+    debug = appbuilder.app.config.get("DEBUG")

Review Comment:
   you can just use `superset_app` here



##########
superset/views/base.py:
##########
@@ -334,6 +334,30 @@ def render_app_template(self) -> FlaskResponse:
         )
 
 
+def get_environment_tag() -> dict[str, Any]:
+    # Whether flask is in debug mode (--debug)
+    debug = appbuilder.app.config.get("DEBUG")
+
+    # Getting the configuration option for ENVIRONMENT_TAG_CONFIG
+    env_tag_config = appbuilder.app.config.get("ENVIRONMENT_TAG_CONFIG")

Review Comment:
   we assume config keys are always defined
   `superset_app.config["ENVIRONMENT_TAG_CONFIG"]`
   



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org