From 8409afa83ed8f3b3becef999fd03dd18f9159ee8 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 10 Aug 2026 17:23:17 +0200 Subject: [PATCH 1/4] CI: pin zenoh-flat-jni to the timestamp node-id fix zenoh-flat carried a timestamp's node id trimmed to its significant bytes while `ZenohId` carries the full zero-padded width, so a received sample's timestamp compared unequal to the one that stamped the reply whenever the session identifier had a high-order zero byte - about once in 256 sessions, both sides rendering identically. `QueryableTest` asserts exactly that equality, and the same flake was observed in zenoh-kotlin. Fixed in eclipse-zenoh/zenoh-flat#86 and picked up by eclipse-zenoh/zenoh-flat-jni#35, which this pins. Drop the zenoh-flat checkout: nothing reads it, since zenoh-flat-jni resolves zenoh-flat from git and its Cargo.lock is the rev that decides - a pin that pinned nothing while reading as if it did. --- .github/workflows/ci.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1af0f93d..e41b0d48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,16 +31,11 @@ jobs: uses: actions/checkout@v4 with: repository: eclipse-zenoh/zenoh-flat-jni - ref: 6f81eb8f9d5c49b72dda2fb054a174cce3184f2a + # zenoh-flat is not checked out here: zenoh-flat-jni resolves it + # from git, so its Cargo.lock is the pin that decides. + ref: 80f0d09abac4d4201842d06ad0c0791876472fae path: zenoh-flat-jni - - name: Check out zenoh-flat - uses: actions/checkout@v4 - with: - repository: eclipse-zenoh/zenoh-flat - ref: 81feb940cce9f4c3b33a87de397b2ce42cb5fc9e - path: zenoh-flat - - uses: actions/setup-java@v4 with: distribution: temurin From 0bbb6bde586ceeaada3536b48ba4b1d12d764035 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 10 Aug 2026 17:53:45 +0200 Subject: [PATCH 2/4] CI: stop rebuilding and re-linting zenoh-flat-jni here This repo pinned the Rust toolchain at 1.93.0 to add rustfmt and clippy to it, then ran `cargo fmt --check`, clippy, `cargo test --no-default-features` and `cargo build` inside the zenoh-flat-jni checkout. zenoh-flat-jni pins its own toolchain in rust-toolchain.toml, so the components landed on one toolchain while the checks ran on another - `cargo fmt` failed with "'cargo-fmt' is not installed" as soon as that pin moved to 1.97.1. Rather than chase the version, drop the checks: they are zenoh-flat-jni's own CI, run on three platforms for the very commit pinned here, and its format check uses an import-granularity config this bare `cargo fmt` never applied - so the two were not even the same check. `cargo build` goes too. The composite build's test task already depends on zenoh-flat-jni's native build, so Gradle drives cargo; verified by deleting the built dylib and running `jvmTest`, which rebuilt it and passed all 112 tests. What remains is `rustup show` in the zenoh-flat-jni directory, which installs whatever toolchain that repo pins, so this repo never names a version its dependency is free to change. --- .github/workflows/ci.yml | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e41b0d48..3efaaef7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,35 +41,30 @@ jobs: distribution: temurin java-version: 11 + # zenoh-flat-jni pins its toolchain in rust-toolchain.toml. Install it + # from that directory, so a missing toolchain fails here rather than + # inside the Gradle build - and so this repo never has to name a version + # its dependency is free to change. + # + # Nothing else Rust runs here. Formatting, clippy, the feature-leak test + # and the native build are zenoh-flat-jni's own CI, on three platforms, + # for the very commit pinned above; re-running them from this repo only + # adds ways for the two toolchains to disagree. - name: Install Rust toolchain - run: | - rustup show - rustup component add rustfmt clippy --toolchain 1.93.0 - - - name: Cargo Format - working-directory: zenoh-flat-jni - run: cargo fmt --check - - - name: Clippy Check - working-directory: zenoh-flat-jni - run: cargo clippy --all-targets --all-features -- -D warnings - - - name: Check for feature leaks - working-directory: zenoh-flat-jni - run: cargo test --no-default-features - - - name: Build zenoh-flat-jni working-directory: zenoh-flat-jni - run: cargo build + run: rustup show - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - name: Gradle Test working-directory: zenoh-java - # CI builds against the sibling checkouts above, so it opts into the + # CI builds against the sibling checkout above, so it opts into the # composite build explicitly. A release does not: it resolves # zenoh-flat-jni from Maven Central like any other consumer. + # + # No cargo step precedes this: the composite build's test task depends + # on zenoh-flat-jni's own native build, so Gradle drives cargo. run: ./gradlew jvmTest --info -PuseLocalFlatJni=true markdown_lint: From 90b6e27941c0a594559e94393c52222a0124a827 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 10 Aug 2026 18:04:15 +0200 Subject: [PATCH 3/4] CI: pin zenoh-flat-jni to the merged commit The pin named the PR branch commit, which is reachable but not on main. eclipse-zenoh/zenoh-flat-jni#35 has since merged as e75529c with an identical tree, so this only makes the pin name a commit that main actually carries. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3efaaef7..4750d985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: repository: eclipse-zenoh/zenoh-flat-jni # zenoh-flat is not checked out here: zenoh-flat-jni resolves it # from git, so its Cargo.lock is the pin that decides. - ref: 80f0d09abac4d4201842d06ad0c0791876472fae + ref: e75529ce3758401ce213456e7b8e4e5667635cf8 path: zenoh-flat-jni - uses: actions/setup-java@v4 From 8157fdf8d954a6aad4bff226f3c053966eac2925 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Mon, 10 Aug 2026 19:42:30 +0200 Subject: [PATCH 4/4] CI: track zenoh-flat-jni main instead of a pinned commit A pinned SHA has to be hand-edited for every upstream fix, and that hop - zenoh-flat-jni to this SDK - is the one no bot covers. The timestamp node-id flake is what that costs: the fix sat in zenoh-flat for a day while CI kept testing the commit the pin named. Below zenoh-flat-jni the chain is automatic (eclipse-zenoh/ci#465 puts it and zenoh-flat on the lockfile sync), so following its default branch makes the whole chain automatic. The trade is deliberate: a run is no longer reproducible from this repository's commit alone, and a broken zenoh-flat-jni main breaks CI here - which, for a branch whose entire purpose is to track those bindings, is the signal we want. --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4750d985..28edab1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,9 +31,12 @@ jobs: uses: actions/checkout@v4 with: repository: eclipse-zenoh/zenoh-flat-jni - # zenoh-flat is not checked out here: zenoh-flat-jni resolves it - # from git, so its Cargo.lock is the pin that decides. - ref: e75529ce3758401ce213456e7b8e4e5667635cf8 + # No ref: track that repository's default branch. A pinned commit has + # to be hand-edited for every upstream fix, and this is the one hop + # in the chain no bot covers - zenoh-flat-jni's own Cargo.lock is + # kept aligned with zenoh for it, so following its main keeps the + # whole chain automatic. zenoh-flat is not checked out at all: it is + # resolved from git by that lockfile. path: zenoh-flat-jni - uses: actions/setup-java@v4