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 2022/05/31 16:32:18 UTC
[GitHub] [airflow] mariasumedre-3pg opened a new pull request, #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
mariasumedre-3pg opened a new pull request, #24054:
URL: https://github.com/apache/airflow/pull/24054
Closes #23955
Added param docs for KubernetesHook and KubernetesPodOperator:
- KubernetesHook: `in_cluster`, `config_file`, `cluster_context`, `client_configuration`
Mentioned parameters are all optional.
- KubernetesPodOperator: `env_from`, `node_selectors`, `pod_runtime_info_envs`, `configmaps`
`node_selectors` is a deprecated parameter, the rest are optional.
Text is taken from code, or from Kubernetes docs
Please let me know if I should change anything.
---
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
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 a newsfragement file, named `{pr_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
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] mariasumedre-3pg commented on a diff in pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
mariasumedre-3pg commented on code in PR #24054:
URL: https://github.com/apache/airflow/pull/24054#discussion_r887615585
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -112,6 +112,12 @@ class KubernetesPodOperator(BaseOperator):
:param labels: labels to apply to the Pod. (templated)
:param startup_timeout_seconds: timeout in seconds to startup the pod.
:param get_logs: get the stdout of the container as logs of the tasks.
+ :param env_from: (Optional) List of sources to populate environment variables in the container.
+ The keys defined within a source must be a C_IDENTIFIER.
+ All invalid keys will be reported as an event when the container is starting.
+ When a key exists in multiple sources, the value associated with the last source
+ will take precedence. Values defined by an Env with a duplicate key will take precedence.
+ Cannot be updated.
Review Comment:
Done, also moved `env_from` right after `env_vars`. Thank you.
--
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] rbiegacz commented on a diff in pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
rbiegacz commented on code in PR #24054:
URL: https://github.com/apache/airflow/pull/24054#discussion_r885906030
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -142,6 +150,12 @@ class KubernetesPodOperator(BaseOperator):
:param priority_class_name: priority class name for the launched Pod
:param termination_grace_period: Termination grace period if task killed in UI,
defaults to kubernetes default
+ :param pod_runtime_info_envs: (Optional) A list of environment variables,
+ to be set in the container. Cannot be updated.
+ :param configmaps: (Optional) A list of names of config maps which coselects a ConfigMap
Review Comment:
coselects -> collects ?
--
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] jedcunningham merged pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
jedcunningham merged PR #24054:
URL: https://github.com/apache/airflow/pull/24054
--
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] github-actions[bot] commented on pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #24054:
URL: https://github.com/apache/airflow/pull/24054#issuecomment-1144025598
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.
--
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] jedcunningham commented on a diff in pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
jedcunningham commented on code in PR #24054:
URL: https://github.com/apache/airflow/pull/24054#discussion_r887301319
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -112,6 +112,12 @@ class KubernetesPodOperator(BaseOperator):
:param labels: labels to apply to the Pod. (templated)
:param startup_timeout_seconds: timeout in seconds to startup the pod.
:param get_logs: get the stdout of the container as logs of the tasks.
+ :param env_from: (Optional) List of sources to populate environment variables in the container.
+ The keys defined within a source must be a C_IDENTIFIER.
+ All invalid keys will be reported as an event when the container is starting.
+ When a key exists in multiple sources, the value associated with the last source
+ will take precedence. Values defined by an Env with a duplicate key will take precedence.
+ Cannot be updated.
Review Comment:
I don't think these lines provide value for KPO. Also, this should be in the right spot below `env_vars`.
```suggestion
```
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -143,6 +151,12 @@ class KubernetesPodOperator(BaseOperator):
:param priority_class_name: priority class name for the launched Pod
:param termination_grace_period: Termination grace period if task killed in UI,
defaults to kubernetes default
+ :param pod_runtime_info_envs: (Optional) A list of environment variables,
+ to be set in the container. Cannot be updated.
Review Comment:
```suggestion
:param pod_runtime_info_envs: (Optional) A list of environment variables,
to be set in the container.
:param termination_grace_period: Termination grace period if task killed in UI,
defaults to kubernetes default
```
Reordered, plus we don't need the 'Cannot be updated', as this doesn't make sense in the KPO context.
--
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] boring-cyborg[bot] commented on pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #24054:
URL: https://github.com/apache/airflow/pull/24054#issuecomment-1147991350
Awesome work, congrats on your first merged pull request!
--
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] mariasumedre-3pg commented on pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
mariasumedre-3pg commented on PR #24054:
URL: https://github.com/apache/airflow/pull/24054#issuecomment-1148228654
Thank you all for helping!
--
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] mariasumedre-3pg commented on a diff in pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
mariasumedre-3pg commented on code in PR #24054:
URL: https://github.com/apache/airflow/pull/24054#discussion_r886080369
##########
airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py:
##########
@@ -142,6 +150,12 @@ class KubernetesPodOperator(BaseOperator):
:param priority_class_name: priority class name for the launched Pod
:param termination_grace_period: Termination grace period if task killed in UI,
defaults to kubernetes default
+ :param pod_runtime_info_envs: (Optional) A list of environment variables,
+ to be set in the container. Cannot be updated.
+ :param configmaps: (Optional) A list of names of config maps which coselects a ConfigMap
Review Comment:
It was a typo from the conversion function documentation: [V1ConfigMapEnvSource](https://github.com/kubernetes-client/python/blob/b313b5e74f7cf222ccc39d8c5bf8a07502bd6db3/kubernetes/docs/V1ConfigMapEnvSource.md) which is called for every config map in the list. Using `collects` seems more appropriate. Will do the change, thank you.
--
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] boring-cyborg[bot] commented on pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on PR #24054:
URL: https://github.com/apache/airflow/pull/24054#issuecomment-1142363309
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/main/CONTRIBUTING.rst)
Here are some useful points:
- Pay attention to the quality of your code (flake8, mypy and type annotations). Our [pre-commits]( https://github.com/apache/airflow/blob/main/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/main/docs/apache-airflow/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/main/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/main/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://s.apache.org/airflow-slack
--
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] jedcunningham commented on pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
jedcunningham commented on PR #24054:
URL: https://github.com/apache/airflow/pull/24054#issuecomment-1147991760
Thanks @mariasumedre-3pg! Congrats on your first commit π
--
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] potiuk commented on pull request #24054: Add param docs to KubernetesHook and KubernetesPodOperator (#23955)
Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #24054:
URL: https://github.com/apache/airflow/pull/24054#issuecomment-1147423613
I think you need to rebase and fix conflicts (and possibly tests @mariasumedre-3pg )
--
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