Remove stale per-crate Cargo.lock files - #23038
Conversation
Both crates build exclusively as members of the dataformat-native Cargo workspace, whose root lock at sandbox/libs/dataformat-native/rust/Cargo.lock is the only lock any build reads; Cargo ignores per-member lock files, and the analytics-backend-datafusion one does not even sit next to a Cargo.toml. The files pin dependency graphs nothing is built from (parquet 54.3.1 / 57.3.0 with thrift 0.17.0), which security scanners still flag. They were swept in accidentally: commit 75cf3bc removed **/Cargo.lock from .gitignore to commit the workspace lock for CI caching, un-ignoring these two already-present files, which unrelated PRs (opensearch-project#21978, opensearch-project#21817) then picked up. The sandbox-check cache key hashes sandbox/**/Cargo.lock, so this rotates the cache key once; the workspace lock remains the meaningful input. Verified on this change: full buildRustLibrary and the reader and writer crate test suites pass with the files removed. Signed-off-by: Manas Lohani <manloh@amazon.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 14359c1. ⛔ Hard block: Issues at Medium severity or above will block this PR from merging.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
peterzhuamazon
left a comment
There was a problem hiding this comment.
Can we just update the lock file? The purpose of lock file is exactly that, to lock to a specific version to help caching and prevent supply chain attack. You update the lock when you need to bump a package. Thanks.
So Cargo never reads a Cargo.lock inside a member's directory (the deleted cargo files). The one file we have preserved in gitignore is Even cargo update in those directories writes to the workspace lock; no command maintains per-member locks.
|
|
This is to remove the two cargo lock file, no new addition. |
|
❌ Gradle check result for 14359c1: 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? |
|
❕ Gradle check result for 2cfda8e: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23038 +/- ##
============================================
+ Coverage 71.79% 71.81% +0.02%
- Complexity 77799 77825 +26
============================================
Files 6173 6173
Lines 360563 360563
Branches 52479 52479
============================================
+ Hits 258854 258955 +101
+ Misses 81112 81041 -71
+ Partials 20597 20567 -30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sandbox check previously failed on the org.jspecify:jspecify 1.0.0 vs 1.0.1 conflict introduced by opensearch-project#22640 and fixed in opensearch-project#23043. Signed-off-by: Manas Lohani <manloh@amazon.com>
|
❌ Gradle check result for 40694e8: 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? |
Signed-off-by: Manas Lohani <manloh@amazon.com>
|
❌ Gradle check result for c571fbc: 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
Both crates build exclusively as members of the dataformat-native Cargo workspace, whose root lock at
sandbox/libs/dataformat-native/rust/Cargo.lock is the only lock any build reads; Cargo ignores per-member lock files, and the analytics-backend-datafusion one does not even sit next to a Cargo.toml. The files pin dependency graphs nothing is built from (parquet 54.3.1 / 57.3.0 with thrift 0.17.0), which security scanners still flag.
They were swept in accidentally: commit 75cf3bc removed **/Cargo.lock from .gitignore to commit the workspace lock for CI caching, un-ignoring these two already-present files, which unrelated PRs (#21978, #21817) then picked up.
The sandbox-check cache key hashes sandbox/**/Cargo.lock, so this rotates the cache key once; the workspace lock remains the meaningful input.
Verified on this change: full buildRustLibrary and the reader and writer crate test suites pass with the files removed.
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.