You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "fresh-borzoni (via GitHub)" <gi...@apache.org> on 2026/07/06 13:36:08 UTC

[PR] [ci] Cache only elixir deps, not _build, to fix stale NIF load [fluss]

fresh-borzoni opened a new pull request, #3598:
URL: https://github.com/apache/fluss/pull/3598

   ### Purpose
   
   Fixes the recurring `elixir-integration` CI failure where the Rust NIF fails to load:
   
   ```
   Failed to load NIF library: '.../fluss_nif.so: cannot open shared object file: No such file or directory'
   (UndefinedFunctionError) function Fluss.Native.table_descriptor_new/2 is undefined (module Fluss.Native is not available)
   ```
   
   Related to #3586 (same lane, different root cause).
   
   ### Root cause
   
   The `elixir-integration` job cached both the Swatinem Rust `target/` and the Mix `_build` (keyed on `mix.lock`). When both cache-hit, Mix's incremental compiler sees the `fluss` app already compiled in the restored `_build` manifest and **skips the rustler step**, so `fluss_nif.so` is never (re)placed — and the cached `_build` doesn't carry a usable `.so`. Tests then can't load `Fluss.Native`.
   
   The first run in the repo passed (cache miss → full compile → `.so` placed); a later run then cached a `_build` lacking the `.so`, and every exact-key hit since restored that poisoned state.
   
   ### Brief change log
   
   - Cache only `deps`, not `_build`, so `mix compile` always runs the rustler step and re-places the NIF. The expensive native build stays cached via the Rust `target/` cache, so the only added cost is the (small) Elixir bytecode recompile.
   - Bump the cache key prefix (`-mix-` → `-mixdeps-`) to abandon the poisoned caches.
   
   ### Tests
   
   Validated via CI (`elixir-integration`); the change only affects that job's caching.
   


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ci] Cache only elixir deps, not _build, to fix stale NIF load [fluss]

Posted by "fresh-borzoni (via GitHub)" <gi...@apache.org>.
fresh-borzoni merged PR #3598:
URL: https://github.com/apache/fluss/pull/3598


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ci] Cache only elixir deps, not _build, to fix stale NIF load [fluss]

Posted by "fresh-borzoni (via GitHub)" <gi...@apache.org>.
fresh-borzoni commented on PR #3598:
URL: https://github.com/apache/fluss/pull/3598#issuecomment-4893512575

   @swuferhong this should help you, PTAL


-- 
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: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org