fix(ci): pre-stage wasm-opt in the WASM builder image (CI flake) #321
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!321
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dx-build-wasm-opt-preinstall"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
dx build --releasestep in the production Dockerfile downloadswasm-optfrom a GitHub release every build. CI hit "connection reset" mid-download and failed the WASM bundle build withFailed to create wasm-opt instanceafter spending 230 seconds compiling - the bundle was already built; the failure was a tooling fetch flake one step before bundling.dx 0.7.3's
wasm_opt::get_binary_path(packages/cli/src/wasm_opt.rs) short-circuits the download when anwasm-optbinary already exists at<DX_HOME>/binaryen/bin/wasm-opt. PinningDX_HOME=/opt/dx-cacheand symlinking the Debian-packagedbinaryen's/usr/bin/wasm-optthere means the first thing dx does at bundle time ispath.exists()and proceeds straight to optimisation. Decouples the build from GitHub Releases uptime entirely.NOT setting
NO_DOWNLOADS=1because that env also gates dx'swasm-bindgen-cliandesbuildfetches; wasm-bindgen-cli is version-pinned per dx release and is not packaged in trixie, so the no-downloads path would replace one flake with three.