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/11/15 23:28:35 UTC

[GitHub] [airflow] alikhtag opened a new pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

alikhtag opened a new pull request #10302:
URL: https://github.com/apache/airflow/pull/10302


   There is a BUG in helm chart where, setting anything in `podMutation` in `values.yaml` does not seem to affect anything. Currently these `podMutations` will not apply during deployment to `airflow_local_settings.py`, hence they will not be used by Kubernetes Executor and Pod Operator to correctly set `taints` and `affinities` in pod configuration. 
   
   This PR should fix this, but only if `.Values.scheduler.airflowLocalSettings` were not set but it seems it was by design originally. 
   
   ### If you like to reproduce the bug:
   * Firstly use `KubernetesExecutor` for the `Airflow` deployment. 
   * Simply add desired `toleration` and/or `affinity` in `podMutation`.
   * Deploy some dag/task etc. 
   * Check that newly created pods do not have either `tolerations` and `affinities` set in their pod configuration. 
   


----------------------------------------------------------------
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] jedcunningham commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   I'm going to close this since all `podMutation` parameters have been removed from the chart at this point. This functionality can still be achieved with `airflowLocalSettings` without being too cumbersome.


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] alikhtag edited a comment on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
alikhtag edited a comment on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-673751455


   > Why are we not just having podMutation as a string and allowing people to write whatever function they want? I don't want to start prescribing values or we'll maintain it forever.
   
   Hmm this yaml configuration of `podMutation` is very useful, since it will transform to json (or python dict), which is harder to write as string in this yaml, in my opinion. But `podMutation` can have a templating string ( using `tpl .values.podMutiation.pythonFunctionStr` ) as value as well. So if one decides to write function themselves they can overwrite it or use the yaml `k:v` for templating. I will add this idea soon. 


----------------------------------------------------------------
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] alikhtag commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   I don't understand why `postgres` and `mysql` CI failed, current changes I would think would've not affected 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] ashb commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   @alikhtag Airflow 2.0 -- we changed the format of pod mutation hooks quite a lot -- it now takes the Kube API Model object directly rather than Airflow's own classes. 
   See https://github.com/apache/airflow/pull/10393 and https://github.com/apache/airflow/pull/9903 for example


----------------------------------------------------------------
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] dimberman commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   Also you're gonna need to make the pod_mutation_hook function compliant with 2.0 :)


----------------------------------------------------------------
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] alikhtag edited a comment on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
alikhtag edited a comment on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-673751455


   > Why are we not just having podMutation as a string and allowing people to write whatever function they want? I don't want to start prescribing values or we'll maintain it forever.
   
   Hmm this yaml configuration of `podMutation` is very useful, since it will transform `toleration` and `affinity` to json (or python dict), which is harder to write as string in this yaml, in my opinion. But `podMutation` can have a templating string ( using `tpl .values.podMutiation.pythonFunctionStr` ) as value as well. So if one decides to write function themselves they can overwrite it or use the yaml `k:v` for templating. I will add this idea soon. 


----------------------------------------------------------------
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] stale[bot] commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-706789517


   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



[GitHub] [airflow] potiuk commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   @dimberman  - it looks cool, but I want your opinion here as well :)


----------------------------------------------------------------
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] dimberman commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   Hi @alikhtag, would you like to rebase this PR so we can merge it? If not I can take this on and tag you as the author.


----------------------------------------------------------------
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] alikhtag commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   > Why are we not just having podMutation as a string and allowing people to write whatever function they want? I don't want to start prescribing values or we'll maintain it forever.
   
   Hmm this yaml configuration of `podMutation` is very useful, since it will transform to json (or python dict), which is harder to write as string in this yaml, in my opinion. But `podMutation` can have a templating string ( using `tpl .values.podMutiation.pythonFunctionStr` ) as value as well. So if one decides to write function themselves they can overwrite it or use the yaml for templating. I will add this idea soon. 


----------------------------------------------------------------
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] alikhtag edited a comment on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
alikhtag edited a comment on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-673751455


   > Why are we not just having podMutation as a string and allowing people to write whatever function they want? I don't want to start prescribing values or we'll maintain it forever.
   
   Hmm this yaml configuration of `podMutation` is very useful, since it will transform `toleration` and `affinity` to json (or python dict), which is harder to write as string in this yaml, in my opinion. But `podMutation` can have a templating string ( using `tpl .Values.podMutiation.podMutationHookTpl .` ) as value as well. So if one decides to write function themselves they can overwrite it or use the yaml `k:v` for templating. I will add this idea soon. 


----------------------------------------------------------------
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] alikhtag edited a comment on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
alikhtag edited a comment on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-673751455


   > Why are we not just having podMutation as a string and allowing people to write whatever function they want? I don't want to start prescribing values or we'll maintain it forever.
   
   Hmm this yaml configuration of `podMutation` is very useful, since it will transform `toleration` and `affinity` to json (or python dict), which is harder to write as string in this yaml, in my opinion. But `podMutation` can have a templating string ( using `tpl .values.podMutiation.podMutationHookTpl` ) as value as well. So if one decides to write function themselves they can overwrite it or use the yaml `k:v` for templating. I will add this idea soon. 


----------------------------------------------------------------
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 #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   I'd say those were transient errors. I re-run all jobs now to see if it helps


----------------------------------------------------------------
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] alikhtag commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   @dimberman does current implementation satisfy the maintainability requirement? 


----------------------------------------------------------------
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] dimberman commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   @alikhtag are you interested in finishing this?


-- 
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] github-actions[bot] commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-804494678


   This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days 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



[GitHub] [airflow] alikhtag commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   > Also you're gonna need to make the pod_mutation_hook function compliant with 2.0 :)
   
   Hi @dimberman. What do you refer to `2.0`? Helm `2.0`? If yes I can probably do that during this week. 


----------------------------------------------------------------
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] dimberman commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   @alikhtag can you please get the tests to pass? Would be glad to merge once they are passing :).


----------------------------------------------------------------
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] alikhtag edited a comment on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
alikhtag edited a comment on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-673953041


   I don't understand why `postgres` and `mysql` CI failed, current changes I would think would've not affected that section?


----------------------------------------------------------------
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] boring-cyborg[bot] commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on pull request #10302:
URL: https://github.com/apache/airflow/pull/10302#issuecomment-673031800


   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.
   - Please follow [ASF Code of Conduct](https://www.apache.org/foundation/policies/conduct) for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
   - 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



[GitHub] [airflow] jedcunningham closed pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
jedcunningham closed pull request #10302:
URL: https://github.com/apache/airflow/pull/10302


   


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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] stale[bot] closed pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

Posted by GitBox <gi...@apache.org>.
stale[bot] closed pull request #10302:
URL: https://github.com/apache/airflow/pull/10302


   


----------------------------------------------------------------
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] dimberman commented on pull request #10302: [BUGFIX] podMutations are now deployed correctly to airflow_local_settings.py

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


   Why are we not just having podMutation as a string and allowing people to write whatever function they want? I don't want to start prescribing values or we'll maintain it forever.


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