Bash arithmetic resolves a non-numeric value as a variable name, which under
set -u aborted the script, and a value of 0 or less simply skipped the loop
body. Either way docker was never invoked, and the script still reported
"Failed to pull <image> after <value> attempts" - a pull failure for a pull
that never happened.
Reject anything that is not a positive integer with a clear configuration
error instead. Normalising through 10# keeps zero-padded values such as 08
out of bash's octal parsing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Server test shards have been dying in globalSetup with:
(HTTP code 404) no such container - No such image:
public.ecr.aws/x1w3a5n5/third-party:minio-RELEASE.2025-09-07T16-13-09Z
The image is fine - it pulls anonymously for linux/amd64 and its manifest
list, child manifests and blobs all resolve. The pull was failing on the
runner, and the failure was being swallowed twice.
First, the pre-pull step backgrounded every pull and awaited them with
`wait $(jobs -p)`, which only reports the exit status of the last PID, so a
failed minio pull left the step green. Second, testcontainers resolves its
own pull as soon as the pull stream ends without checking the stream for
errors, so it went on to create a container from an image that was never
pulled - producing that confusing 404 from the Docker daemon.
Replace both pre-pull blocks with scripts/pull-images.sh, which pulls in
parallel, retries each image with exponential backoff, and exits non-zero if
any image could not be pulled. Retrying also absorbs the underlying cause:
Amazon ECR Public allows only one unauthenticated pull per second per IP
address, and GitHub-hosted runners share egress IPs.
Also add a best-effort ECR Public login to the test-server job to lift that
rate limit. It stays inert until the ECR_PUBLIC_ROLE_ARN repository variable
is set, and fork pull requests keep working anonymously via the retries.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>