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/01/15 22:06:21 UTC

[GitHub] [airflow] CaptainCuddleCube opened a new pull request #7184: [AIRFLOW 6574] Adding private_environment to docker operator.

CaptainCuddleCube opened a new pull request #7184: [AIRFLOW 6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184
 
 
   The docker operator currently does not have a means to pass in an environment dict that is not exposed by the frontend's task instance view, along with all the other Task instance attributes. 
   
   This PR proposes a private_environment parameter that should prevent the frontend from exposes this attribute. This would be useful for the cases where the docker container will be getting the passwords by the environment variables.
   
   ---
   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] CaptainCuddleCube closed pull request #7184: [AIRFLOW-6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
CaptainCuddleCube closed pull request #7184: [AIRFLOW-6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184
 
 
   

----------------------------------------------------------------
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] stale[bot] commented on issue #7184: [AIRFLOW-6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #7184: [AIRFLOW-6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184#issuecomment-593738311
 
 
   This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
   

----------------------------------------------------------------
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 #7184: [AIRFLOW-6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #7184: [AIRFLOW-6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184#issuecomment-574899987
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=h1) Report
   > Merging [#7184](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/8729ca525ccd2c976248b818440932242720a25b?src=pr&el=desc) will **decrease** coverage by `0.35%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7184/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7184      +/-   ##
   ==========================================
   - Coverage   85.24%   84.88%   -0.36%     
   ==========================================
     Files         710      723      +13     
     Lines       39485    39544      +59     
   ==========================================
   - Hits        33660    33568      -92     
   - Misses       5825     5976     +151
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/operators/docker\_operator.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvZG9ja2VyX29wZXJhdG9yLnB5) | `96.9% <100%> (+0.03%)` | :arrow_up: |
   | [airflow/operators/mysql\_operator.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvbXlzcWxfb3BlcmF0b3IucHk=) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvbXlzcWxfdG9faGl2ZS5weQ==) | `0% <0%> (-100%)` | :arrow_down: |
   | [airflow/contrib/hooks/azure\_data\_lake\_hook.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2hvb2tzL2F6dXJlX2RhdGFfbGFrZV9ob29rLnB5) | `0% <0%> (-93.11%)` | :arrow_down: |
   | [airflow/contrib/sensors/azure\_cosmos\_sensor.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL3NlbnNvcnMvYXp1cmVfY29zbW9zX3NlbnNvci5weQ==) | `0% <0%> (-81.25%)` | :arrow_down: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7184/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/7184/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/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `45.25% <0%> (-46.72%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   | [...rflow/contrib/operators/kubernetes\_pod\_operator.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZF9vcGVyYXRvci5weQ==) | `78.31% <0%> (-20.49%)` | :arrow_down: |
   | ... and [36 more](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7184?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/7184?src=pr&el=footer). Last update [8729ca5...33bf3b7](https://codecov.io/gh/apache/airflow/pull/7184?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] codecov-io edited a comment on issue #7184: [AIRFLOW-6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #7184: [AIRFLOW-6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184#issuecomment-574899987
 
 
   # [Codecov](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=h1) Report
   > Merging [#7184](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=desc) into [master](https://codecov.io/gh/apache/airflow/commit/8729ca525ccd2c976248b818440932242720a25b?src=pr&el=desc) will **decrease** coverage by `0.14%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/airflow/pull/7184/graphs/tree.svg?width=650&token=WdLKlKHOAU&height=150&src=pr)](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #7184      +/-   ##
   ==========================================
   - Coverage   85.24%   85.09%   -0.15%     
   ==========================================
     Files         710      723      +13     
     Lines       39485    39544      +59     
   ==========================================
   - Hits        33660    33651       -9     
   - Misses       5825     5893      +68
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/airflow/pull/7184?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [airflow/operators/docker\_operator.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvZG9ja2VyX29wZXJhdG9yLnB5) | `96.9% <100%> (+0.03%)` | :arrow_up: |
   | [airflow/operators/mysql\_operator.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvbXlzcWxfb3BlcmF0b3IucHk=) | `100% <0%> (ø)` | :arrow_up: |
   | [airflow/operators/mysql\_to\_hive.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9vcGVyYXRvcnMvbXlzcWxfdG9faGl2ZS5weQ==) | `100% <0%> (ø)` | :arrow_up: |
   | [airflow/contrib/hooks/azure\_data\_lake\_hook.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL2hvb2tzL2F6dXJlX2RhdGFfbGFrZV9ob29rLnB5) | `0% <0%> (-93.11%)` | :arrow_down: |
   | [airflow/contrib/sensors/azure\_cosmos\_sensor.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL3NlbnNvcnMvYXp1cmVfY29zbW9zX3NlbnNvci5weQ==) | `0% <0%> (-81.25%)` | :arrow_down: |
   | [airflow/kubernetes/volume\_mount.py](https://codecov.io/gh/apache/airflow/pull/7184/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/7184/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/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3BvZF9sYXVuY2hlci5weQ==) | `45.25% <0%> (-46.72%)` | :arrow_down: |
   | [airflow/kubernetes/refresh\_config.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9rdWJlcm5ldGVzL3JlZnJlc2hfY29uZmlnLnB5) | `50.98% <0%> (-23.53%)` | :arrow_down: |
   | [...rflow/contrib/operators/kubernetes\_pod\_operator.py](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree#diff-YWlyZmxvdy9jb250cmliL29wZXJhdG9ycy9rdWJlcm5ldGVzX3BvZF9vcGVyYXRvci5weQ==) | `78.31% <0%> (-20.49%)` | :arrow_down: |
   | ... and [36 more](https://codecov.io/gh/apache/airflow/pull/7184/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/airflow/pull/7184?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/7184?src=pr&el=footer). Last update [8729ca5...33bf3b7](https://codecov.io/gh/apache/airflow/pull/7184?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] ashb commented on a change in pull request #7184: [AIRFLOW-6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #7184: [AIRFLOW-6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184#discussion_r367375648
 
 

 ##########
 File path: airflow/operators/docker_operator.py
 ##########
 @@ -66,6 +66,9 @@ class DockerOperator(BaseOperator):
     :type docker_url: str
     :param environment: Environment variables to set in the container. (templated)
     :type environment: dict
+    :param private_environment: Private environment variables to set in the container.
+        These variables will not be shown on the task instance view in the browser. (templated)
 
 Review comment:
   If it's templated it will be shown in the UI.

----------------------------------------------------------------
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] boring-cyborg[bot] commented on issue #7184: [AIRFLOW 6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #7184: [AIRFLOW 6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184#issuecomment-574878742
 
 
   Congratulations on your first Pull Request and welcome to the Apache Airflow community!
   If you have any issues or are unsure about any anything please check our
   Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
   
   Here are some useful points:
   - Pay attention to the quality of your code (flake8, pylint and type annotations). Our [pre-commits](
   https://github.com/apache/airflow/blob/master/STATIC_CODE_CHECKS.rst#prerequisites-for-pre-commit-hooks)
   will help you with that.
   - In case of a new feature add useful documentation (in docstrings or in `docs/` directory).
   Adding a new operator? Consider adding an example DAG that shows how users should use it.
   - Consider using [Breeze environment](https://github.com/apache/airflow/blob/master/BREEZE.rst) for testing
   locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
   - Be patient and persistent. It might take some time to get a review or get the final approval from
   Committers.
   
   Apache Airflow is a community-driven project and together we are making it better 🚀.
   
   In case of doubts contact the developers at:
   Mailing List: dev@airflow.apache.org
   Slack: https://apache-airflow-slack.herokuapp.com/
   

----------------------------------------------------------------
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] CaptainCuddleCube commented on a change in pull request #7184: [AIRFLOW-6574] Adding private_environment to docker operator.

Posted by GitBox <gi...@apache.org>.
CaptainCuddleCube commented on a change in pull request #7184: [AIRFLOW-6574] Adding private_environment to docker operator.
URL: https://github.com/apache/airflow/pull/7184#discussion_r367400820
 
 

 ##########
 File path: airflow/operators/docker_operator.py
 ##########
 @@ -66,6 +66,9 @@ class DockerOperator(BaseOperator):
     :type docker_url: str
     :param environment: Environment variables to set in the container. (templated)
     :type environment: dict
+    :param private_environment: Private environment variables to set in the container.
+        These variables will not be shown on the task instance view in the browser. (templated)
 
 Review comment:
   Sorry, the private_environment is not templated. That is a typo.

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