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/07/09 06:22:24 UTC

[GitHub] [airflow] OmairK opened a new pull request #9733: [WIP] Increasing typing coverage for Docker

OmairK opened a new pull request #9733:
URL: https://github.com/apache/airflow/pull/9733


   This PR would increase typing coverage for docker provider #9708 
   ---
   Make sure to mark the boxes below before creating PR: [x]
   - [ ] Description above provides context of the change
   - [ ] Unit tests coverage for changes (not needed for documentation changes)
   - [ ] Target Github ISSUE in description if exists
   - [ ] 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).
   
   ---
   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



[GitHub] [airflow] potiuk commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-663841474


   I've added a fixup: there were two problems -> Iterable is "read only" - so it has no "append" method - so the type should be List explicitly. And clie is set to None initially, and it **should** be initialized, but adding explicit flow to handle the case where it is None, helps mypy to understand that it cannot be None.


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



[GitHub] [airflow] OmairK commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
OmairK commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-663849920


   > I've added a fixup: there were two problems -> Iterable is "read only" - so it has no "append" method - so the type should be List explicitly. And clie is set to None initially, and it **should** be initialized, but adding explicit flow to handle the case where it is None, helps mypy to understand that it cannot be None.
   
   Oh I was totally missing the **explicit flow** part and was looking at the code subjectively. Thank you very much :smile: 


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



[GitHub] [airflow] OmairK commented on pull request #9733: Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
OmairK commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-670052862


   > @OmairK Can you do a rebase?
   
   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



[GitHub] [airflow] codecov-commenter commented on pull request #9733: Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-670027989


   # [Codecov](https://codecov.io/gh/apache/airflow/pull/9733?src=pr&el=h1) Report
   > Merging [#9733](https://codecov.io/gh/apache/airflow/pull/9733?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/817e1ac938667eef9cea4ae6d0502f3ec571bd4a&el=desc) will **decrease** coverage by `54.69%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/9733/graphs/tree.svg?width=650&height=150&src=pr&token=WdLKlKHOAU)](https://codecov.io/gh/apache/airflow/pull/9733?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master    #9733       +/-   ##
   ===========================================
   - Coverage   89.42%   34.73%   -54.70%     
   ===========================================
     Files        1037     1037               
     Lines       49985    49709      -276     
   ===========================================
   - Hits        44699    17266    -27433     
   - Misses       5286    32443    +27157     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #kubernetes-tests-3.6-9.6 | `?` | |
   | #kubernetes-tests-image-3.6-v1.16.9 | `?` | |
   | #kubernetes-tests-image-3.6-v1.17.5 | `?` | |
   | #kubernetes-tests-image-3.6-v1.18.6 | `?` | |
   | #kubernetes-tests-image-3.7-v1.16.9 | `?` | |
   | #kubernetes-tests-image-3.7-v1.17.5 | `?` | |
   | #kubernetes-tests-image-3.7-v1.18.6 | `?` | |
   | #mysql-tests-Core-3.7-5.7 | `?` | |
   | #mysql-tests-Core-3.8-5.7 | `?` | |
   | #mysql-tests-Integration-3.7-5.7 | `?` | |
   | #mysql-tests-Integration-3.8-5.7 | `?` | |
   | #postgres-tests-Core-3.6-10 | `?` | |
   | #postgres-tests-Core-3.6-9.6 | `?` | |
   | #postgres-tests-Core-3.7-10 | `?` | |
   | #postgres-tests-Core-3.7-9.6 | `?` | |
   | #postgres-tests-Integration-3.6-10 | `34.73% <50.00%> (-0.01%)` | :arrow_down: |
   | #postgres-tests-Integration-3.6-9.6 | `?` | |
   | #postgres-tests-Integration-3.7-10 | `?` | |
   | #postgres-tests-Integration-3.7-9.6 | `?` | |
   | #sqlite-tests-Core-3.6 | `?` | |
   | #sqlite-tests-Integration-3.6 | `?` | |
   | #sqlite-tests-Integration-3.8 | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/9733?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/providers/docker/operators/docker\_swarm.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZG9ja2VyL29wZXJhdG9ycy9kb2NrZXJfc3dhcm0ucHk=) | `22.97% <36.84%> (-67.51%)` | :arrow_down: |
   | [airflow/providers/docker/operators/docker.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZG9ja2VyL29wZXJhdG9ycy9kb2NrZXIucHk=) | `19.62% <60.00%> (-75.52%)` | :arrow_down: |
   | [airflow/providers/docker/hooks/docker.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9wcm92aWRlcnMvZG9ja2VyL2hvb2tzL2RvY2tlci5weQ==) | `24.39% <100.00%> (-68.11%)` | :arrow_down: |
   | [airflow/hooks/S3\_hook.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9TM19ob29rLnB5) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [airflow/hooks/pig\_hook.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9waWdfaG9vay5weQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [airflow/hooks/hdfs\_hook.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9oZGZzX2hvb2sucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [airflow/hooks/http\_hook.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9odHRwX2hvb2sucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [airflow/hooks/jdbc\_hook.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9qZGJjX2hvb2sucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [airflow/contrib/\_\_init\_\_.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL19faW5pdF9fLnB5) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [airflow/hooks/druid\_hook.py](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree#diff-YWlyZmxvdy9ob29rcy9kcnVpZF9ob29rLnB5) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [921 more](https://codecov.io/gh/apache/airflow/pull/9733/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/9733?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/9733?src=pr&el=footer). Last update [817e1ac...119742c](https://codecov.io/gh/apache/airflow/pull/9733?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



[GitHub] [airflow] potiuk commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-663856831


   But you can take it from here :)


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



[GitHub] [airflow] mik-laj commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-660701784


   Some static checks are sad. Can you fix 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



[GitHub] [airflow] OmairK commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
OmairK commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-663773963


   
   > Some static checks are sad. Can you fix it?
   
   @mik-laj @potiuk I guess mypy is getting lost in types here. I have been using docker py's documentation for return type annotations but it's still throwing errors. How should I proceed? 
   
   
   


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



[GitHub] [airflow] potiuk merged pull request #9733: Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #9733:
URL: https://github.com/apache/airflow/pull/9733


   


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



[GitHub] [airflow] potiuk commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-663841709


   I've also added a comment to "decode" method. I remember (it was discussed in one of the bug fixes long time ago) that we can get byte sequence rather than string in some cases from the Kubernetes API, so this "if "decode"" is there to handle this case. Somehow after the other fixes mypy "understood" that the "decode" attribute is checked one line above and it stopped complaining. 


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



[GitHub] [airflow] mik-laj commented on pull request #9733: Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-669942244


   @OmairK Can you do a rebase?


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



[GitHub] [airflow] potiuk commented on pull request #9733: [WIP] Increasing typing coverage for Docker

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #9733:
URL: https://github.com/apache/airflow/pull/9733#issuecomment-663856806


   Still there are some indentation problems and example should use keyword parameters in the operator (that's why backport packages are failing) :)


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