You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Vishwaspatel2401 (via GitHub)" <gi...@apache.org> on 2026/07/11 19:50:54 UTC
[PR] fix: preserve exception args when serializing built-in exceptions [airflow]
Vishwaspatel2401 opened a new pull request, #69766:
URL: https://github.com/apache/airflow/pull/69766
## Description
`BaseSerialization` was adding an extra list/tuple layer around the `args` of built-in exceptions such as `KeyError` and `AttributeError` during serialization.
```python
"args": [var.args]
```
Because `var.args` is already a tuple, an exception such as `KeyError("boom")` was serialized incorrectly:
```python
from airflow.serialization.serialized_objects import BaseSerialization
result = BaseSerialization.deserialize(
BaseSerialization.serialize(KeyError("boom"))
)
result.args # (("boom",),) instead of ("boom",)
```
This change preserves the exception’s original `args` exactly during serialization and deserialization.
Closes #69743.
## Tests
Added parametrized test cases to `test_serialize_deserialize` in `test_serialized_objects.py` covering:
* `KeyError("boom")`
* `AttributeError("boom")`
* `KeyError("a", "b")`
The tests verify that `.args` is preserved exactly after serialization and deserialization. All 40 parametrized test cases pass.
---
##### Was generative AI tooling used to co-author this PR?
* [x] Yes
Generated-by: Claude Code, used in accordance with the project’s contribution guidelines.
--
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
Re: [PR] fix: preserve exception args when serializing built-in exceptions [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #69766:
URL: https://github.com/apache/airflow/pull/69766#issuecomment-6457238325
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
--
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
Re: [PR] fix: preserve exception args when serializing built-in exceptions [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #69766:
URL: https://github.com/apache/airflow/pull/69766#issuecomment-5021165720
@Vishwaspatel2401 This PR has a few issues that need to be addressed before it can be reviewed — please see our [Pull Request quality criteria](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-quality-criteria).
**Issues found:**
- :x: **Pre-commit / static checks**: Failing: `CI image checks / Static checks`. Run `prek run --from-ref main --stage pre-commit` locally to reproduce and fix.
> **Note:** Your branch is **161 commits behind `main`**. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.
**What to do next:**
- Fix each issue listed above.
- Make sure static checks pass locally (`prek run --from-ref main --stage pre-commit`).
- Mark the PR as "Ready for review" when you're done.
There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the [Airflow Slack](https://s.apache.org/airflow-slack).
---
_Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this [two-stage triage process](https://github.com/apache/airflow/blob/main/contributing-docs/25_maintainer_pr_triage.md#why-the-first-pass-is-automated) so that our maintainers' limited time is spent where it matters most: the conversation with you._
--
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