Skip to content

calico-tinygo: bump TinyGo 0.34.0 -> 0.39.0 (Go 1.25.11)#860

Open
dimitri-nicolo wants to merge 3 commits into
masterfrom
bump-calico-tinygo-0.39.0
Open

calico-tinygo: bump TinyGo 0.34.0 -> 0.39.0 (Go 1.25.11)#860
dimitri-nicolo wants to merge 3 commits into
masterfrom
bump-calico-tinygo-0.39.0

Conversation

@dimitri-nicolo

@dimitri-nicolo dimitri-nicolo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Bumps the calico/tinygo toolchain image from TinyGo 0.34.0 (Go 1.23.12) to TinyGo 0.39.0 (Go 1.25.11).

Why

TinyGo 0.39 is the first release with Go 1.25 support, needed by downstream gateway/coraza-wasm in projectcalico/calico so it can adopt golang.org/x/net v0.55.0 (CVE-2026-25680), which declares go 1.25.0. Under TinyGo 0.34 (a Go 1.23-class toolchain) that module fails to build with requires go version 1.19 through 1.23, got go1.25.

The bundled Go is bumped 1.23.12 → 1.25.11 in lockstep — TinyGo 0.39's host go invocation is capped at 1.25.x.

Checksums

TinyGo tarball sha256s verified against the upstream release assets; Go sha256s against the go.dev release manifest. Validated by building the image locally (docker build --build-arg TARGETARCH=amd64): sha256sum -c passes for both Go and TinyGo, and go version / tinygo version report go1.25.11 / tinygo 0.39.0.

Downstream note

TinyGo 0.38 rewrote how it builds its bundled wasi-libc (builder/wasilibc.go) and dropped the musl ctype/*.c sources. Consumers that link prebuilt wasm archives referencing ctype externs (coraza-wasm's go-re2 / nottinygc archives) must supply those symbols themselves — handled in gateway/coraza-wasm/tools/ctypecompat/ in the calico PR that consumes this image.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the calico/tinygo toolchain image to TinyGo 0.39.0 (Go 1.25.11) by switching the build to base directly on tinygo/tinygo, and adds a ctype/wctype compatibility archive to keep downstream wasm linking working with prebuilt archives that still reference musl ctype symbols.

Changes:

  • Switch calico/tinygo image construction to use FROM tinygo/tinygo:${TINYGO_VERSION} and pass the TinyGo version from versions.yaml via a Makefile build-arg.
  • Replace explicit Go/TinyGo tarball download+checksum logic with upstream-image pinning, and document the new pinning model.
  • Add libctypecompat.a to the image and update CI fixture build flags to link it via -extldflags.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
images/Makefile Passes TinyGo version from versions.yaml as a Docker build-arg for the image build.
images/calico-tinygo/versions.yaml Updates the TinyGo pin to 0.39.0 and rewrites pinning rationale/documentation.
images/calico-tinygo/Dockerfile Re-bases on upstream tinygo/tinygo, installs required tools, and bakes in the ctype compat archive.
images/calico-tinygo/ctypecompat/regen.sh Adds a regeneration script to rebuild libctypecompat.a from an older image’s libc.a.
images/calico-tinygo/ctypecompat/README.md Documents why the shim exists and how consumers should link it.
.semaphore/semaphore.yml Updates the fixture build to pass -extldflags=$CALICO_TINYGO_CTYPE_COMPAT during wasm linking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread images/Makefile Outdated
Comment thread images/calico-tinygo/versions.yaml Outdated
Comment thread images/calico-tinygo/Dockerfile Outdated
Comment thread images/calico-tinygo/Dockerfile
TinyGo 0.39 is the first release with Go 1.25 support, needed by
downstream gateway/coraza-wasm so it can adopt golang.org/x/net v0.55.0
(CVE-2026-25680), which declares `go 1.25.0`. Under the previous
TinyGo 0.34 (a Go 1.23-class toolchain) that module fails to build.

TinyGo >= 0.38's release binary is dynamically linked against a newer
libstdc++/glibc than AlmaLinux 9 provides: the linux-arm64 binary needs
GLIBCXX_3.4.30 and GLIBC_2.36/2.38, but EL9 ships glibc 2.34 + libstdc++
3.4.29 and has no runtime libstdc++.so.6 with 3.4.30 (gcc-toolset ships
only static libs). Rather than graft a newer libstdc++ onto the EL9 base
(glibc-skew dead end), base the image on the upstream tinygo/tinygo
image, which already carries a matching go + tinygo + libstdc++ on both
amd64 and arm64. This also removes the need to download and checksum the
Go and TinyGo tarballs -- the base image tag (from versions.yaml, passed
via the TINYGO_VERSION build-arg) is now the single reproducible pin.
@dimitri-nicolo
dimitri-nicolo force-pushed the bump-calico-tinygo-0.39.0 branch from fb436b3 to d756fe8 Compare July 6, 2026 22:30
@dimitri-nicolo
dimitri-nicolo force-pushed the bump-calico-tinygo-0.39.0 branch from d756fe8 to 4503c0a Compare July 7, 2026 00:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread .semaphore/semaphore.yml
Comment on lines +176 to +180
# ghcr.io/webassembly/wabt does not exist -- wabt only publishes
# binary tarballs, never a container image, on any registry.
# Fetch wasm-objdump directly instead.
curl -sfL "https://github.com/WebAssembly/wabt/releases/download/1.0.36/wabt-1.0.36-ubuntu-20.04.tar.gz" \
| tar xz -C /tmp --strip-components=2 wabt-1.0.36/bin/wasm-objdump
Comment on lines +18 to +20
ARG TINYGO_VERSION
FROM calico/tinygo@sha256:9ff0bed2e3598f695a2fc6222be901eb0f3a0153549b82d28aa640c8487e1854 AS ctypecompat
RUN set -eux; \
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.

2 participants