Skip to content

fix(transport): Forward flush through Arc<T> transports - #1390

Merged
szokeasaurusrex merged 6 commits into
masterfrom
fix/arc-transport-flush
Nov 3, 2026
Merged

szokeasaurusrex merged 6 commits into
masterfrom
fix/arc-transport-flush

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The Transport impl for Arc<T> forwarded send_envelope and shutdown but not flush, so flushing through it hit the trait default and returned true without flushing T. This also affects Client::flush when passing an Arc-wrapped transport to ClientOptions::transport, as in .transport(Arc::new(TestTransport::new())). flush was added to the trait in #314 without updating this impl.

clippy::missing_trait_methods is denied on the impl so a future defaulted Transport method cannot be silently skipped again.

Fixes #1374
Fixes RUST-302

via @szokeasaurusrex.

--

View Junior Session [Sentry]

The `Transport` impl for `Arc<T>` forwarded `send_envelope` and `shutdown` but not `flush`, so flushing through it hit the trait default and returned `true` without flushing `T`. This also affects `Client::flush` when passing an `Arc`-wrapped transport to `ClientOptions::transport`, as in `.transport(Arc::new(TestTransport::new()))`. `flush` was added to the trait in #314 without updating this impl.

`clippy::missing_trait_methods` is denied on the impl so a future defaulted `Transport` method cannot be silently skipped again.

Fixes #1374

Co-Authored-By: Dr. Daniel Szokenstein <[email protected]>
@sentry-junior
sentry-junior Bot requested a review from a team as a code owner October 29, 2026 10:33
Comment thread sentry-core/src/transport/mod.rs Resolved
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown

RUST-302

Comment thread CHANGELOG.md Resolved
Comment thread sentry-core/src/transport/mod.rs Resolved

@szokeasaurusrex szokeasaurusrex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the merge conflict

@szokeasaurusrex
szokeasaurusrex enabled auto-merge (squash) November 3, 2026 12:39
@szokeasaurusrex
szokeasaurusrex merged commit ab2de52 into master Nov 3, 2026
30 checks passed
@szokeasaurusrex
szokeasaurusrex deleted the fix/arc-transport-flush branch November 3, 2026 12:45
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.

Transport::flush on an Arc<T> transport returns true without flushing T

2 participants