Skip to content

ci(docker): pre-install scarb 2.13.1 in the dev image#558

Merged
kariy merged 1 commit into
mainfrom
ci/preinstall-scarb-2.13.1
Apr 28, 2026
Merged

ci(docker): pre-install scarb 2.13.1 in the dev image#558
kariy merged 1 commit into
mainfrom
ci/preinstall-scarb-2.13.1

Conversation

@kariy
Copy link
Copy Markdown
Member

@kariy kariy commented Apr 28, 2026

Summary

Pre-installs scarb 2.13.1 in ghcr.io/dojoengine/katana-dev:latest so the Piltover submodule build doesn't fall into a runtime install that OOMs the container's overlay disk.

Why

The Piltover submodule (cartridge-gg/piltover#feat/tee-persistent) pins scarb 2.13.1 in its .tool-versions. The dev image only bakes in 2.8.2 / 2.11.4 / 2.12.2, so make install-scarb falls into the runtime install path for 2.13.1. The asdf-scarb plugin lies — every file copy fails with "No space left on device" but the script still prints "installation was successful!". Then when cd piltover && asdf exec scarb build runs, asdf can't find a real scarb binary, prints No version is set for command scarb, and make contracts fails.

Repro from PR #556's most recent CI run:

Installing scarb 2.13.1...
* Downloading scarb release 2.13.1...
cp: error copying ... 'scarb-verify' ... No space left on device
cp: error copying ... 'scarb' ... No space left on device
cp: error copying ... 'SECURITY.md' ... No space left on device
scarb 2.13.1 installation was successful!   ← lying
[later, from the piltover build dir]
No version is set for command scarb
Consider adding one of the following versions ... scarb 2.8.2 / 2.12.2 / 2.11.4
make: *** [Makefile:132: contracts] Error 1

The Makefile already calls this out (lines 51-52):

Keeping the build path on 2.12.2 avoids installing an extra 2.13.1 toolchain in CI, which was exhausting disk space.

Fix

Add `asdf install scarb 2.13.1` to the existing `RUN asdf plugin add scarb && ...` block in `.github/Dockerfile`. Image grows by ~150-300MB; CI runtime install path for 2.13.1 becomes a cache hit (no disk pressure).

Trigger

This push touches `.github/Dockerfile`, so on merge `.github/workflows/build-and-push-docker.yml` rebuilds and re-tags `ghcr.io/dojoengine/katana-dev:latest`. PR #556 (the trigger for this fix) and any other branch that pulls in piltover submodule's new pin will go green once the new image is published.

🤖 Generated with Claude Code

The Piltover submodule (`cartridge-gg/piltover#feat/tee-persistent`) pins
`scarb 2.13.1` in its `.tool-versions`. With only 2.8.2 / 2.11.4 / 2.12.2
baked into `ghcr.io/dojoengine/katana-dev:latest`, `make contracts` falls
into the runtime install path for 2.13.1 — which OOMs the container's
overlay disk. asdf's scarb plugin reports "installation was successful!"
even though every file copy fails with "No space left on device", so
asdf later prints "No version is set" when scarb is invoked from the
piltover dir, and `make contracts` fails.

Pre-installing 2.13.1 at image-build time skips the runtime install, so
no disk pressure at CI time. Image grows by ~150-300MB.

The push to `main` triggers `.github/workflows/build-and-push-docker.yml`
to rebuild and re-tag `:latest`; downstream PRs that hit the same wall
get unblocked once the new image is published.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kariy kariy merged commit 04d0d6d into main Apr 28, 2026
2 checks passed
@kariy kariy deleted the ci/preinstall-scarb-2.13.1 branch April 28, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant