Skip to content

Comments

[v3-1-test] Fix recursion depth error in _redact_exception_with_context (#61776)#61795

Merged
potiuk merged 1 commit intov3-1-testfrom
backport-1533ecf-v3-1-test
Feb 15, 2026
Merged

[v3-1-test] Fix recursion depth error in _redact_exception_with_context (#61776)#61795
potiuk merged 1 commit intov3-1-testfrom
backport-1533ecf-v3-1-test

Conversation

@github-actions
Copy link

  • Fix recursion depth error in _redact_exception_with_context

Fix recursion depth check in _redact_exception_with_context_or_cause.
There are some obscure cases where exception might point to itself
in cause/context - this PR protects against it.

Changed name to include cause as well.

Initially implemented as a fix to v2-11-test in #61254 - enhanced
with the case of removal of too-deep exceptions rather than
not-redacting it (and replacing it with sentinel exception explaining
that reminder of the stack trace has been removed.

Co-authored-by: Anton Nitochkin nitochkin@google.com

  • Apply suggestions from code review

Co-authored-by: Copilot 175728472+Copilot@users.noreply.github.com


(cherry picked from commit 1533ecf)

Co-authored-by: Jarek Potiuk jarek@potiuk.com
Co-authored-by: Anton Nitochkin nitochkin@google.com
Co-authored-by: Copilot 175728472+Copilot@users.noreply.github.com

@potiuk potiuk marked this pull request as ready for review February 12, 2026 00:21
@potiuk potiuk added this to the Airflow 3.1.8 milestone Feb 12, 2026
…xt (#61776)

* Fix recursion depth error in _redact_exception_with_context

Fix recursion depth check in _redact_exception_with_context_or_cause.
There are some obscure cases where exception might point to itself
in cause/context - this PR protects against it.

Changed name to include cause as well.

Initially implemented as a fix to v2-11-test in #61254 - enhanced
with the case of removal of too-deep exceptions rather than
not-redacting it (and replacing it with sentinel exception explaining
that reminder of the stack trace has been removed.

Co-authored-by: Anton Nitochkin <nitochkin@google.com>

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------
(cherry picked from commit 1533ecf)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Anton Nitochkin <nitochkin@google.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@potiuk potiuk force-pushed the backport-1533ecf-v3-1-test branch from 6ec30f4 to 10895e5 Compare February 15, 2026 22:58
@potiuk potiuk merged commit 978c47b into v3-1-test Feb 15, 2026
53 checks passed
@potiuk potiuk deleted the backport-1533ecf-v3-1-test branch February 15, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant