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/12/07 11:26:57 UTC

[GitHub] [airflow] hterik commented on issue #28186: Pod name incorrect in RenderedTaskInstanceFields

hterik commented on issue #28186:
URL: https://github.com/apache/airflow/issues/28186#issuecomment-1340830773

   The pod executing the task is not deleted, it is visible in kubernetes but with a different name.
   
   Pod creation happens in the scheduler, `kubernetes_executor.run_pod_async`. Here the real name is generated that is sent to kubernetes.
   
   However, if i understand the flow correctly, the RenderedTaskInstanceFields is later created inside the pod itself, via the local executor when it calls `taskinstance._execute_task_with_callbacks`
   
                   rtif = RenderedTaskInstanceFields(ti=self, render_templates=False)
                   RenderedTaskInstanceFields.write(rtif)
                   RenderedTaskInstanceFields.delete_old_records(self.task_id, self.dag_id)
   
   RenderedTaskInstanceFields calls ti.render_k8s_pod_yaml() which calls `construct_pod`, where the pod name is regenerated using `make_unique_pod_id`, which as the name suggests is random and a new unique value :)
   
   


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