Repository navigation
fix(seed): fix WireMock on arm64 and restore docker compose in seed images - #18437
Conversation
`crane pull` defaults to linux/amd64, so the arm64 go/php/python seed
images bundle an amd64 WireMock in /wiremock.tar. On arm64 hosts the
wire-test WireMock container exits immediately ("requested image's
platform (linux/amd64) does not match the detected host platform").
Pass --platform for the architecture the stage is built for.
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
AI Review Summary
The change passes --platform linux/<arch> to crane pull so arm64 seed images bundle an arm64 WireMock. Logic is correct and identical across the three Dockerfiles; the only nit is that PLATFORM_ARCH duplicates the already-normalized ARCH.
- 🔵 1 suggestion(s)
Review Scope
- Mode: Full pull request
- Range:
Full pull request through 075c9e4073c452bd3f5d90e1286425bb9b073d16 - Current range coverage: Complete
- Cumulative pull request coverage: Complete
This review is complete for the current scope. Addressing all critical and warning findings above satisfies the review; suggestions are optional. Request another review only if subsequent changes introduce new behavior or materially expand the pull request's scope.
go-sdk and go-model pin fernapi/go-seed:2.0.0 (March), whose arm64 image installs the linux-amd64 Go tarball, so build scripts fail on arm64 with `exec format error`. Dockerfile.go has installed Go per architecture since, but the pin never moved. Use fernapi/go-seed without a tag, like the other seed images, so go-sdk also picks up the WireMock platform fix once go-seed is republished. This moves Go 1.23.8 -> 1.26.4 and golangci-lint v2.10.1 -> v2.12.2 for the go seed scripts. Co-Authored-By: Claude <noreply@anthropic.com>
SDK Generation Benchmark ResultsComparing PR branch against Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
…del" This reverts commit c79eeab. go-seed:latest's Go 1.26 / golangci-lint v2.12 flag `reflect.Ptr` (govet inline) in the Go generator's as-is files, failing every go-sdk fixture. Moving the image together with the generator fix in a separate PR. Co-Authored-By: Claude <noreply@anthropic.com>
Dockerfile.go deletes all docker CLI plugins as unused, but the go-sdk
seed test script starts WireMock with `docker compose -p ...`. With the
current go-seed image that fails ("unknown shorthand flag: 'p' in -p"),
which went unnoticed because go-sdk still pins go-seed:2.0.0. Rebuild
docker-compose from source and keep it, the same way Dockerfile.php and
Dockerfile.python do, and only drop buildx.
Co-Authored-By: Claude <noreply@anthropic.com>
The current fernapi/go-seed image has no docker compose plugin, so go-sdk wire-test scripts fail on it. #18437 restores compose (and fixes WireMock on arm64); move the pin after that image is published. This PR keeps just the reflect.Pointer fix, which also passes on 2.0.0. Co-Authored-By: Claude <noreply@anthropic.com>
- Use BuildKit's TARGETARCH for `crane pull --platform` instead of mapping `uname -m` (fails the build if unset, rather than silently picking amd64). - Fail the build if `docker compose` is missing, in all three images. - Go image: keep the /usr/local/bin/docker-compose symlink like php/python. - Go image: save compose's module list to /usr/share/doc/docker-compose/buildinfo.txt before stripping .go.buildinfo, and stop claiming its deps are all patched. - Note that go-sdk/go-model still pin go-seed:2.0.0. Co-Authored-By: Claude <noreply@anthropic.com>
* fix(go): use reflect.Pointer instead of deprecated reflect.Ptr
Go 1.26's govet `inline` analyzer (golangci-lint v2.12) flags the
deprecated `reflect.Ptr` alias in the Go generator's as-is files
("Constant reflect.Ptr should be inlined"), so every go-sdk fixture fails
its lint script on the current fernapi/go-seed image. Rename it to
`reflect.Pointer` (Go 1.18+, which generated SDKs already require) in the
v1 embedded files and v2 as-is templates, and update the generator
testdata and seed snapshots to match.
With that, move go-sdk and go-model off the March fernapi/go-seed:2.0.0
pin, whose arm64 image installs the linux-amd64 Go tarball, to the current
fernapi/go-seed image like the other seed generators.
Co-Authored-By: Claude <noreply@anthropic.com>
* chore(seed): keep go-seed:2.0.0 until the go seed image is republished
The current fernapi/go-seed image has no docker compose plugin, so go-sdk
wire-test scripts fail on it. #18437 restores compose (and
fixes WireMock on arm64); move the pin after that image is published.
This PR keeps just the reflect.Pointer fix, which also passes on 2.0.0.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Move off fernapi/go-seed:2.0.0 (March), whose arm64 image installs the linux-amd64 Go tarball, to fernapi/go-seed:fdc792df0, built from #18437 (arm64 WireMock, docker compose kept). #18440 already fixed the reflect.Ptr lint findings the newer golangci-lint reports. Uses the immutable build tag rather than `latest` so seed runs stay reproducible. Co-authored-by: Claude <noreply@anthropic.com>
Two problems in the seed images break go/php/python seed tests on arm64, and the go one blocks moving go-sdk off its old image. Neither shows up in Fern's CI today: it runs on x86, and go-sdk/go-model still pin the March
fernapi/go-seed:2.0.0.1. WireMock is always amd64. The seed images fetch WireMock with
crane pull wiremock/wiremock:3.9.1 /wiremock.tar.crane pulldefaults tolinux/amd64, so the arm64 images bundle an amd64 WireMock, and wire tests fail when it starts:2. The current go seed image has no
docker compose.Dockerfile.godeleted all docker CLI plugins as unused, but the go-sdk seed test script starts WireMock withdocker compose -p … -f wiremock/docker-compose.test.yml. On the currentfernapi/go-seedimage that fails withunknown shorthand flag: 'p' in -p.Dockerfile.phpandDockerfile.pythonalready rebuild compose and keep it.Changes Made
docker/seed/Dockerfile.{go,php,python}:crane pull --platform "linux/${TARGETARCH}"(BuildKit's target arch; fails the build if unset).uname -mis only used for the crane download.docker composeis missing (docker compose versionafter dropping buildx).docker/seed/Dockerfile.go:Dockerfile.php, and only drop buildx. The/usr/local/bin/docker-composesymlink (to the plugin) now stays, like php/python./usr/share/doc/docker-compose/buildinfo.txtbefore stripping.go.buildinfo, so its dependency versions stay inspectable; the comment no longer claims those deps are all patched.The Go part is groundwork. go-sdk and go-model pin
go-seed:2.0.0, whichseed-dockers.ymlnever rebuilds, so the go changes only take effect once the pin moves. Follow-ups:reflect.Ptrlint failures that the newer go image's golangci-lint reports in the Go generator's output.seed-dockers.ymlpublishes the new image, a one-line PR moves go-sdk/go-model to the immutablefernapi/go-seed:<sha>tag (notlatest), so seed runs stay reproducible.Testing
docker buildx build --platform …) of all three Dockerfiles at this commit, then checkeduname -m,docker compose version, and the architecture in/wiremock.tar's image config:* reused layers from the go build. The go image's
buildinfo.txtlists 124 compose deps. Before this PR, the arm64 images'/wiremock.tarwasamd64andfernapi/go-seed:latesthad no compose (docker: unknown command: docker compose).The rebuilt images only get published after merge (
seed-dockers.ymlruns on pushes tomainthat touchdocker/seed/*).Generated with Claude Code