XD-DENG commented on code in PR #28436:
URL: https://github.com/apache/airflow/pull/28436#discussion_r1051751431


##########
airflow/utils/log/file_task_handler.py:
##########
@@ -191,16 +191,20 @@ def _read(self, ti: TaskInstance, try_number: int, 
metadata: dict[str, Any] | No
                 log += f"*** {str(e)}\n"
                 return log, {"end_of_log": True}
         elif self._should_check_k8s(ti.queue):
+            pod_override = ti.executor_config.get("pod_override")
+            if pod_override and pod_override.metadata and 
pod_override.metadata.namespace:
+                namespace = pod_override.metadata.namespace
+            else:
+                namespace = conf.get("kubernetes_executor", "namespace")

Review Comment:
   Currently the user is specifying the namespace (if not default namespace in 
the config) in the executor config. When creating the TI, also storing the 
actual namespace bing used in the TI record sounds sensible to me.
   
   One concern is that this is only applicable when `KubernetesExecutor` is 
being used. Making it too "explicit" may confuse users who always only use 
other executors.
   
   



-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to