Fix Kafka rebalancing when opentracing is not installed - #787
Merged
wbarnha merged 1 commit intoAug 19, 2026
Merged
Conversation
opentracing is not installed
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #787 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 110 110
Lines 11790 11790
Branches 1281 1281
=======================================
Hits 11343 11343
Misses 350 350
Partials 97 97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thank you for the patch, this should've been originally included. I'll get this merged and released ASAP! |
wbarnha
pushed a commit
that referenced
this pull request
Aug 19, 2026
#787 landed the same root-cause fix for #786 while this branch was open, so defer to it: `faust/utils/_opentracing.py` is taken from master verbatim, and its parity tests (`test_opentracing_shim.py`) stand as the guard for the stand-in itself. What master does not have, and this branch keeps: `traced_from_parent_span()` still assumes the parent span it is given has a tracer. Master's fix means the stand-in always supplies one, so the reported crash is gone either way -- but a span is whatever the configured tracer hands back, and tracing is instrumentation. It now runs the wrapped function untraced rather than failing its caller. The tests are cut down to what `test_opentracing_shim.py` does not already cover, and moved to `test_tracing.py` to match: the tracerless parent (by argument and through the context variable), error propagation, and both rebalance callbacks with the stand-in substituted for the real library -- the wiring the parity tests note they do not reach. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sejq9tYzzeqWeZAgA3EB6s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
Mitigate
AttributeErrors happening whenopentracingextra is missing.Fixes #786