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 2020/10/16 23:45:57 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #11558: Guard against kubernetes not being installed

kaxil commented on a change in pull request #11558:
URL: https://github.com/apache/airflow/pull/11558#discussion_r506764891



##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -187,12 +190,12 @@ def _serialize(cls, var: Any) -> Any:  # Unfortunately there is no support for r
                     {str(k): cls._serialize(v) for k, v in var.items()},
                     type_=DAT.DICT
                 )
-            elif isinstance(var, k8s.V1Pod):
+            elif HAS_KUBERNETES and isinstance(var, k8s.V1Pod):
                 json_pod = PodGenerator.serialize_pod(var)
                 return cls._encode(json_pod, type_=DAT.POD)
             elif isinstance(var, list):
                 return [cls._serialize(v) for v in var]
-            elif isinstance(var, k8s.V1Pod):
+            elif HAS_KUBERNETES and isinstance(var, k8s.V1Pod):

Review comment:
       PR: https://github.com/apache/airflow/pull/11602




----------------------------------------------------------------
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:
users@infra.apache.org