uranusjr commented on code in PR #39187:
URL: https://github.com/apache/airflow/pull/39187#discussion_r1575620075
##########
airflow/serialization/serialized_objects.py:
##########
@@ -698,6 +708,15 @@ def deserialize(cls, encoded_var: Any,
use_pydantic_models=False) -> Any:
return decode_timezone(var)
elif type_ == DAT.RELATIVEDELTA:
return decode_relativedelta(var)
+ elif type_ == DAT.AIRFLOW_EXC_SER:
+ print(f"var={var}")
+ deser = cls.deserialize(var,
use_pydantic_models=use_pydantic_models)
+ exc_cls_name = deser["exc_cls_name"]
+ args = deser["args"]
+ kwargs = deser["kwargs"]
+ del deser
+ exc_cls = import_string(f"airflow.exceptions.{exc_cls_name}")
+ return exc_cls(*args, **kwargs)
Review Comment:
One big problem with re-instantiating exceptions is it looses the
tracebacks. I’m not sure if it’s possible but may be worthwhile looking into.
--
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]