kaxil commented on a change in pull request #10756:
URL: https://github.com/apache/airflow/pull/10756#discussion_r484510031
##########
File path: airflow/kubernetes/pod_generator.py
##########
@@ -324,47 +325,36 @@ def add_sidecar(pod: k8s.V1Pod) -> k8s.V1Pod:
@staticmethod
def from_obj(obj) -> Optional[k8s.V1Pod]:
"""Converts to pod from obj"""
+
if obj is None:
return None
- if isinstance(obj, PodGenerator):
- return obj.gen_pod()
-
- if not isinstance(obj, dict):
- raise TypeError(
- 'Cannot convert a non-dictionary or non-PodGenerator '
- 'object into a KubernetesExecutorConfig')
+ k8s_legacy_object = obj.get("KubernetesExecutor", None)
Review comment:
The only thing that would have existed in dict under
`KubernetesExecutor` is the `executor_config`, right?
Just double-checking to verify that we don't raise deprecation warning for
other cases
----------------------------------------------------------------
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]