Skip to content

Commit bf10ede

Browse files
committed
fix(release): pin macOS gateway supervisor image tag
The macOS standalone gateway binary was built without OPENSHELL_IMAGE_TAG, so default_docker_supervisor_image_tag() fell through to CARGO_PKG_VERSION. The dev release pipeline patches that to e.g. 0.0.37-dev.147+g084c93b6a, leaving a '+' in the supervisor image tag which Docker rejects with 'invalid reference format', causing the gateway to crash-loop on Apple Silicon dev installs. PR #1259 fixed this for the Linux gateway binary but the macOS build path (which goes through deploy/docker/Dockerfile.gateway-macos under osxcross) was not covered. - release-dev.yml: pass OPENSHELL_IMAGE_TAG=<github.sha> to the macOS gateway docker build, matching the Linux fix. - release-tag.yml: pass OPENSHELL_IMAGE_TAG=<source_sha> to the macOS gateway docker build, matching the Linux fix. - Dockerfile.gateway-macos: declare ARG OPENSHELL_IMAGE_TAG so the build arg actually reaches cargo (matches the cli-macos Dockerfile pattern, including the comment about ARG placement to avoid invalidating dependency-build cache layers).
1 parent 62619ee commit bf10ede

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/release-dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ jobs:
507507
docker buildx build \
508508
--file deploy/docker/Dockerfile.gateway-macos \
509509
--build-arg OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" \
510+
--build-arg OPENSHELL_IMAGE_TAG="${{ github.sha }}" \
510511
--build-arg CARGO_TARGET_CACHE_SCOPE="${{ github.sha }}" \
511512
--target binary \
512513
--output type=local,dest=out/ \

.github/workflows/release-tag.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ jobs:
626626
docker buildx build \
627627
--file deploy/docker/Dockerfile.gateway-macos \
628628
--build-arg OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" \
629+
--build-arg OPENSHELL_IMAGE_TAG="${{ needs.compute-versions.outputs.source_sha }}" \
629630
--build-arg CARGO_TARGET_CACHE_SCOPE="${{ github.sha }}" \
630631
--target binary \
631632
--output type=local,dest=out/ \

deploy/docker/Dockerfile.gateway-macos

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ RUN touch crates/openshell-core/src/lib.rs \
9393
crates/openshell-core/build.rs \
9494
proto/*.proto
9595

96+
# Declare version ARGs here (not earlier) so the git-hash-bearing values do not
97+
# invalidate the expensive dependency-build layers above on every commit.
9698
ARG OPENSHELL_CARGO_VERSION
99+
ARG OPENSHELL_IMAGE_TAG
97100
RUN --mount=type=cache,id=cargo-registry-gateway-macos,sharing=locked,target=/root/.cargo/registry \
98101
--mount=type=cache,id=cargo-git-gateway-macos,sharing=locked,target=/root/.cargo/git \
99102
--mount=type=cache,id=cargo-target-gateway-macos-${CARGO_TARGET_CACHE_SCOPE},sharing=locked,target=/build/target \

0 commit comments

Comments
 (0)