You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/12/30 16:42:14 UTC

[airflow] branch main updated: Clarify docstring for ``build_pod_request_obj`` in K8s providers (#20574)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e07e831  Clarify docstring for ``build_pod_request_obj`` in K8s providers (#20574)
e07e831 is described below

commit e07e8319465ea4598791b6b61b5fe7c46f159f86
Author: Daniel Standish <15...@users.noreply.github.com>
AuthorDate: Thu Dec 30 08:41:44 2021 -0800

    Clarify docstring for ``build_pod_request_obj`` in K8s providers (#20574)
    
    It's unclear what was referred to by `pod` because there isn't a `pod` parameter. I attempt to replace with clearer (and accurate) information.
---
 airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py b/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
index be2d775..a296b07 100644
--- a/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
+++ b/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
@@ -493,9 +493,10 @@ class KubernetesPodOperator(BaseOperator):
 
     def build_pod_request_obj(self, context=None):
         """
-        Creates a V1Pod based on user parameters. Note that a `pod` or `pod_template_file`
-        will supersede all other values.
+        Returns V1Pod object based on pod template file, full pod spec, and other operator parameters.
 
+        The V1Pod attributes are derived (in order of precedence) from operator params, full pod spec, pod
+        template file.
         """
         self.log.debug("Creating pod for KubernetesPodOperator task %s", self.task_id)
         if self.pod_template_file: