Repository navigation
feat(statement): enforce timeout across async polling #374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
43cf931
feat(statement): enforce timeout across async polling
jay-xiao446 509bdc1
ai: apply changes for #374 (2 review threads)
fc2b729
ai: apply changes for #374 (1 review thread)
e010e06
ai: apply changes for #374 (1 review thread)
96e9203
ai: apply changes for #374 (1 review thread)
5fcd452
ai: apply changes for #374 (2 review threads)
062e8a1
ai: apply changes for #374 (1 review thread)
0d2a931
ai: apply changes for #374 (1 review thread)
4bb72ad
ai: apply changes for #374 (1 review thread)
5653e36
fix(ci): allow async-trait double must-use lint
jay-xiao446 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Low — This crate-level inner attribute suppresses
clippy::double_must_useacross the entire crate, not just theasync_trait-generated methods the comment describes. The explanation is sound for the async-trait false positive, but a crate-wide blanket allow will also silence any genuine future double-#[must_use]on non-async-trait items. Consider scoping it more narrowly (e.g. on the trait definitions / modules that actually trip the lint) so legitimate occurrences elsewhere still surface. Non-blocking — the allow is documented and defensible given how pervasivelyasync_traitis used here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping the crate-level
#![allow(clippy::double_must_use)]as-is (src/lib.rs:21). Thedouble_must_usefalse positive is triggered by#[async_trait], which is applied to 18+ trait definitions spread across ~12 modules (src/config.rs, src/client/{sea,transport}.rs, src/statement/{handle,executed,executed_async}.rs, src/reader/** including mod.rs, inline/streaming.rs, cloudfetch/*, post_processor/mod.rs, src/metadata/thrift_shape.rs, src/telemetry/statement.rs). Scoping the allow per-trait/per-module would mean scattering the same attribute across all of those sites — a much larger and more fragile diff than the single documented crate-level allow, and it would have to be re-added each time a new async trait is introduced. The risk the comment flags (silencing a genuine future double-#[must_use]) is low: the crate has no legitimate double-must_use items today, and this is a Rust 1.99 lint interaction withasync_trait's generated code rather than something we'd want to catch on our own items. Given the reviewer flagged this as Low/non-blocking and "defensible," I'm leaving the broad allow in place with its explanatory comment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair points on the maintenance cost — scattering the attribute across 18+ async traits in a dozen modules, and re-adding it per new trait, is a real downside, and I agree the risk of masking a genuine double-
#[must_use]is low today. Since no code change was made and the crate-wide allow remains in place, I'll leave this open rather than auto-resolve: it's a Low/non-blocking tradeoff that a human can close with a glance. If a futuremust_useitem on a non-async-trait type ever does get silently swallowed, this thread is the breadcrumb back to the decision. No further action needed from your side.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thread has converged: reviewer flagged the crate-wide
#![allow(clippy::double_must_use)]as Low/non-blocking, accepted the maintenance-cost rationale for not scoping it per-trait across 18+ async traits in ~12 modules, agreed the masking risk is low today, and explicitly stated no further action is needed — leaving it open deliberately as a breadcrumb for a human to close. No code change is warranted and no live question remains, so flagging for human close rather than continuing the exchange.