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/30 09:49:58 UTC

[GitHub] [airflow] Javier162380 opened a new pull request #8009: Cli/kubernetes

Javier162380 opened a new pull request #8009: Cli/kubernetes
URL: https://github.com/apache/airflow/pull/8009
 
 
   Adding a new command to the Airflow CLI.
   ``` bash
   airflow kubernetes pod-preview dag-id --sub-dir
   ```
   The idea is to be able to generate pod templates from KubernetesPodOperator, so given a target dag it can generate all the k8s pod templates and printing in the CLI.
   
   Example.
   
   ![image](https://user-images.githubusercontent.com/25264748/77898454-6e94a280-727b-11ea-8ca3-64141e02b040.png)
   ![image](https://user-images.githubusercontent.com/25264748/77898528-91bf5200-727b-11ea-9847-50f454f3a879.png)
   
   Just one consideration I am not connecting to any Kubernetes client so I am generating a default service account which means that you can launch this pod in a Kubernetes cluster with a command like this.
   ```
   kubectl apply -f file.yaml
   ```
   Any feedback here is appreciated.
   
   Also to be able to test this feature I need to add a new example-dag, 
   ``` bash
   example_kubernetes_pod_operator.py
   ```
   It is the same example given by Google in their composer tutorial (https://cloud.google.com/composer/docs/how-to/using/using-kubernetes-pod-operator), but adapting the imports to the new Kubernetes module import system.
   
   
   ---
   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
   - [ ] 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).
   
   ---
   In the 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 backward 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] Javier162380 commented on issue #8009: Airflow kubernetes cli command for generating pod templates

Posted by GitBox <gi...@apache.org>.
Javier162380 commented on issue #8009: Airflow kubernetes cli command for generating pod templates
URL: https://github.com/apache/airflow/pull/8009#issuecomment-606507310
 
 
   > I think you will need to rebase it, we had some fixes in master!
   
   ok this can explain why the travis test 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


With regards,
Apache Git Services

[GitHub] [airflow] boring-cyborg[bot] commented on issue #8009: Cli/kubernetes

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8009: Cli/kubernetes
URL: https://github.com/apache/airflow/pull/8009#issuecomment-605899469
 
 
   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? Check this short [guide](https://github.com/apache/airflow/blob/master/docs/howto/custom-operator.rst) 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.
   - Be sure to read the [Airflow Coding style]( https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#coding-style-and-best-practices).
   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] Javier162380 commented on issue #8009: Airflow kubernetes cli command for generating pod templates

Posted by GitBox <gi...@apache.org>.
Javier162380 commented on issue #8009: Airflow kubernetes cli command for generating pod templates
URL: https://github.com/apache/airflow/pull/8009#issuecomment-606547171
 
 
   > Some yes. Possibly not all.
   
   ok I already rebase it let's hope this time tests pass

----------------------------------------------------------------
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] Javier162380 commented on issue #8009: Airflow kubernetes cli command for generating pod templates

Posted by GitBox <gi...@apache.org>.
Javier162380 commented on issue #8009: Airflow kubernetes cli command for generating pod templates
URL: https://github.com/apache/airflow/pull/8009#issuecomment-607886993
 
 
   the integration tests are still failing any clue @potiuk ?

----------------------------------------------------------------
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] potiuk commented on issue #8009: Airflow kubernetes cli command for generating pod templates

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #8009: Airflow kubernetes cli command for generating pod templates
URL: https://github.com/apache/airflow/pull/8009#issuecomment-606507933
 
 
   Some yes. Possibly not all.

----------------------------------------------------------------
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] potiuk commented on issue #8009: Airflow kubernetes cli command for generating pod templates

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #8009: Airflow kubernetes cli command for generating pod templates
URL: https://github.com/apache/airflow/pull/8009#issuecomment-606419070
 
 
   I think you will need to rebase it, we had some fixes in master!

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