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/03/09 09:39:34 UTC

[GitHub] [airflow] zacharya19 opened a new pull request #7661: [AIRFLOW-XXXX] Sort dag tags in the UI

zacharya19 opened a new pull request #7661: [AIRFLOW-XXXX] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661
 
 
   A bit OCD, but two dags with the same tags can show it in a diff order and it's a bit annoying.
   ![image](https://user-images.githubusercontent.com/5796188/76200560-86d44d00-61fa-11ea-93be-705afcf2e6a7.png)
   
   ---
   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]
   
   - [ ] Description above provides context of the change
   - [ ] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
   - [ ] Relevant documentation is updated including usage instructions.
   - [ ] 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 merged pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661
 
 
   

----------------------------------------------------------------
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 #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#discussion_r390305943
 
 

 ##########
 File path: airflow/www/templates/airflow/dags.html
 ##########
 @@ -105,7 +105,7 @@ <h2>DAGs</h2>
                     </span>
 
                     <div style="float: right; max-width: 70%; text-align: right; line-height: 160%;">
-                    {% for tag in dag.tags %}
+                    {% for tag in dag.tags | sort(attribute='name') %}
 
 Review comment:
   > Why ?
   So that if someone removes the sorting code, it should fail the test so we know that it is broken
   
   > How ?
   https://github.com/apache/airflow/blob/master/tests/www/test_views.py#L441 file has got test to check if "certain" text exists or not. 
   
   --
   
   The other part what I commented was that maybe we sort the list before we pass it to the UI
   
   I am happy to merge it as it is for now, but we should take care of 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] zacharya19 commented on issue #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
zacharya19 commented on issue #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#issuecomment-596489747
 
 
   @feluelle Done :)

----------------------------------------------------------------
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] zacharya19 commented on a change in pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
zacharya19 commented on a change in pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#discussion_r390134634
 
 

 ##########
 File path: airflow/www/templates/airflow/dags.html
 ##########
 @@ -105,7 +105,7 @@ <h2>DAGs</h2>
                     </span>
 
                     <div style="float: right; max-width: 70%; text-align: right; line-height: 160%;">
-                    {% for tag in dag.tags %}
+                    {% for tag in dag.tags | sort(attribute='name') %}
 
 Review comment:
   I do not fully understand why (and how) this should be tested.

