bujjibabukatta opened a new pull request, #69752:
URL: https://github.com/apache/airflow/pull/69752
Ran into this from #69743 — `BaseSerialization` was mangling `args` for
built-in exceptions like `KeyError` on the round trip.
Turns out the exception-serialization branch for `KeyError`/`AttributeError`
was storing `args` as `[var.args]`. Since `var.args` is already a tuple
(e.g. `("boom",)`), that wraps it in an extra layer. When deserializing,
`exc_cls(*args)` unpacks that as a single positional arg — so you get
`KeyError(("boom",))` instead of `KeyError("boom")`, and `.args` comes back
as `(("boom",),)` instead of `("boom",)`.
Fix is a one-liner: store `list(var.args)` instead of `[var.args]` so it
stays flat.
Added a parametrized test covering single-arg, multi-arg, and no-arg
`KeyError`/`AttributeError` round-trips so this doesn't regress.
closes: #69743
--
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]