From 84827a7a5b58716dad127fe4ea18325351db064d Mon Sep 17 00:00:00 2001 From: "agentotto[bot]" <264382315+agentotto[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:17:53 +0000 Subject: [PATCH 1/3] ci: reduce Docker Hub rate limit pressure --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index dc98a7537..805e43ab1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ name: world-id-protocol-services services: # world-id-indexer postgres: - image: postgres:latest + image: ${POSTGRES_IMAGE:-postgres:latest} ports: - "5432:5432" environment: @@ -12,7 +12,7 @@ services: # world-id-indexer - POSTGRES_DB=indexer_tests # world-id-gateway redis: - image: redis:latest + image: ${REDIS_IMAGE:-redis:latest} ports: - "6379:6379" healthcheck: From 147bc9c5e8beb12285ff6b3b6de005290b3fca5c Mon Sep 17 00:00:00 2001 From: "agentotto[bot]" <264382315+agentotto[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:24:47 +0000 Subject: [PATCH 2/3] ci: switch Docker image sources to ECR Public --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 805e43ab1..5292a16ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ name: world-id-protocol-services services: # world-id-indexer postgres: - image: ${POSTGRES_IMAGE:-postgres:latest} + image: public.ecr.aws/docker/library/postgres:latest ports: - "5432:5432" environment: @@ -12,7 +12,7 @@ services: # world-id-indexer - POSTGRES_DB=indexer_tests # world-id-gateway redis: - image: ${REDIS_IMAGE:-redis:latest} + image: public.ecr.aws/docker/library/redis:latest ports: - "6379:6379" healthcheck: From 7d8279c8bf8892a7f47cf08d7de1bd197c56162f Mon Sep 17 00:00:00 2001 From: Otto Date: Mon, 4 May 2026 09:16:25 +0000 Subject: [PATCH 3/3] fix(gateway): use ECR Public mirror for Redis in testcontainers Replace `Redis::default().with_tag("latest")` with a GenericImage pointing to `public.ecr.aws/docker/library/redis:latest`, consistent with the ECR mirror already set in docker-compose.yml (PR #709). This avoids Docker Hub pull-rate-limit failures in CI by sourcing the Redis image from ECR Public instead of docker.io. --- services/gateway/tests/common.rs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/services/gateway/tests/common.rs b/services/gateway/tests/common.rs index d199c0ab5..3a3ac20be 100644 --- a/services/gateway/tests/common.rs +++ b/services/gateway/tests/common.rs @@ -2,8 +2,12 @@ use alloy::primitives::Address; use reqwest::{Client, StatusCode}; use std::time::Duration; use testcontainers_modules::{ - redis::{REDIS_PORT, Redis}, - testcontainers::{ContainerAsync, ImageExt as _, runners::AsyncRunner as _}, + redis::REDIS_PORT, + testcontainers::{ + ContainerAsync, GenericImage, ImageExt as _, + core::{IntoContainerPort, WaitFor}, + runners::AsyncRunner as _, + }, }; use world_id_gateway::{ BatchPolicyConfig, GatewayConfig, GatewayHandle, SignerArgs, defaults, spawn_gateway_for_tests, @@ -34,7 +38,7 @@ pub(crate) struct TestGateway { pub(crate) _handle: GatewayHandle, pub(crate) _anvil: TestAnvil, // Keep the Redis container alive for the duration of the test. - pub(crate) _redis: ContainerAsync, + pub(crate) _redis: ContainerAsync, } /// Spawn a test gateway backed by a forked anvil chain and a Redis container. @@ -132,14 +136,14 @@ pub(crate) async fn spawn_test_gateway(batch_ms: Option) -> TestGateway { /// Start a fresh Redis container and return its URL plus the container handle. /// /// The container is automatically stopped and removed when the returned -/// `ContainerAsync` is dropped — keep it alive for the duration of the +/// `ContainerAsync` is dropped — keep it alive for the duration of the /// test that needs the Redis instance. #[allow(dead_code)] -pub(crate) async fn start_redis() -> (String, ContainerAsync) { - // Use redis:latest so CI (which already pulls this tag via docker-compose) - // can start the container from the local image cache with no network pull. - let container = Redis::default() - .with_tag("latest") +pub(crate) async fn start_redis() -> (String, ContainerAsync) { + // Use the ECR Public mirror to avoid Docker Hub rate limits. + let container = GenericImage::new("public.ecr.aws/docker/library/redis", "latest") + .with_exposed_port(REDIS_PORT.tcp()) + .with_wait_for(WaitFor::message_on_stdout("Ready to accept connections")) .start() .await .expect("failed to start Redis container");