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/03/02 15:10:19 UTC

[GitHub] [airflow] ashb commented on a change in pull request #21916: Add map_index label to mapped KubernetesPodOperator

ashb commented on a change in pull request #21916:
URL: https://github.com/apache/airflow/pull/21916#discussion_r817787199



##########
File path: airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py
##########
@@ -282,13 +282,17 @@ def _get_ti_pod_labels(context: Optional[dict] = None, include_try_number: bool
         if not context:
             return {}
 
-        labels = {
-            'dag_id': context['dag'].dag_id,
-            'task_id': context['task'].task_id,
-            'execution_date': context['ts'],
-        }
+        ti = context['ti']
+
+        labels = {'dag_id': ti.dag_id, 'task_id': ti.task_id, 'execution_date': context['ts']}

Review comment:
       I had that at first here but it makes the change about task mapping hard to see, so I've got it in a separate commit/pr
   
   (If you haven't noticed I'm a big fan of Pr=one thing)




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