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

[GitHub] [superset] mistercrunch opened a new pull request, #24404: chore: deprecate FLASK_ENV and improve conf.ENVIRONMENT_TAG_CONFIG

mistercrunch opened a new pull request, #24404:
URL: https://github.com/apache/superset/pull/24404

   Flask is deprecating FLASK_ENV, leading to this msg in the interpreter:
   ```
   'FLASK_ENV' is deprecated and will not be used in Flask 2.3. Use 'FLASK_DEBUG' instead.
   ```
   
   ### SUMMARY
   Moving away from using `FLASK_ENV` and creating a `SUPERSET_ENV` instead. Cleaning up the code around the configuration `ENVIRONMENT_TAG_CONFIG` too that relied on that.
   
   Adding a note on `UPDATING.md` at it may affect some environments, mostly should just affect whether and how that warning tag in the navbar shows up.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   


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


[GitHub] [superset] rusackas merged pull request #24404: chore: deprecate FLASK_ENV and improve conf.ENVIRONMENT_TAG_CONFIG

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #24404:
URL: https://github.com/apache/superset/pull/24404


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


[GitHub] [superset] rusackas commented on pull request #24404: chore: deprecate FLASK_ENV and improve conf.ENVIRONMENT_TAG_CONFIG

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #24404:
URL: https://github.com/apache/superset/pull/24404#issuecomment-1595409373

   Two questions on this one: 
   1) Do we need to pull the thread on the sweater and tackle all this other stuff? Particularly the contributing docs:
   <img width="496" alt="image" src="https://github.com/apache/superset/assets/812905/37253da9-b164-4647-a8d3-e2b954166b62">
   
   2) Does this create issues and edge cases around scripts and automation that might be considered a breaking change by some? 


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


[GitHub] [superset] codecov[bot] commented on pull request #24404: chore: deprecate FLASK_ENV and improve conf.ENVIRONMENT_TAG_CONFIG

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24404:
URL: https://github.com/apache/superset/pull/24404#issuecomment-1591968252

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24404?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#24404](https://app.codecov.io/gh/apache/superset/pull/24404?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ec14d52) into [master](https://app.codecov.io/gh/apache/superset/commit/17e79ace794b58e32fe5b91ab5725de33d9fbc38?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (17e79ac) will **decrease** coverage by `10.85%`.
   > The diff coverage is `85.71%`.
   
   > :exclamation: Current head ec14d52 differs from pull request most recent head 56e65d8. Consider uploading reports for the commit 56e65d8 to get more accurate results
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #24404       +/-   ##
   ===========================================
   - Coverage   68.95%   58.11%   -10.85%     
   ===========================================
     Files        1903     1903               
     Lines       74070    74071        +1     
     Branches     8110     8110               
   ===========================================
   - Hits        51077    43048     -8029     
   - Misses      20881    28911     +8030     
     Partials     2112     2112               
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `53.86% <85.71%> (+<0.01%)` | :arrow_up: |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `53.79% <85.71%> (+<0.01%)` | :arrow_up: |
   | python | `60.79% <85.71%> (-22.52%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `54.55% <0.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24404?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [superset/config.py](https://app.codecov.io/gh/apache/superset/pull/24404?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `91.37% <0.00%> (-0.60%)` | :arrow_down: |
   | [superset/views/base.py](https://app.codecov.io/gh/apache/superset/pull/24404?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvdmlld3MvYmFzZS5weQ==) | `58.10% <100.00%> (-14.69%)` | :arrow_down: |
   
   ... and [300 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24404/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


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


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

Posted by "dpgaspar (via GitHub)" <gi...@apache.org>.
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