Repository navigation
Conversation
Co-authored-by: wbarnha <25623043+wbarnha@users.noreply.github.com>
Co-authored-by: wbarnha <25623043+wbarnha@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #796 +/- ##
==========================================
- Coverage 96.20% 96.20% -0.01%
==========================================
Files 110 110
Lines 11789 11791 +2
Branches 1281 1282 +1
==========================================
+ Hits 11342 11343 +1
- Misses 350 351 +1
Partials 97 97 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Moved from #795. The forwarding case is already covered by the existing SASLCredentials(username="foo", password="bar") parametrization. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013m2okVri4b65RudZMXhYv2
|
Generated by Claude Code |
|
Generated by Claude Code |
Root cause of #794 and how to fix itFaust isn't losing the credentials. Two things in the reporter's environment replace their config before the producer is built. Both reproduce on master (61f3c55). 1. Environment variables take precedence over arguments passed to faust.App("super-app", broker="kafka://localhost:9098", ...)
# producer bootstrap_servers -> ['127.0.0.1:9092']That's why the traceback shows 2. The credentials were How to fix it (works on any version)
What this PR changesThis PR doesn't fix the reporter's setup. What it changes: when Possible follow-up (not in this PR)Environment variables silently overriding explicit Generated by Claude Code |
SASL/PLAIN producer initialization was reported to fail because
sasl_plain_usernameandsasl_plain_passwordwere missing when Faust started a producer for an app configured with broker credentials. The reported path is easy to miss becauseprocessing_guarantee="exactly_once"does not imply transactional producer startup outside a worker context.Regression coverage for the reported startup path
Producer.on_start()with:processing_guarantee="exactly_once"broker="kafka://localhost:9098"broker_credentials=faust.SASLCredentials(..., mechanism="PLAIN")security_protocol="SASL_PLAINTEXT"sasl_mechanism="PLAIN"sasl_plain_usernamesasl_plain_passwordFail fast on incomplete SASL/PLAIN credentials (moved from Add regression coverage for SASL/PLAIN credentials #795)
credentials_to_aiokafka_authraisesImproperlyConfiguredwhenSASLCredentials(mechanism="PLAIN")is missing a username or password, instead of letting aiokafka fail later with aValueError. The message points at the App that owns the topic and does not include credential values.(None, None),(None, pw),(user, None).Change-set cleanup
🤖 Generated with Claude Code
https://claude.ai/code/session_013m2okVri4b65RudZMXhYv2