chore(build): honor pinned toolchain, drop dead UPX install#1275
Draft
duncanista wants to merge 2 commits into
Draft
chore(build): honor pinned toolchain, drop dead UPX install#1275duncanista wants to merge 2 commits into
duncanista wants to merge 2 commits into
Conversation
The compile Dockerfiles built with 'cargo +stable', overriding the channel = "1.93.1" pin in rust-toolchain.toml. Drop the '+stable' override and install rustup with --default-toolchain none so rust-toolchain.toml auto-installs and drives the toolchain, making builds reproducible against the pinned version. Also remove the dead UPX install from Dockerfile.build_layer: the binary ships uncompressed, so nothing invokes upx anymore.
|
With --default-toolchain none, rust-src had nothing to attach to; the toml-pinned toolchain installs only rustfmt/clippy and nothing consumes rust-src.
12 tasks
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.
Jira: none yet — add before marking ready.
Overview
Build-hygiene cleanup (Confluence H10). Dockerfile-only; no Rust source changes.
1. Honor the pinned toolchain.
rust-toolchain.tomlpinschannel = "1.93.1", but the compile Dockerfiles built withcargo +stable, which overrides the pin and silently builds with whateverstablecurrently resolves to. This change makesrust-toolchain.tomlthe single source of truth:+stableoverride:cargo +stable build ...→cargo build ...in bothimages/Dockerfile.bottlecap.compileandimages/Dockerfile.bottlecap.alpine.compile.--default-toolchain "stable-${PLATFORM}-unknown-linux-{gnu,musl}"to--default-toolchain none. With no default installed, the firstcargoinvocation inside the bind-mounted source tree readsrust-toolchain.tomland auto-installs the pinned1.93.1(plus its declaredminimalprofile /rustfmt/clippy). The--component rust-srcflag is retained.Net effect: builds are reproducible against the pinned 1.93.1 instead of a moving
stable.Why
--default-toolchain noneover pinning the install to1.93.1-${PLATFORM}-...: it is the smaller, lower-maintenance change. The version lives in exactly one place (rust-toolchain.toml); bumping the pin later requires no Dockerfile edits, and there is no risk of the Dockerfile and the toml drifting apart.2. Remove dead UPX install.
images/Dockerfile.build_layerinstalled UPX (ENV UPX_VERSION+ the download/extractRUN), but nothing compresses the binary anymore — it ships uncompressed and no step invokesupx. Only the install block is removed; everything else (deps install, zip packaging, layout) is untouched.Note on intent: UPX compression is deliberately not reintroduced — decompressing a UPX-packed binary at process start would add cold-start latency, so shipping uncompressed is the correct behavior. This PR only removes the leftover dead install.
Testing
git diffreviewed: the change is exactly the four toolchain lines (two per compile Dockerfile) plus removal of the 13-line UPX block. No other lines touched; no Rust/Cargo files changed.+stable/--default-toolchain "stable-..."inimages/orscripts/, and no remainingupxreferences in any Dockerfile, shell script, workflow, or Makefile.