Fix RI.DEL failures from stale BfTree native binaries#1933
Open
tiagonapoli wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses CI failures in range index tests caused by a stale committed BfTree native binary by ensuring the Rust cdylib is built and staged during normal .NET builds, and by adding CI caching to keep the additional Rust build work fast.
Changes:
- Updates
BfTreeInterop.csprojto build the Rust cdylib earlier in the build pipeline and stage the freshly built native binary so it is preferred at runtime. - Updates CI to cache Rust/Cargo state and the crate
target/directory, and removes the workflow’s explicit per-test cargo build step (shifting responsibility to the project build).
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| libs/native/bftree-garnet/BfTreeInterop.csproj | Builds/stages the Rust cdylib earlier so consumers load the fresh native binary rather than a stale prebuilt. |
| .github/workflows/ci.yml | Adds Rust build caching to Garnet-building jobs and removes the explicit cargo build step in the test matrix. |
5d289ad to
bb60533
Compare
The committed BfTree native binaries were out of sync with the Rust FFI (bftree_delete now returns an int status), so RangeIndex tests failed with 'RI.DEL: invalid arguments'. Refresh the committed win-x64 and linux-x64 binaries to match the current FFI. Also make Debug builds work without a Rust toolchain: framework-dependent test hosts (e.g. BfTreeInterop.test) probe only the output root, but the prebuilt binary was only staged under runtimes/<rid>/native. Add a csproj fallback that copies the committed runtimes/<rid>/native binary to the output root when the fresh cargo build output is absent, so P/Invoke resolves with no Rust installed. 'Freshly built cargo binary wins' still holds when Rust is present. CI no longer builds the cdylib; it consumes the committed binaries. The release pipeline builds the native binaries fresh from Rust source for both linux-x64 and win-x64, overwriting the committed binaries on disk before packaging so releases never ship a committed binary. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: dde24203-c2d7-4f05-a4cd-9f3c9b6b7330
bb60533 to
714c0d4
Compare
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.
Problem
Garnet.test.rangeindexfails withRI.DEL: invalid argumentswhen the committed BfTree native binaries are out of sync with the Rust FFI:bftree_deletenow returns anintstatus, and a binary built from older source returns garbage that the C# side rejects.Fix
win-x64andlinux-x64binaries to match the current FFI (pinned toolchain 1.94.0).BfTreeInterop.test, fixingDllNotFoundException) in addition toruntimes/<rid>/native/(forGarnetServer/Garnet.test.rangeindex). No Rust toolchain is used to build/run/test; regenerating a binary is a manualcargo build --release+ copy intoruntimes/<rid>/native/.Verify
Garnet.slnxbuilds with no Rust;BfTreeInterop.test(46) and rangeindexDel(11) pass.