You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/02/27 16:10:29 UTC

[GitHub] [airflow] nuclearpinguin opened a new pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

nuclearpinguin opened a new pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572
 
 
   Before:
   ```
   root@3f957e731266:/opt/airflow# airflow version
   [2020-02-27 16:09:09,092] {settings.py:177} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=902
     ____________       _____________
    ____    |__( )_________  __/__  /________      __
   ____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| / /
   ___  ___ |  / _  /   _  __/ _  / / /_/ /_ |/ |/ /
    _/_/  |_/_/  /_/    /_/    /_/  \____/____/|__/  v2.0.0.dev0
   ```
   
   after:
   
   ```
   root@3f957e731266:/opt/airflow# airflow version
   v2.0.0.dev0
   ```
   
   ---
   Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
   
   Make sure to mark the boxes below before creating PR: [x]
   
   - [x] Description above provides context of the change
   - [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [x] Unit tests coverage for changes (not needed for documentation changes)
   - [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [x] Relevant documentation is updated including usage instructions.
   - [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
   
   <sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
   
   ---
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385258199
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"v{airflow.__version__}")
 
 Review comment:
   We should probably remove `v` too.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] kaxil merged pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] feluelle commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385596550
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"{airflow.__version__}")
 
 Review comment:
   ```suggestion
       print(airflow.__version__)
   ```
   
   Wait a second.. why are we now still using f string if it is only one variable without any extra string attached to 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] zhongjiajie commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385599306
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"{airflow.__version__}")
 
 Review comment:
   Good catch!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385643642
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"{airflow.__version__}")
 
 Review comment:
   😅

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] zhongjiajie commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
zhongjiajie commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385510607
 
 

 ##########
 File path: airflow/settings.py
 ##########
 @@ -173,8 +173,8 @@ def configure_orm(disable_connection_pool=False):
         # https://docs.sqlalchemy.org/en/13/core/pooling.html#disconnect-handling-pessimistic
         pool_pre_ping = conf.getboolean('core', 'SQL_ALCHEMY_POOL_PRE_PING', fallback=True)
 
-        log.info("settings.configure_orm(): Using pool settings. pool_size={}, max_overflow={}, "
-                 "pool_recycle={}, pid={}".format(pool_size, max_overflow, pool_recycle, os.getpid()))
+        log.debug("settings.configure_orm(): Using pool settings. pool_size=%d, max_overflow=%d, "
+                  "pool_recycle=%d, pid=%d", pool_size, max_overflow, pool_recycle, os.getpid())
 
 Review comment:
   I think it ok, just a small change, unless we create a PR change all log and and some static test for 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385223627
 
 

 ##########
 File path: airflow/settings.py
 ##########
 @@ -173,8 +173,8 @@ def configure_orm(disable_connection_pool=False):
         # https://docs.sqlalchemy.org/en/13/core/pooling.html#disconnect-handling-pessimistic
         pool_pre_ping = conf.getboolean('core', 'SQL_ALCHEMY_POOL_PRE_PING', fallback=True)
 
-        log.info("settings.configure_orm(): Using pool settings. pool_size={}, max_overflow={}, "
-                 "pool_recycle={}, pid={}".format(pool_size, max_overflow, pool_recycle, os.getpid()))
+        log.debug("settings.configure_orm(): Using pool settings. pool_size=%d, max_overflow=%d, "
+                  "pool_recycle=%d, pid=%d", pool_size, max_overflow, pool_recycle, os.getpid())
 
 Review comment:
   You are right, however, I am not sure if this log information is so crucial that it deserves separate PR? @feluelle @mik-laj 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] codecov-io commented on issue #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#issuecomment-592504957
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=h1) Report
   > Merging [#7572](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/2cc8d20fcfff64717b492ed34f2808bf4a5c85c9?src=pr&el=desc) will **decrease** coverage by `0.34%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7572/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7572      +/-   ##
   ==========================================
   - Coverage   86.82%   86.48%   -0.35%     
   ==========================================
     Files         896      896              
     Lines       42635    42621      -14     
   ==========================================
   - Hits        37017    36859     -158     
   - Misses       5618     5762     +144
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/settings.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9zZXR0aW5ncy5weQ==) | `93.66% <100%> (ø)` | :arrow_up: |
   | [airflow/cli/commands/version\_command.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9jbGkvY29tbWFuZHMvdmVyc2lvbl9jb21tYW5kLnB5) | `100% <100%> (ø)` | :arrow_up: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZV9tb3VudC5weQ==) | `44.44% <0%> (-55.56%)` | :arrow_down: |
   | [airflow/kubernetes/volume.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3ZvbHVtZS5weQ==) | `52.94% <0%> (-47.06%)` | :arrow_down: |
   | [airflow/kubernetes/pod\_launcher.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `47.18% <0%> (-45.08%)` | :arrow_down: |
   | [airflow/executors/sequential\_executor.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9leGVjdXRvcnMvc2VxdWVudGlhbF9leGVjdXRvci5weQ==) | `56% <0%> (-44%)` | :arrow_down: |
   | [...viders/cncf/kubernetes/operators/kubernetes\_pod.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvY25jZi9rdWJlcm5ldGVzL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZC5weQ==) | `69.69% <0%> (-25.26%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   | [airflow/utils/dag\_processing.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy91dGlscy9kYWdfcHJvY2Vzc2luZy5weQ==) | `81.94% <0%> (-4.58%)` | :arrow_down: |
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `89.89% <0%> (-0.43%)` | :arrow_down: |
   | ... and [5 more](https://codecov.io/gh/apache/airflow/pull/7572/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=footer). Last update [2cc8d20...295aa11](https://codecov.io/gh/apache/airflow/pull/7572?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] nuclearpinguin commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
nuclearpinguin commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385641688
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"{airflow.__version__}")
 
 Review comment:
   Fixed 😅

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385258385
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"v{airflow.__version__}")
 
 Review comment:
   ```suggestion
       print(f"{airflow.__version__}")
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385258199
 
 

 ##########
 File path: airflow/cli/commands/version_command.py
 ##########
 @@ -16,9 +16,8 @@
 # under the License.
 """Version command"""
 import airflow
-from airflow import settings
 
 
 def version(args):
     """Displays Airflow version at the command line"""
-    print(settings.HEADER + "  v" + airflow.__version__)
+    print(f"v{airflow.__version__}")
 
 Review comment:
   We should probably remove `v` too

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow] feluelle commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command

Posted by GitBox <gi...@apache.org>.
feluelle commented on a change in pull request #7572: [AIRFLOW-6948] Remove ASCII Airflow from version command
URL: https://github.com/apache/airflow/pull/7572#discussion_r385220207
 
 

 ##########
 File path: airflow/settings.py
 ##########
 @@ -173,8 +173,8 @@ def configure_orm(disable_connection_pool=False):
         # https://docs.sqlalchemy.org/en/13/core/pooling.html#disconnect-handling-pessimistic
         pool_pre_ping = conf.getboolean('core', 'SQL_ALCHEMY_POOL_PRE_PING', fallback=True)
 
-        log.info("settings.configure_orm(): Using pool settings. pool_size={}, max_overflow={}, "
-                 "pool_recycle={}, pid={}".format(pool_size, max_overflow, pool_recycle, os.getpid()))
+        log.debug("settings.configure_orm(): Using pool settings. pool_size=%d, max_overflow=%d, "
+                  "pool_recycle=%d, pid=%d", pool_size, max_overflow, pool_recycle, os.getpid())
 
 Review comment:
   I think this should be a separate PR. This log will not only be displayed when printing airflow version.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services