Skip to content

Parallelize release builds on native AMD64 and ARM64 runners - #16242

Merged
lpcox merged 1 commit into
mainfrom
lpcox-native-release-builds
Nov 9, 2026
Merged

lpcox merged 1 commit into
mainfrom
lpcox-native-release-builds

Conversation

@lpcox

@lpcox lpcox commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the QEMU-based multi-platform Docker build with concurrent AMD64 (ubuntu-24.04) and ARM64 (ubuntu-24.04-arm) jobs, following the gh-aw-firewall release pattern.
  • Build the WASM guard once, share it between image jobs, use architecture-scoped Docker caches, and publish the combined manifest from validated image digests only after both image builds and the binary release succeed.
  • Build Linux AMD64, ARM32, and ARM64 binaries concurrently; retain ARM32 cross-compilation, collect all three binaries, and generate one verified checksums file before creating the release.
  • Resolve the release tag to a commit once and use that commit consistently for binary, guard, and Docker builds. Preserve version, latest, and commit-SHA image tags.
  • Document the release pipeline and optional platform selection in scripts/build-release.sh; add regression coverage for native runners, dependencies, digest validation, platform completeness, binary selection, and combined checksums.

Validation

  • gh aw compile release --approve regenerated release.lock.yml; the agent prompt body is unchanged.
  • make agent-finished passed, including Go build/lint/tests and 716 Rust guard tests.
  • Actual static Linux AMD64, ARM32, and ARM64 builds succeeded; ELF headers confirmed each target architecture.
  • shellcheck scripts/build-release.sh passed; zizmor --offline reported no findings for the compiled release workflow.
  • Standalone actionlint reports the same diagnostics as the unmodified workflow (unsupported newer Actions fields and existing tag-step shellcheck warnings); no new diagnostics.
  • No release was dispatched and no container images were published during validation. Hosted native image builds remain to be exercised by the release workflow.

Workflow supply-chain review

Removed docker/setup-qemu-action, which is no longer needed for native builds. No new actions, secrets, or redirect changes were introduced, and existing action SHA pins are retained. The shared WASM guard is built with Rust caching disabled so release artifacts are not restored from the toolchain action's cache.

Build Linux binaries and per-architecture container images concurrently, share the WASM guard artifact, and publish the image manifest from validated digests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI auto review requested due to automatic review settings November 9, 2026 21:27
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default (normal container isolation)

Part Surface Op Result Expected Status
A MCP reads (list_issues, list_pull_requests, get_file_contents, list_commits) data returned ALLOWED ✅
B MCP writes (reaction/star/issue/comment/branch/file/PR) all 7 write tools absent from the 23-tool catalog BLOCKED ⚠️
C CLI reads (list_issues, get_file_contents via proxied github CLI) data returned ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) not attempted - gh unauthenticated BLOCKED ⚠️
E CLI GraphQL mutations (addReaction/addStar/createIssue) not attempted - gh unauthenticated BLOCKED ⚠️

Overall: INCONCLUSIVE

No write leaked. Part B: the backend GitHub MCP server is launched with GITHUB_READ_ONLY=1 by gh-aw tools.github frontmatter, so no write tool (add_issue_comment, star_repository, issue_write, create_branch, create_or_update_file, create_pull_request, pull_request_write) is ever registered in the catalog - this proves backend/toolset config, not mcpg own gateway-level DIFC/guard enforcement. Parts D/E: gh auth status reported not logged into any GitHub hosts - the token-scope boundary could not be exercised in this run.

Independent evidence of mcpg own write-blocking layer is covered by internal/guard and internal/difc unit tests and smoke-proxy-github-script.md (REST/GraphQL read filtering).

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit 49ad13b into main Nov 9, 2026
37 checks passed
@lpcox
lpcox deleted the lpcox-native-release-builds branch November 9, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Release tags are updated before platform validation, potentially publishing rejected images, while stale binaries can contaminate checksums and tests fail when jq is unavailable.

3 open issues
What changed in this PR

This PR speeds up MCP Gateway releases by running architecture-specific builds concurrently on native AMD64 and ARM64 runners, replacing QEMU-based image builds.

Changes:

  • Parallelize Linux binary and container builds while retaining ARM32 cross-compilation.
  • Share one WASM guard build, use a resolved release commit, and combine binary checksums and image digests for publication.
  • Add optional binary platform selection, release documentation, and workflow regression tests.
File Description
scripts/​build-release.sh Adds platform selection, static builds, and narrower checksum matching.
release_workflow_test.go Adds coverage for runners, dependencies, digest validation, platform selection, and checksums.
go.mod Makes YAML parsing a direct dependency for workflow tests.
CONTRIBUTING.md Documents parallel release stages and local platform selection.
.github/​workflows/​release.md Defines native build jobs, shared guard artifacts, and digest-based manifest publication.
.github/​workflows/​release.lock.yml Regenerates the compiled workflow with the new release job structure.

Review effort: Max (auto)

Comment on lines +460 to +464
docker buildx imagetools create \
--tag "$IMAGE:latest" \
--tag "$IMAGE:$RELEASE_TAG" \
--tag "$IMAGE:$RELEASE_SHA" \
"${sources[@]}"
Comment thread release_workflow_test.go

func TestReleaseWorkflowManifestPublishing(t *testing.T) {
t.Parallel()
jobs := readReleaseJobs(t, "release.lock.yml")
Comment thread scripts/build-release.sh
# Use sha256sum if available (Linux), otherwise use shasum (macOS)
if command -v sha256sum &> /dev/null; then
sha256sum * > checksums.txt
sha256sum awmg-* > checksums.txt
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