build(deps): pin lemonade 11.5.1 from a single source of truth - #177
Conversation
8236118 to
1b8f628
Compare
Move the pinned Lemonade embeddable runtime from 10.10.0 to 11.5.1. Asset naming is unchanged between the two releases, so the download URLs only need the version substituted. Also refresh a stale lemonade version in an e2e-report test fixture so it stops drifting from the pinned version. Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The dash offline fallback version is documented to track the latest
release ("Bump deliberately"), but it still named 10.6.0 while the
engine pin moved to 11.5.1. A host whose GitHub releases API call fails
would silently install a runtime several minor versions behind the pin.
Also correct the host-triple mapping doc, which claimed the release
ships only the three archives we select; it also publishes ubuntu-arm64.
Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The Lemonade embeddable version was written out seven times across five constants in the engine adapter, and again as an independent constant in the dashboard TUI. Nothing tied those together, so they drifted: the two constants sat five minor versions apart, the runtime-id label in the CLI was four behind both, and a doc comment had been stale since 10.10.0. Move the pin into `runtime-deps.toml` at the repository root and add a small `rocm-deps` crate whose build script turns each `[runtime.<name>]` field into a constant. Archive names, download URLs, the dashboard's offline fallback, and the managed runtime-id label are all derived from that one value, so a bump is a one-line edit and the tree can no longer hold two different Lemonade versions. Generating at build time rather than committing generated source means there is nothing to drift and no `--check` gate to keep honest. The schema is a table per runtime with one or more string fields, so a runtime needing more than a version (a version plus an ABI tag, say) is additive rather than a reshape. No behaviour change beyond the runtime-id label, which now matches the `env_id` the adapter actually reports instead of naming an older release. Signed-off-by: Roman Inflianskas <roman.inflianskas@amd.com> Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
The embeddable runtime directory is not version-scoped, so after a bump `prepare_embeddable` downloaded the new archive but skipped extraction because `lemond` was already there from the previous version. The old binaries stayed in place and were then reported as the new version. The CLI made the same mistake one layer up: it asked the adapter whether a runtime was installed and ignored which version came back, so a bump never even reached the install path. Compare versions in both places. The adapter re-extracts when the recorded version differs from the one being installed, and the CLI now requires the detected env id to be the one it asked for — which the previous commit made meaningful by deriving that id from the pin. The decision in the adapter is a pure function so the upgrade case is tested without a real archive. Also guard the pin generator against two entries whose names differ only by separator (`rocm-abi` and `rocm_abi` both fold to `ROCM_ABI`), and escape generated literals with Debug formatting instead of a hand-written rule about which characters are allowed. Signed-off-by: Roman Inflianskas <roman.inflianskas@amd.com> Signed-off-by: Roman Inflianskas <Roman.Inflianskas@amd.com>
1b8f628 to
1b7d6e6
Compare
|
I reviewed this PR and checked it against a live checkout of the branch, not just the diff. The core claim holds up: before this PR the Lemonade version was hand-written 7 times across 4 files, and I confirmed the specific drift the PR calls out (engine adapter at 10.10.0, dashboard offline fallback at 10.6.0, runtime-id label in apps/rocm at 10.6.0). The remaining 10.6.0/10.10.0 literals left in the tree are all test fixtures for behavior that does not depend on the actual pin (parsing, string formatting, request/response plumbing), not stale copies of the version. I traced the new single-source-of-truth mechanism end to end:
I also built and ran the affected crates (rocm-deps, rocm-engine-lemonade, rocm-dash-tui, and the rocm binary's lemonade-related tests) rather than just reading the diff — everything compiles and all tests pass, including the new coverage for version-triggered re-extraction and the build.rs collision guard. I didn't find anything blocking. CI is green and this looks safe to approve pending final validation of the live 11.5.1 install path itself, which the PR description says was already tested manually against the real release. |
Summary
Bumps the pinned Lemonade embeddable runtime from 10.10.0 to 11.5.1, and removes the reason the pin kept going wrong.
Before this PR the version was a hand-written literal in seven places across four files, with nothing tying them together. They had drifted:
engines/lemonade— the versionrocm engines install lemonadedownloads10.10.0(5 constants)rocm-dash-tui— offline fallback when the GitHub releases API is unreachable10.6.0apps/rocm— the runtime-id label recorded in user config10.6.0env_idthe adapter reportsSo a host that could not reach the releases API installed a runtime five minor versions behind the one the engine pinned, and a doc comment in the same block had been wrong since 10.10.0. Nothing caught any of it.
What changes
1. One pin, in a config file.
runtime-deps.tomlat the repository root now holds the version:One
[runtime.<name>]table per managed runtime, each with one or more string fields — a runtime that needs more than a version (a version plus an ABI tag, say) adds a field rather than reshaping the schema.2. Everything else is derived. A new
rocm-depscrate has abuild.rsthat turns each field into a constant (runtime.lemonade.version→LEMONADE_VERSION) and provides the helpers that build archive names (lemonade-embeddable-<ver>-<os-arch>.{tar.gz|zip}) and download URLs from it. The engine adapter, the dashboard fallback, and the runtime-id label all call those helpers, so there is no second place a version can be written. Bumping Lemonade is now a one-line edit to the TOML.Generating at build time rather than committing a generated
.rsmeans there is nothing that can go stale, so this needs nocargo xtask ... --checkgate the wayMANIFEST.mdandTHIRD_PARTY_NOTICES.txtdo. A missing or malformed pin is a build error, and the two crates that used to disagree now cannot: they read the same constant.Behaviour changes
rocm engines install lemonademoves to 11.5.1.windows-x64andubuntu-x64remain wired up in the engine adapter. The release also publishesubuntu-arm64andmacos-arm64; the adapter still does not select them, and the doc comment that claimed otherwise is corrected.A bug the bump would otherwise have hit
Reviewing the bump surfaced a pre-existing defect that this PR would have made live for every user: upgrading did nothing.
The embeddable runtime directory is not version-scoped, so
prepare_embeddabledownloaded the new archive and then skipped extraction becauselemondwas already present from the previous version — leaving the old binaries in place while reporting the new version. One layer up, the CLI asked the adapter whether a runtime was installed and ignored which version came back, so a bump never reached the install path at all.Both now compare versions. The adapter re-extracts when the recorded version differs from the one being installed, and the CLI requires the detected env id to match the one it asked for — which is meaningful only because that id is now derived from the pin. The adapter's decision is a pure function, so the upgrade case is covered by a test without needing a real archive.
Non-goal: a version override variable
An earlier revision of this PR added
ROCM_CLI_LEMONADE_VERSIONto try an untested release without rebuilding. It has been dropped, because it could not work as written and the fix does not belong in a version bump.The archive name and URL are derived from the resolved version, but the SHA-256 digest cannot be — every release has its own.
prepare_embeddablewould have fetched the overridden release and then verified it against the pinned version's digest, so any real override failed with a checksum mismatch. (The original verification usedv99.0.0, which 404s before reaching the digest check, which is why it looked fine.)Making it work means pinning digests per version and deciding what an override without a known digest should do — either carrying digests in
runtime-deps.tomlalongside the version, or letting the caller supply one. That is a design question about supply-chain verification, not part of bumping a pin, so it is left for a follow-up. Nothing here blocks it: the schema already takes extra fields per runtime.What 11.5.1 brings over 10.10.0
POST /routing/validateendpoint that runs a routing policy against a sample prompt and returns the decision plus a step-by-step trace.lemonade benchadds an image-generation benchmark mode with capability-aware scenario/model filtering and a--timeoutflag..ggufabsolute path; registered/imported collections list under their canonical prefixed id;autobackend selection now prefers Vulkan on AMD systems across all engines.Asset naming is identical between the two releases, so the bump itself is a pure version substitution.
Tests
The old pins had no test coverage at all — nothing failed if a constant was wrong. Added:
v-prefixed version is accepted anywhere a version is.A stale
lemonadeversion string in ane2e-reporttest fixture is refreshed alongside; it is self-contained so it never failed, but it kept drifting.Verification
Ran locally on Linux x86_64 (no GPU):
cargo test --workspace --all-targets --no-fail-fast,cargo clippy --locked --workspace --all-targets -- -D warnings,cargo clippy --locked -p e2e-cucumber --test e2e -- -D warnings,cargo fmt --all --check.cargo xtask manifest --checkandcargo xtask tpn --check— both pass with the new crate. The MANIFEST table lists external crates only, androcm-deps's only dependency (toml, build-only) is already in the tree.End to end, against the real release: with no override,
rocm-engine-lemonade installdownloadedlemonade-embeddable-11.5.1-ubuntu-x64.tar.gz(6512136 bytes) from the upstream release and passed digest verification — so the bumped URL and SHA-256 resolve for real, not just in a unit test.Temporarily adding two pin entries whose names differ only by separator (
lemonade-xandlemonade_x) failed the build withruntime.lemonade-x.version and runtime.lemonade_x.version both generate LEMONADE_X_VERSION; rename one, confirming the generator's collision guard and that editing the pin file rebuilds the crate.On CI, the self-hosted GPU lanes (MI300X, Strix Halo Ubuntu, Strix Halo Windows) are green on this branch, including the lemonade serve and inference scenarios, which exercise the bumped runtime on real hardware. Note the adapter's own
Preparing Lemonade embeddable ...line is not surfaced in the job log, so the log does not independently evidence the 11.5.1 archive download — that is what the local run above covers.Three tests fail identically on an unmodified
origin/maincheckout in this environment and are unrelated to this change:rocm-core'sproc_lifecycle::tree_stop_waits_for_descendantsandtree_forced_kill_reaches_sigterm_ignoring_descendant, androcm'stherock::extracting_the_sdk_archive_removes_it(which passes when run alone, and passes in CI).Risk: medium. The pin mechanism itself is low risk — a bad pin is a build or install failure, not a silent wrong install — but 11.5.1 is a ten-minor-version jump with the upstream breaking changes listed above.