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/06/15 18:48:10 UTC

[GitHub] [airflow] dstandish commented on a diff in pull request #24478: Return empty dict if Pod JSON encoding fails

dstandish commented on code in PR #24478:
URL: https://github.com/apache/airflow/pull/24478#discussion_r898305607


##########
airflow/utils/json.py:
##########
@@ -81,6 +81,9 @@ def _default(obj):
         elif k8s is not None and isinstance(obj, (k8s.V1Pod, k8s.V1ResourceRequirements)):
             from airflow.kubernetes.pod_generator import PodGenerator
 
-            return PodGenerator.serialize_pod(obj)
+            try:
+                return PodGenerator.serialize_pod(obj)
+            except Exception:

Review Comment:
   sure 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