fix(release): pin macOS gateway supervisor image tag#1260
Open
TaylorMutch wants to merge 1 commit intomainfrom
Open
fix(release): pin macOS gateway supervisor image tag#1260TaylorMutch wants to merge 1 commit intomainfrom
TaylorMutch wants to merge 1 commit intomainfrom
Conversation
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).
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-1260.docs.buildwithfern.com/openshell |
drew
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OPENSHELL_IMAGE_TAGinto the macOS standalone gateway binary so the supervisor image lookup uses a valid Docker reference instead of falling through to aCARGO_PKG_VERSIONthat contains+build metadata.release-dev.ymlandrelease-tag.ymlplusDockerfile.gateway-macos. PR fix(docker): use supervisor image path directly #1259 covered the Linux gateway binary; this is the macOS counterpart.Diagnostics
A user-reported failure of
install-dev.shon Apple Silicon: the gateway service shows as "started" viabrew services list, but the gateway is actually crash-looping.The launchd error log:
The
+is illegal in Docker image references (which only accept[A-Za-z0-9_.-]after the colon). The+g…is SemVer build metadata that should never reach an image tag.Root cause
default_docker_supervisor_image_tag()atcrates/openshell-driver-docker/src/lib.rs:92resolves the supervisor tag at compile time in this order:option_env!("OPENSHELL_IMAGE_TAG")option_env!("IMAGE_TAG")env!("CARGO_PKG_VERSION")The dev release pipeline patches the workspace Cargo version to a git-derived string like
0.0.37-dev.147+g084c93b6a. WhenOPENSHELL_IMAGE_TAGis not set at build time, the binary falls all the way through to that patched version and bakes the+into the default supervisor reference.In
.github/workflows/release-dev.yml:build-cli-macos(line 358–365): passes bothOPENSHELL_CARGO_VERSIONandOPENSHELL_IMAGE_TAG=dev✅build-gateway-binary-linux(line 432): set via env after PR fix(docker): use supervisor image path directly #1259 ✅build-gateway-binary-macos(line 504–513): missingOPENSHELL_IMAGE_TAG❌release-tag.ymlhad the same gap for tagged releases on macOS.Dockerfile.gateway-macosalso did not declareARG OPENSHELL_IMAGE_TAG, so even with--build-argthe value was never visible tocargo build. The companionDockerfile.cli-macosdeclares both ARGs near the final cargo step (after dependency layers are cached) — this PR mirrors that pattern.Changes
release-dev.yml: pass--build-arg OPENSHELL_IMAGE_TAG=${{ github.sha }}to the macOS gateway buildx invocation, matching the Linux fix in fix(docker): use supervisor image path directly #1259.release-tag.yml: pass--build-arg OPENSHELL_IMAGE_TAG=${{ needs.compute-versions.outputs.source_sha }}, matching the Linux fix in fix(docker): use supervisor image path directly #1259.Dockerfile.gateway-macos: declareARG OPENSHELL_IMAGE_TAGnext toARG OPENSHELL_CARGO_VERSION, after the dependency-build cache layers (matches thecli-macosDockerfile, including the comment explaining the placement).The supervisor image is published with
<github.sha>/<source_sha>tags bybuild-supervisor->docker-build.ymland re-tagged asdev/latest/<semver>bytag-ghcr-{dev,release}. Pinning the gateway binary to the SHA is consistent with the Linux fix and points to a tag that is guaranteed to exist before the release notes are published.Test plan
mise run pre-commitpasses locally (done before push).install-dev.shon an Apple Silicon host:brew services info openshellshowsRunning: truecurl http://127.0.0.1:17670/healthreturns 2xx/opt/homebrew/var/log/openshell/openshell-gateway.err.logdoes not containinvalid reference formatopenshell sandbox createsucceeds against the local gateway, confirming the supervisor image is pulled successfully.Workaround for users on the broken dev build
Until a new dev release is cut, set the runtime override (
OPENSHELL_DOCKER_SUPERVISOR_IMAGE) in the launchd plist:Note:
brew servicesregenerates the plist from the formula, so this needs to be re-applied after eachinstall-dev.shrun.