mbutrovich opened a new pull request, #3476:
URL: https://github.com/apache/datafusion-comet/pull/3476
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
Closes #3472.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in
the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your
changes and offer better suggestions for fixes.
-->
The CI Cargo cache key only hashes `Cargo.lock` and `Cargo.toml`, not the
actual Rust source files. When Rust code changes without dependency changes,
the cache key remains the same, causing workflows to restore a stale
`native/target` directory. This can result in using an old `libcomet.so` built
from different source code, leading to version mismatches between the native
library and JVM code.
This was observed when Iceberg tests failed with `range start index
18446744071770573168 out of range` - a symptom of native/JVM code mismatch
where the cached native library was incompatible with the Scala code being
tested.
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is
sometimes worth providing a summary of the individual changes in this PR.
-->
Update cache keys in all workflow files to include source file hashes:
Before:
```yaml
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock',
'native/**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-ci-
```
After:
```yaml
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock',
'native/**/Cargo.toml') }}-${{ hashFiles('native/**/*.rs') }}
restore-keys: |
${{ runner.os }}-cargo-ci-${{ hashFiles('native/**/Cargo.lock',
'native/**/Cargo.toml') }}-
```
This provides three-tier cache matching:
1. Exact match (same deps + same source) → full cache hit
2. Prefix match (same deps, different source) → restore cache, Cargo
rebuilds changed source incrementally
3. No match → full rebuild
### Files updated:
- pr_build_linux.yml
- pr_build_macos.yml
- spark_sql_test.yml
- iceberg_spark_test.yml
## How are these changes tested?
Existing CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]