airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] ashb commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S worker pod to be configured from JSON/YAML file
Date Tue, 10 Dec 2019 11:40:50 GMT
ashb commented on a change in pull request #6230: [AIRFLOW-5413] Allow K8S worker pod to be
configured from JSON/YAML file
URL: https://github.com/apache/airflow/pull/6230#discussion_r355989214
 
 

 ##########
 File path: airflow/executors/kubernetes_executor.py
 ##########
 @@ -402,22 +405,30 @@ def run_next(self, next_job: KubernetesJobType) -> None:
         status
         """
         self.log.info('Kubernetes job is %s', str(next_job))
+
         key, command, kube_executor_config = next_job
         dag_id, task_id, execution_date, try_number = key
 
-        config_pod = self.worker_configuration.make_pod(
-            namespace=self.namespace,
-            worker_uuid=self.worker_uuid,
-            pod_id=self._create_pod_id(dag_id, task_id),
-            dag_id=self._make_safe_label_value(dag_id),
-            task_id=self._make_safe_label_value(task_id),
+        safe_dag_id = AirflowKubernetesScheduler._make_safe_label_value(dag_id)
+        safe_task_id = AirflowKubernetesScheduler._make_safe_label_value(task_id)
+        safe_date = AirflowKubernetesScheduler._datetime_to_label_safe_datestring(execution_date)
+        safe_pod_id = AirflowKubernetesScheduler._create_pod_id(dag_id, task_id)
+
+        if isinstance(command, str):
+            command = [command]
 
 Review comment:
   Why is this done here? Why is this done at 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

Mime
View raw message