Skip to content

ci: log in to Docker Hub when the secrets are present and retry an image build once on a 429 (#891) - #965

Merged
debugmcpdev merged 1 commit into
mainfrom
ci/891-docker-hub-login
Oct 20, 2026
Merged

debugmcpdev merged 1 commit into
mainfrom
ci/891-docker-hub-login

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Closes #891.

What changed

Container Tests (ci.yml) and the canary's docker build guard (canary.yml) pulled their base images from Docker Hub anonymously, under the per-IP rate limit every GitHub-hosted runner on that egress shares. On 2026-10-09 that produced four 429 Too Many Requests on the node:26-slim / dart:3.13 manifests, twice on one docs-only PR and twice on its main push run, so main's Test Summary went red for a merge that changed no code.

  • Log in when the run has credentials. A step binds DOCKER_USERNAME to its environment and writes a login output (the secrets context is not available in a step's if); docker/login-action runs on that output, at the SHA release.yml already pins. Fork and Dependabot PRs carry no secrets, so they keep building anonymously, as before. Authenticated pulls are not counted against the anonymous per-IP window.
  • Retry once on a 429. The docker build runs under set -o pipefail through tee; a failed build whose log contains 429 Too Many Requests is retried once after 60 s with a ::warning:: annotation. Any other failure fails at once, as before; a second 429 fails with an ::error::.

Workflow files only, so no changelog fragment (the gate covers src/, packages/, tools/ and package.json).

Verification

  • Both files parse (PyYAML); the new steps appear in the right jobs.
  • This PR's own run is from a same-repo branch, so the login step runs here: its log should read Login Succeeded in Container Tests.
  • The retry path cannot be exercised without a 429 from Docker Hub; its shell is the same two-attempt loop shape used elsewhere in this repository's workflows, reviewed by eye.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y3ULnoVSoCZ5t2Y8d98Ctv

…age build once on a 429 (#891)

Container Tests built `mcp-debugger:local` against Docker Hub anonymously,
under the per-IP rate limit every GitHub-hosted runner shares: four
`429 Too Many Requests` on the base-image manifests on 2026-10-09 alone,
turning a docs-only merge's Test Summary red on main. The job now logs in
with the repository's DOCKER_USERNAME/DOCKER_PASSWORD when a run has them
(same pinned docker/login-action as release.yml; fork and Dependabot PRs
have no secrets and keep building anonymously), and a build whose output
contains the 429 is retried once after 60 s. The canary's docker build
guard gets the same login.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y3ULnoVSoCZ5t2Y8d98Ctv
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit b988b15 into main Oct 20, 2026
14 checks passed
@debugmcpdev
debugmcpdev deleted the ci/891-docker-hub-login branch October 20, 2026 13:22
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.

ci: Container Tests builds against Docker Hub anonymously and hits 429 Too Many Requests on shared runners (twice on one PR)

2 participants