Skip to content

Migrate Docker image registry from GCP Artifact Registry to AWS ECR Public - #1003

Merged
vishalchangrani merged 1 commit into
mainfrom
vishal/ecr-public-registry-migration
Nov 25, 2026
Merged

vishalchangrani merged 1 commit into
mainfrom
vishal/ecr-public-registry-migration

Conversation

@vishalchangrani

@vishalchangrani vishalchangrani commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Migrates the Docker image registry from GCP Artifact Registry (us-west1-docker.pkg.dev/dl-flow-devex-production/development/flow-evm-gateway) to AWS ECR Public (public.ecr.aws/onflow/flow-evm-gateway). GCP is being fully deprecated; see the Flow Foundation node software registry announcement. FF nodes on mainnet and testnet are already pulling from ECR — this is the rest of the move.
  • Replaces the GCP WIF + gcloud auth configure-docker steps in .github/workflows/build.yml with GitHub OIDC → AWS role + amazon-ecr-login@v2 (registry-type: public).
  • Updates every other in-repo image reference: Makefile (CONTAINER_REGISTRY), docker-compose.yml, and deploy/systemd-docker/flow-evm-gateway.service.

Prerequisites before merge

  1. Merge + apply onflow/ff-sre-infrastructure#1433 (new IAM role flow-evm-gateway-ecr-public-push in flow-common, federated via GitHub OIDC, scoped to repo:onflow/flow-evm-gateway:ref:refs/tags/v* and the single evm_gateway ECR Public repo ARN).
  2. Add repo variable AWS_ECR_PUBLIC_PUSH_ROLE_ARN = the ARN output by that apply.
  3. (Cleanup after merge) delete the now-unused GCP repo vars: REPO_DOCKER_IMAGE_URL, GHA_IDENTITY_POOL, REPO_SERVICE_ACCOUNT, GAR_PROJECT_ID, GAR_LOCATION.

Behavior change for operators dispatching the workflow

The trust policy on the AWS side only accepts OIDC tokens whose sub claim is repo:onflow/flow-evm-gateway:ref:refs/tags/v*. GitHub sets sub from the ref the workflow runs on, so the workflow must be dispatched against a v* tag — dispatching against main (or any branch) will fail at the AWS credentials step. The existing inputs.tag input is still used to label the built image and check out the right commit.

Test plan

  • Merge + apply onflow/ff-sre-infrastructure#1433 and record the role ARN
  • Set AWS_ECR_PUBLIC_PUSH_ROLE_ARN repo var
  • Dispatch build.yml against a throwaway v* tag; confirm it:
    • passes the OIDC auth step
    • passes amazon-ecr-login@v2
    • pushes the image to public.ecr.aws/onflow/flow-evm-gateway:<tag> (verify anonymously via curl public.ecr.aws/v2/onflow/flow-evm-gateway/tags/list)
  • Confirm dispatching against main is rejected at STS (negative test)
  • After a real release tag succeeds, retire the hand-copy for flow-evm-gateway in Flow-AWS-Public-Registry (SRE's call)
  • Remove unused GCP repo vars

Summary by CodeRabbit

  • Chores
    • Container images are now published to and pulled from the public Amazon ECR registry instead of Google Artifact Registry.
    • Build and deployment workflows use the new image location while retaining the existing image tag and platform settings. Deployment configuration continues to pass the same application options.

…ublic

The Flow Foundation node software registry moved from GCP to AWS ECR
Public (forum announcement:
https://forum.flow.com/t/flow-foundation-node-software-registry-has-moved-to-aws-ecr-public/8819).
flow-evm-gateway nodes on mainnet and testnet are already pulling from
ECR, but this repo still pushed to the old GCP Artifact Registry
and referenced it everywhere else. GCP is being fully deprecated.

Changes:
- .github/workflows/build.yml: swap GCP WIF + gcloud docker auth for
  GitHub OIDC -> AWS role (aws-actions/configure-aws-credentials@v4)
  + aws-actions/amazon-ecr-login@v2 with registry-type: public.
  Target: public.ecr.aws/onflow/flow-evm-gateway.
- Makefile: CONTAINER_REGISTRY -> public.ecr.aws/onflow.
- docker-compose.yml, deploy/systemd-docker/flow-evm-gateway.service:
  image URL -> public.ecr.aws/onflow/flow-evm-gateway.

Before merging, the matching OIDC IAM role needs to exist in
flow-common (onflow/ff-sre-infrastructure#1433) and the output ARN
dropped into this repo's AWS_ECR_PUBLIC_PUSH_ROLE_ARN variable. The
now-unused GCP vars (REPO_DOCKER_IMAGE_URL, GHA_IDENTITY_POOL,
REPO_SERVICE_ACCOUNT, GAR_PROJECT_ID, GAR_LOCATION) can be deleted
from repo settings after this lands.
@vishalchangrani
vishalchangrani requested a review from a team as a code owner November 25, 2026 02:20
@github-project-automation github-project-automation Bot moved this to 👀 In Review in 🌊 Flow 4D Nov 25, 2026
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build workflow now publishes the gateway image to public ECR using AWS OIDC credentials. The Makefile, systemd service, and Docker Compose configuration now reference the public ECR image.

Changes: Public ECR image migration

Layer / File(s) Summary
Build and publish image
.github/workflows/build.yml
The workflow targets the public ECR image, assumes an AWS role, logs in to public ECR, and builds with the input tag and amd64 architecture. The existing push step remains.
Use public ECR image references
Makefile, deploy/systemd-docker/flow-evm-gateway.service, docker-compose.yml
The registry and image references change to public ECR. The ${VERSION} tag and systemd run arguments remain unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: peterargue, sjonpaulbrown, m-peter

Merge Risk: Low · up to f22de

This moves image publishing and the default image references to public ECR. Before relying on it, confirm the IAM role is applied and the repository variable is set, then dispatch the workflow on a v* tag. If either is missing, the release workflow fails visibly and nothing is published.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: the Docker image registry moves from GCP Artifact Registry to AWS ECR Public. The raw summary confirms this across the build workflow, Makefile, systemd unit, and doc…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: the Docker image registry moves from GCP Artifact Registry to AWS ECR Public. The raw summary confirms this across the build workflow, Makefile, systemd unit, and docker-compose.yml. The title is specific and accurate, and it does not need to list the OIDC or auth changes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ab31335-cde8-4da5-b5e5-d6a32886ca8b
Commits

Reviewing files that changed from the base of the PR and between 9129e4f and f22de34.

Files selected for processing: 4

  • .github/workflows/build.yml
  • Makefile
  • deploy/systemd-docker/flow-evm-gateway.service
  • docker-compose.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@Kay-Zee Kay-Zee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm — the swap is consistent across all four files (workflow, Makefile, compose, systemd), the ecr-public login uses registry-type public correctly, and the node-side anonymous pulls work on ECR Public. one operator note: the role trust (ff-sre-infrastructure#1433) matches refs/tags/v*, so the dispatch must run FROM the tag ref — dispatching from main while naming the tag in the input fails the assume. that's the intended guard, just worth saying in the runbook.

@vishalchangrani
vishalchangrani merged commit 60d202b into main Nov 25, 2026
2 checks passed
@vishalchangrani
vishalchangrani deleted the vishal/ecr-public-registry-migration branch November 25, 2026 04:54
@github-project-automation github-project-automation Bot moved this from 👀 In Review to ✅ Done in 🌊 Flow 4D Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants