fix(connectors): log underlying errors instead of discarding them in SDK poll/consume paths#3200
Open
atharvalade wants to merge 1 commit intoapache:masterfrom
Open
Conversation
…SDK poll/consume paths
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3200 +/- ##
=============================================
- Coverage 74.10% 58.33% -15.77%
Complexity 943 943
=============================================
Files 1159 1158 -1
Lines 102033 91926 -10107
Branches 79083 68976 -10107
=============================================
- Hits 75607 53623 -21984
- Misses 23765 35723 +11958
+ Partials 2661 2580 -81
🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Closes #3171
Rationale
Silent error swallowing in connector SDK made debugging connector failures nearly impossible — only generic "Failed to poll/consume" messages appeared with zero root-cause context.
What changed?
The source SDK's
handle_messagesloop discarded theErrvariant fromsource.poll()andpostcard::to_allocvec, logging only a static string. The sink SDK had the same pattern across allpostcard::from_bytesdeserialization calls,try_into_payload, andsink.consume()(which wasn't logged at all).All
let Ok(x) = expr else { ... }patterns are replaced withmatchto bind and format the underlying error into the existing log lines. No behavioral change — same control flow (continue/return codes) — just makes the root cause visible.Local Execution
cargo fmt --check,cargo clippy,trailing-whitespace,trailing-newline,license-headersall green)AI Usage
cargo clippy,cargo fmt --check, and full CI script suite locally