naruto-lgtm commented on code in PR #68662:
URL: https://github.com/apache/airflow/pull/68662#discussion_r3967150088
##########
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:
Good catch. Switched it to Exception in 4ba235b2. It's only str()'d here
rather than raised, so nothing actually escapes an except clause, but every
exception that ever went through this path is an Exception subclass anyway, and
the rendered string is byte-identical since __str__ comes from BaseException
either way.
--
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]