Skip to content

[v2-11-test] Fix recursion depth error in _redact_exception_with_context#61797

Merged
potiuk merged 1 commit intoapache:v2-11-testfrom
potiuk:cherry-pick-recursion-fix
Feb 12, 2026
Merged

[v2-11-test] Fix recursion depth error in _redact_exception_with_context#61797
potiuk merged 1 commit intoapache:v2-11-testfrom
potiuk:cherry-pick-recursion-fix

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Feb 12, 2026

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.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@potiuk potiuk requested a review from ashb February 12, 2026 00:39
@potiuk potiuk changed the title Fix recursion depth error in _redact_exception_with_context [v2-11-test] Fix recursion depth error in _redact_exception_with_context Feb 12, 2026
@potiuk potiuk added this to the Airflow 2.11.1 milestone Feb 12, 2026
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 apache#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>

(cherry picked from commit (1533ecf)
@potiuk potiuk merged commit c439a21 into apache:v2-11-test Feb 12, 2026
57 of 58 checks passed
@potiuk potiuk deleted the cherry-pick-recursion-fix branch February 12, 2026 21:08
potiuk added a commit that referenced this pull request Feb 16, 2026
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>

(cherry picked from commit (1533ecf)
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

Comments