Add clippy check to sandbox CI#22402
Conversation
PR Reviewer Guide 🔍(Review updated until commit 8944983)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 8944983 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 570b2b1
Suggestions up to commit 094ddf2
Suggestions up to commit cb4217d
Suggestions up to commit d7f2056
|
3443511 to
5b92528
Compare
|
Persistent review updated to latest commit 5b92528 |
5b92528 to
cf7c9be
Compare
|
Persistent review updated to latest commit cf7c9be |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22402 +/- ##
============================================
+ Coverage 73.45% 73.52% +0.07%
+ Complexity 76232 76228 -4
============================================
Files 6076 6076
Lines 345793 345793
Branches 49763 49763
============================================
+ Hits 254004 254248 +244
+ Misses 71598 71344 -254
- Partials 20191 20201 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cf7c9be to
d7f2056
Compare
|
Persistent review updated to latest commit d7f2056 |
d7f2056 to
cb4217d
Compare
|
Persistent review updated to latest commit cb4217d |
cb4217d to
094ddf2
Compare
|
Persistent review updated to latest commit 094ddf2 |
|
❌ Gradle check result for 094ddf2: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
094ddf2 to
570b2b1
Compare
|
Persistent review updated to latest commit 570b2b1 |
|
❌ Gradle check result for 570b2b1: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Wires `cargo clippy --workspace --all-targets -- -D warnings` into the sandbox native (Rust) workspace CI and clears the workspace to zero warnings so the gate passes. Workflow (`sandbox-check.yml`): - add the `clippy` component to the Rust toolchain - add a "Run Rust clippy" step. It runs from the workspace directory (not `--manifest-path` from the repo root) so the crate's `.cargo/config.toml` — which sets `--cfg tokio_unstable`, required by the tokio `RuntimeMetrics` calls in stats.rs / merge/metrics.rs — is picked up. cargo only reads `.cargo/config.toml` relative to the CWD. Code changes (bulk is mechanical clippy cleanup): - fix deny-by-default lints that were aborting the lint build (not_unsafe_ptr_arg_deref on FFI entry points, never_loop, absurd_extreme_comparisons, approx_constant, mut_from_ref) - migrate deprecated parquet/arrow APIs (with_page_index -> with_page_index_policy, set_max_row_group_size -> set_max_row_group_row_count) - repair stale benchmarks that no longer matched current API signatures - the remaining diff is unused-import/mut removal, doc formatting, and idiomatic simplifications Two deprecated calls are intentionally kept behind `#[allow(deprecated)]`: `PartitionedFile::with_extensions` in parquet_bridge.rs and shard_table_provider.rs. The `with_extension` replacement keys the extension by concrete type, but DataFusion's Parquet opener retrieves the `ParquetAccessPlan` via the legacy `insert_dyn` keying — switching drops row selection and returns wrong rows. A comment documents the deferral. clippy (-D warnings), fmt --check, and the test suite all pass. Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
570b2b1 to
8944983
Compare
|
Persistent review updated to latest commit 8944983 |
|
❌ Gradle check result for 8944983: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
Follow-up to #22369 (rustfmt). Wires
cargo clippy --workspace --all-targets -- -D warningsinto the sandbox native (Rust) workspace CI, and clears the workspace to zero clippy warnings so the gate passes.Workflow (
sandbox-check.yml):clippycomponent to the Rust toolchain setup.working-directory: sandbox/libs/dataformat-native/rust(not--manifest-pathfrom the repo root) so the crate's.cargo/config.toml— which sets--cfg tokio_unstable, required by the tokioRuntimeMetricscalls instats.rs/merge/metrics.rs— is honored. cargo only reads.cargo/config.tomlrelative to the working directory, so running from the repo root fails to compile.Code changes (the bulk of the diff is mechanical clippy cleanup):
not_unsafe_ptr_arg_deref(FFIextern "C"entry points),never_loop,absurd_extreme_comparisons,approx_constant,mut_from_ref.with_page_index→with_page_index_policy,set_max_row_group_size→set_max_row_group_row_count.cargo check --benchesonmain).mutremoval, doc-comment formatting, and idiomatic simplifications.Intentional
#[allow(deprecated)](please note during review):Two
PartitionedFile::with_extensionscalls — inindexed_table/parquet_bridge.rsandshard_table_provider.rs— are deliberately kept on the deprecated API. Thewith_extensionreplacement keys the extension by its concrete type, but DataFusion's Parquet opener retrieves theParquetAccessPlanvia the legacyinsert_dynkeying; switching silently drops row selection and returns wrong rows (caught by theboolean_algebrae2e suite). Each site has a comment explaining the deferral.Verification:
cargo clippy --workspace --all-targets -- -D warnings— passes (0 warnings).cargo fmt --all -- --check— clean.local_exec_testfailures exist onmain, unrelated to this change.)Clippy config/enforcement is modeled on Apache DataFusion's and arrow-rs's lint setup.
Check List
--signoffBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.