You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ashb (via GitHub)" <gi...@apache.org> on 2026/09/02 21:24:33 UTC
Re: [PR] validate exception type when deserializing serialized exceptions [airflow]
ashb commented on code in PR #68662:
URL: https://github.com/apache/airflow/pull/68662#discussion_r3918814443
##########
airflow-core/src/airflow/serialization/serialized_objects.py:
##########
@@ -631,6 +631,11 @@ def deserialize(cls, encoded_var: Any) -> Any:
return parse_timezone(var)
elif type_ == DAT.RELATIVEDELTA:
return decode_relativedelta(var)
+ elif type_ in (DAT.AIRFLOW_EXC_SER, DAT.BASE_EXC_SER):
+ # Legacy rows only. ``exc_cls_name`` is payload-supplied, so it is never resolved or
+ # called; the recorded args are rendered with BaseException semantics, giving the same
+ # string form an exception now serializes to.
+ return str(BaseException(*cls.deserialize(var).get("args", ())))
Review Comment:
This probably shouldn't be BaseException -- `try ... except Exception:`can't catch BaseExeception.
--
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