From 12521b6f5a5e916a4867058b6741154df1017f75 Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 01:58:02 +0530 Subject: [PATCH 1/2] fix(build): honor CODEGEN_IMAGE in Makefile codegen target The generated-files CI workflow builds the codegen image once via buildx with GitHub Actions layer caching and loads it as codegen-env:latest, then runs "CODEGEN_IMAGE=codegen-env:latest make codegen" to reuse it. Since the codegen target was simplified to always run "docker build -q -t codegen-env", that variable became a no-op: the workflow rebuilt the image instead of reusing the cached one, and the buildx build step served no purpose. Skip the docker build and run the caller-supplied image when CODEGEN_IMAGE is set, falling back to a locally built codegen-env otherwise. This keeps "make codegen" self-contained for local use while letting CI consume the image it already built. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com> --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1027af6cd9..80ac007315 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ .PHONY: codegen codegen: - @echo "Building codegen image" - docker build -q -t codegen-env . -f codegen.Dockerfile + @if [ -z "$$CODEGEN_IMAGE" ]; then \ + echo "Building codegen image"; \ + docker build -q -t codegen-env . -f codegen.Dockerfile; \ + fi @echo "Generating code" - docker run -v $$PWD:/workspace codegen-env make generate + docker run -v $$PWD:/workspace $${CODEGEN_IMAGE:-codegen-env} make generate generate: generate-js generate-python From 205622acab3dd23292f335fd645cb7d3f32a4d38 Mon Sep 17 00:00:00 2001 From: Mish Ushakov <10400064+mishushakov@users.noreply.github.com> Date: Tue, 14 Jul 2026 18:04:16 +0200 Subject: [PATCH 2/2] fix(build): announce when codegen build is skipped for a pre-built image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When CODEGEN_IMAGE is set, the build is skipped silently — if the variable is ambiently set in a dev shell and names a stale local image, codegen runs against an old toolchain with no hint why. Echo the image being used so the skip is visible. Co-Authored-By: Claude Fable 5 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 80ac007315..b26d2e8054 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ codegen: @if [ -z "$$CODEGEN_IMAGE" ]; then \ echo "Building codegen image"; \ docker build -q -t codegen-env . -f codegen.Dockerfile; \ + else \ + echo "Using pre-built image $$CODEGEN_IMAGE (skipping build)"; \ fi @echo "Generating code" docker run -v $$PWD:/workspace $${CODEGEN_IMAGE:-codegen-env} make generate