----------------------------------------------------------------
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 #7661: [AIRFLOW-XXXX] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7661: [AIRFLOW-XXXX] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#issuecomment-596459184
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=h1) Report
   > Merging [#7661](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/b39468d2878554ba60863656364b4a95eda30685?src=pr&el=desc) will **increase** coverage by `0.07%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7661/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7661      +/-   ##
   ==========================================
   + Coverage   86.76%   86.84%   +0.07%     
   ==========================================
     Files         897      897              
     Lines       42819    42819              
   ==========================================
   + Hits        37153    37186      +33     
   + Misses       5666     5633      -33
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/providers/postgres/hooks/postgres.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvcG9zdGdyZXMvaG9va3MvcG9zdGdyZXMucHk=) | `94.36% <0%> (+15.49%)` | :arrow_up: |
   | [...roviders/google/cloud/operators/postgres\_to\_gcs.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL29wZXJhdG9ycy9wb3N0Z3Jlc190b19nY3MucHk=) | `85.29% <0%> (+32.35%)` | :arrow_up: |
   | [airflow/providers/postgres/operators/postgres.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvcG9zdGdyZXMvb3BlcmF0b3JzL3Bvc3RncmVzLnB5) | `100% <0%> (+50%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7661?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/7661?src=pr&el=footer). Last update [b39468d...bccb2c1](https://codecov.io/gh/apache/airflow/pull/7661?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] kaxil commented on a change in pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#discussion_r389967385
 
 

 ##########
 File path: airflow/www/templates/airflow/dags.html
 ##########
 @@ -105,7 +105,7 @@ <h2>DAGs</h2>
                     </span>
 
                     <div style="float: right; max-width: 70%; text-align: right; line-height: 160%;">
-                    {% for tag in dag.tags %}
+                    {% for tag in dag.tags | sort(attribute='name') %}
 
 Review comment:
   Or maybe sorting it python side https://github.com/apache/airflow/blob/master/airflow/models/dag.py#L1481-L1530
   
   ?

----------------------------------------------------------------
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 #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#discussion_r389965444
 
 

 ##########
 File path: airflow/www/templates/airflow/dags.html
 ##########
 @@ -105,7 +105,7 @@ <h2>DAGs</h2>
                     </span>
 
                     <div style="float: right; max-width: 70%; text-align: right; line-height: 160%;">
-                    {% for tag in dag.tags %}
+                    {% for tag in dag.tags | sort(attribute='name') %}
 
 Review comment:
   Can you please add a test for it in test/www/views.py ?

----------------------------------------------------------------
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 edited a comment on issue #7661: [AIRFLOW-7016] Sort dag tags in the UI

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7661: [AIRFLOW-7016] Sort dag tags in the UI
URL: https://github.com/apache/airflow/pull/7661#issuecomment-596459184
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=h1) Report
   > Merging [#7661](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/b39468d2878554ba60863656364b4a95eda30685?src=pr&el=desc) will **increase** coverage by `0.18%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7661/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7661      +/-   ##
   ==========================================
   + Coverage   86.76%   86.95%   +0.18%     
   ==========================================
     Files         897      900       +3     
     Lines       42819    43605     +786     
   ==========================================
   + Hits        37153    37915     +762     
   - Misses       5666     5690      +24
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7661?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...rflow/providers/google/cloud/operators/dataflow.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL29wZXJhdG9ycy9kYXRhZmxvdy5weQ==) | `90.44% <0%> (-8.65%)` | :arrow_down: |
   | [...ders/google/cloud/example\_dags/example\_bigquery.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2JpZ3F1ZXJ5LnB5) | `100% <0%> (ø)` | :arrow_up: |
   | [...irflow/providers/google/cloud/hooks/datacatalog.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2hvb2tzL2RhdGFjYXRhbG9nLnB5) | `91.74% <0%> (ø)` | |
   | [...ow/providers/google/cloud/operators/datacatalog.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL29wZXJhdG9ycy9kYXRhY2F0YWxvZy5weQ==) | `93.41% <0%> (ø)` | |
   | [...s/google/cloud/example\_dags/example\_datacatalog.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2V4YW1wbGVfZGFncy9leGFtcGxlX2RhdGFjYXRhbG9nLnB5) | `100% <0%> (ø)` | |
   | [airflow/jobs/scheduler\_job.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9qb2JzL3NjaGVkdWxlcl9qb2IucHk=) | `90.68% <0%> (+0.02%)` | :arrow_up: |
   | [airflow/providers/google/cloud/hooks/dataflow.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL2hvb2tzL2RhdGFmbG93LnB5) | `88.96% <0%> (+0.59%)` | :arrow_up: |
   | [airflow/\_\_init\_\_.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9fX2luaXRfXy5weQ==) | `100% <0%> (+8%)` | :arrow_up: |
   | [airflow/providers/postgres/hooks/postgres.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvcG9zdGdyZXMvaG9va3MvcG9zdGdyZXMucHk=) | `94.36% <0%> (+15.49%)` | :arrow_up: |
   | [...roviders/google/cloud/operators/postgres\_to\_gcs.py](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZ29vZ2xlL2Nsb3VkL29wZXJhdG9ycy9wb3N0Z3Jlc190b19nY3MucHk=) | `85.29% <0%> (+32.35%)` | :arrow_up: |
   | ... and [1 more](https://codecov.io/gh/apache/airflow/pull/7661/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7661?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/7661?src=pr&el=footer). Last update [b39468d...962831d](https://codecov.io/gh/apache/airflow/pull/7661?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