Repository navigation
[DockerVersion] Handle empty architectures in Docker Hub tags - #12319
Open
ZainnQureshii wants to merge 1 commit into
Open
ZainnQureshii wants to merge 1 commit into
ZainnQureshii wants to merge 1 commit into
Conversation
Fixes badges#7583 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This branch has not been deployed
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.
Fixes #7583: Docker Hub signature tags with empty architectures invalidate otherwise usable version badges.
Accept empty architecture strings and exclude tags whose populated image lists contain only empty architectures; preserve existing empty-image-list behaviour.
Artifact-only responses return an error badge; artifact latest returns “tag not found” when explicitly requested, while date sorting selects the next usable tag.
Explicit tags such as 1.2 keep their existing digest matching, which this change does not touch; untagged semver sorting excludes the filtered artifacts.
Tests: npm run test:core -- --reporter dot, npm run test:services -- --only=dockerversion, npm run lint, and npm run prettier:check.
Live check before the fix: https://img.shields.io/docker/v/dnesting/nsd/latest.json returns "invalid response data"; replaying that Docker Hub response through the patched service gives v4.15.0-2cfcc4e (date sort) and v4.15.0 (semver sort).
DockerSize (
services/docker/docker-size.service.js) has the same empty-architecture schema rule and fails the same way; it is left for a follow-up PR because its size selection needs its own decision.AI disclosure: prepared with AI assistance (Claude Code with OpenAI Codex) and reviewed with GitHub Copilot.
🤖 Generated with Claude Code