potiuk commented on code in PR #56733:
URL: https://github.com/apache/airflow/pull/56733#discussion_r2436915722
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -925,8 +925,11 @@ def deserialize(cls, encoded_var: Any) -> Any:
elif type_ == DAT.DATETIME:
return from_timestamp(var)
elif type_ == DAT.POD:
- if not _has_kubernetes():
- raise RuntimeError("Cannot deserialize POD objects without
kubernetes libraries installed!")
+ # lazy import PogGenerator here if needed and set HAS_KUBERNETES
to True and import the generator
+ # because if we need to deserialize Pod, we MUST have PodGenerator
imported
+ _has_kubernetes(force=True)
+ from airflow.providers.cncf.kubernetes.pod_generator import
PodGenerator
+
Review Comment:
I see - but Right now it crashes if the other side has no k8s libraries
installed (see main failures) - because it cannot deserialize the objects - so
I guess we should simply silently ignore it
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]