kaxil commented on a change in pull request #9903:
URL: https://github.com/apache/airflow/pull/9903#discussion_r463201851
##########
File path: airflow/kubernetes/pod_launcher.py
##########
@@ -62,8 +64,20 @@ def __init__(self,
self.extract_xcom = extract_xcom
def run_pod_async(self, pod, **kwargs):
- """Runs POD asynchronously"""
- pod_mutation_hook(pod)
+ """Runs POD asynchronously
+
+ :param pod:
+ :type pod: k8s.V1Pod
+ """
+ try:
+ # attempts to run pod_mutation_hook using old pod, if this
+ # fails we attempt to run with k8s official pod
+ dummy_pod = convert_to_airflow_pod(pod)
+ pod_mutation_hook(dummy_pod)
+ dummy_pod = dummy_pod.to_v1_kubernetes_pod()
+ PodGenerator.reconcile_pods(pod, dummy_pod)
+ except AttributeError:
+ pod_mutation_hook(pod)
Review comment:
Created : https://github.com/apache/airflow/pull/10067
----------------------------------------------------------------
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:
[email protected]