Repository navigation
docs(docker): push Docker Hub overviews for both images from the repo - #2446
Merged
Merged
Conversation
Docker Hub does not read OCI labels, and the release mirror copies only the manifest, so both Hub pages were blank. Each image's short description and overview now live in docker/README.<stage>.md. sign-release.sh pushes them through the Hub API after the mirror, from the files at the tag, and reads them back without credentials. A prerelease leaves them alone; a failed push only warns, and scripts/dockerhub-description.py repeats it by hand. The push reuses the maintainer's `docker login docker.io` credential, or a PAT in DECDN_DOCKERHUB_USERNAME/DECDN_DOCKERHUB_TOKEN, so CI still holds no registry credential. check-image-name.sh fails an image with no overview, and the ci-tooling-tests filter now covers docker/**. Closes #2440 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Gas snapshotNo gas changes vs base. |
Code Coverage OverviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-covThe overall line coverage in commit cd544d1 in the Show a line coverage summary of the most impacted files.
Solidity / code-coverage/forgeThe overall line coverage in commit cd544d1 in the Updated |
There was a problem hiding this comment.
🟡 Changes recommended
The API override can send privileged Docker Hub credentials to an arbitrary HTTPS host.
3 open findings
What changed in this PR
Adds repository-managed Docker Hub descriptions and publishes them during stable releases.
Changes:
- Adds validated overview content for both images.
- Adds Docker Hub authentication, update, and read-back tooling.
- Integrates publishing, documentation, CI guards, and tests.
| File | Description |
|---|---|
scripts/dockerhub-description.py |
Pushes and verifies Docker Hub metadata. |
scripts/tests/test_dockerhub_description.py |
Tests validation, credentials, publishing, and read-back. |
scripts/sign-release.sh |
Publishes overviews during stable releases. |
docker/README.decdn.md |
Defines the CLI image overview. |
docker/README.decdn-node.md |
Defines the node image overview. |
RELEASING.md |
Documents setup and recovery procedures. |
CHANGELOG.md |
Records the user-visible release change. |
.github/workflows/ci.yml |
Runs tooling checks for overview changes. |
.github/scripts/check-image-name.sh |
Requires an overview for each image. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- DECDN_DOCKERHUB_API accepts only https://hub.docker.com or a loopback test server, so a stray exported value cannot receive the token. - A credential helper or overview file that is not UTF-8 fails with an `error:` line instead of a UnicodeDecodeError traceback. - The hung-helper test clears exported DECDN_/DOCKER_ variables, so a maintainer's own token cannot bypass the helper under test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What
Both Docker Hub pages (
decdn/decdn-node,decdn/decdn) are blank. Hub does not read OCI labels, and the release mirror (docker buildx imagetools create) copies only the manifest.docker/README.<stage>.md, one per Dockerfile stage. Line 1 is the Hub short description (<!-- description: … -->, ≤100 chars); the rest is the overview: what the image is, quick start, tags, GHCR mirror, digest verification, links. Facts come from the Dockerfile, README § Install and SECURITY.md.scripts/dockerhub-description.py(stdlib): reads each file at--ref, validates it before any request, logs in (POST /v2/auth/token),PATCHes both fields, and reads them back anonymously with retries. Every repo is tried; failures exit 1 with a one-lineerror:, never a traceback or the secret.DECDN_DOCKERHUB_USERNAME+DECDN_DOCKERHUB_TOKEN(a PAT) when both are set, else thedocker login docker.iocredential, looked up as docker does (acredHelpersentry orcredsStoreis final; a helper "not found" is a miss, any other helper failure is reported as such).sign-release.sh: for a stable release, pushes the overviews after the Docker Hub mirror, from the files at the tag. Prereleases leave them alone (same reason they never movelatest).DECDN_SKIP_DOCKERHUBskips it. A failure only warns, at the failure and again at the end, with the re-run command — the overview never blocks a signed release.check-image-name.shfails an image with no overview file; theci-tooling-testspath filter now includesdocker/**, so an overview-only PR runs the format and absolute-link checks.--ref origin/main, env vars), CHANGELOG.Closes #2440
Reviewer notes
scripts/dockerhub-description.py decdn/decdn-node=decdn-node decdn/decdn=decdn127.0.0.1by default and namesDECDN_METRICS_BIND=0.0.0.0; the Dockerfile'sEXPOSE 9090alone suggests otherwise.Verification
uvx --with pyyaml pytest .github/scripts/tests scripts/tests -q→ 246 passed. The new suite runs against a fake Hub on localhost with a scratchDOCKER_CONFIGand fake credential helpers; 7 hand mutations of the main fixes (credsStore fallthrough, byte vs char limit, login hint scope, helper failure as miss, env precedence, read-back field coverage, stop at first repo) are all caught..github/scripts/check-image-name.shpasses, and fails with the overview message when a file is removed.shellcheckon both shell scripts;pre-commit runon every changed file.GETis uncached (cf-cache-status: DYNAMIC).CHANGELOG.mdentry added🤖 Generated with Claude Code