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

[GitHub] [superset] zhaoyongjie opened a new pull request, #24323: chore: changing FLASK_ENV to FLASK_DEBUG

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

   ### SUMMARY
   The environment var FLASK_ENV was [deprecated](https://github.com/pallets/flask/issues/4714), same function will use FLASK_DEBUG. This PR intend to fix a warning when I start werkzeug server.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   ### After
   <img width="1198" alt="image" src="https://github.com/apache/superset/assets/2016594/7208273e-4c16-41c2-8c0d-5aa9d6af2616">
   
   ### Before
   <img width="1161" alt="image" src="https://github.com/apache/superset/assets/2016594/3665b0ff-eb0a-47d9-9b6c-ce52287742b5">
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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] zhaoyongjie commented on a diff in pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

Posted by "zhaoyongjie (via GitHub)" <gi...@apache.org>.
zhaoyongjie commented on code in PR #24323:
URL: https://github.com/apache/superset/pull/24323#discussion_r1223242745


##########
superset/config.py:
##########
@@ -1573,7 +1573,7 @@ class ExtraRelatedQueryFilters(TypedDict, total=False):
     try:
         # pylint: disable=import-error,wildcard-import,unused-wildcard-import
         import superset_config
-        from superset_config import *  # type: ignore

Review Comment:
   bycatch, I think it shouldn't add a type ignore.



-- 
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] zhaoyongjie commented on a diff in pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

Posted by "zhaoyongjie (via GitHub)" <gi...@apache.org>.
zhaoyongjie commented on code in PR #24323:
URL: https://github.com/apache/superset/pull/24323#discussion_r1223242745


##########
superset/config.py:
##########
@@ -1573,7 +1573,7 @@ class ExtraRelatedQueryFilters(TypedDict, total=False):
     try:
         # pylint: disable=import-error,wildcard-import,unused-wildcard-import
         import superset_config
-        from superset_config import *  # type: ignore

Review Comment:
   bycatch, I think it shouldn't add a type ignore.



-- 
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] zhaoyongjie commented on pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

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

   Out of date, close it


-- 
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] zhaoyongjie closed pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

Posted by "zhaoyongjie (via GitHub)" <gi...@apache.org>.
zhaoyongjie closed pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG
URL: https://github.com/apache/superset/pull/24323


-- 
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] john-bodley commented on a diff in pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #24323:
URL: https://github.com/apache/superset/pull/24323#discussion_r1224556569


##########
superset/config.py:
##########
@@ -244,7 +244,7 @@ def _try_json_readsha(filepath: str, length: int) -> str | None:
 ]
 
 # Whether to run the web server in debug mode or not
-DEBUG = os.environ.get("FLASK_ENV") == "development"
+DEBUG = os.environ.get("FLASK_DEBUG")

Review Comment:
   Should there be logic to convert a truthy environment variable to a Python bool?



-- 
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] zhaoyongjie commented on a diff in pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

Posted by "zhaoyongjie (via GitHub)" <gi...@apache.org>.
zhaoyongjie commented on code in PR #24323:
URL: https://github.com/apache/superset/pull/24323#discussion_r1224698385


##########
superset/config.py:
##########
@@ -244,7 +244,7 @@ def _try_json_readsha(filepath: str, length: int) -> str | None:
 ]
 
 # Whether to run the web server in debug mode or not
-DEBUG = os.environ.get("FLASK_ENV") == "development"
+DEBUG = os.environ.get("FLASK_DEBUG")

Review Comment:
   Good catch, will update.



-- 
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 #24323: chore: changing FLASK_ENV to FLASK_DEBUG

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24323?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#24323](https://app.codecov.io/gh/apache/superset/pull/24323?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9c93e8f) into [master](https://app.codecov.io/gh/apache/superset/commit/f5148ef728ce649697c10fb7aa65982d7dd05638?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (f5148ef) will **increase** coverage by `0.51%`.
   > The diff coverage is `50.00%`.
   
   > :exclamation: Current head 9c93e8f differs from pull request most recent head f8628a0. Consider uploading reports for the commit f8628a0 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #24323      +/-   ##
   ==========================================
   + Coverage   67.85%   68.36%   +0.51%     
   ==========================================
     Files        1946     1946              
     Lines       75329    75329              
     Branches     8218     8218              
   ==========================================
   + Hits        51113    51502     +389     
   + Misses      22105    21716     -389     
     Partials     2111     2111              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | postgres | `79.18% <50.00%> (?)` | |
   | presto | `?` | |
   | python | `82.73% <50.00%> (+1.06%)` | :arrow_up: |
   | sqlite | `77.71% <50.00%> (ø)` | |
   | unit | `53.88% <50.00%> (ø)` | |
   
   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/24323?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/24323?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29uZmlnLnB5) | `92.02% <50.00%> (ø)` | |
   
   ... and [38 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24323/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] john-bodley commented on a diff in pull request #24323: chore: changing FLASK_ENV to FLASK_DEBUG

Posted by "john-bodley (via GitHub)" <gi...@apache.org>.
john-bodley commented on code in PR #24323:
URL: https://github.com/apache/superset/pull/24323#discussion_r1224556569


##########
superset/config.py:
##########
@@ -244,7 +244,7 @@ def _try_json_readsha(filepath: str, length: int) -> str | None:
 ]
 
 # Whether to run the web server in debug mode or not
-DEBUG = os.environ.get("FLASK_ENV") == "development"
+DEBUG = os.environ.get("FLASK_DEBUG")

Review Comment:
   Should there be logic to convert a truthy environment variable to a Python bool?
   
   ```
   $ FLASK_DEBUG=true python3
   Python 3.9.4 (default, Oct  3 2022, 16:32:43) 
   [Clang 14.0.0 (clang-1400.0.29.102)] on darwin
   Type "help", "copyright", "credits" or "license" for more information.
   >>> import os
   >>> os.environ.get("FLASK_DEBUG")
   'true'
   ```



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