[review] fix: switch Ruby tag source to Registry v2 API to avoid Docker Hub 403 - #49
Merged
Conversation
Docker Hub の hub.docker.com/v2/repositories/.../tags/ は匿名リクエストだと offset 1000 (11ページ目) 以降で 403 を返すようになり、50ページの while ループが 確実に失敗するようになった (--retry では回避不可能な決定的なエラーのため)。 そもそも1737件全タグを50ページかけて取得する必要はなく、Registry v2 API (registry.hub.docker.com/v2/library/ruby/tags/list) を使えば匿名トークンで 全タグを1リクエストで取得できる。ページングを丸ごと削除し、取得件数が 異常に少ない場合は上流障害の見逃しを防ぐため明示的にエラーにする。
dkan75
approved these changes
Aug 11, 2026
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.
Summary
add_ruby_versions.ymlが Docker Hub のhub.docker.com/v2/repositories/.../tags/を50ページまでページングして全タグを取得していたが、匿名リクエストの offset 上限 (1000 = 11ページ目) に達すると403で確実に失敗するようになった(run 31445931484)。--retryでは回避不可能な決定的なエラー。registry.hub.docker.com/v2/library/ruby/tags/list) に切り替えることで、匿名トークンのまま全タグを1リクエストで取得できるようにした。ページング用のwhileループとMAX_PAGESを丸ごと削除。Test plan
4.0.6/3.4.10/3.3.12含む)を確認ruby_versions.jsonを通し、追加なし(歴史的バージョンの誤back-fillなし)を確認ruby_versions.jsonから4.0.6を一時的に削除して差分ロジックを実行し、4.0.6のみが新規検知されることを確認(回帰テスト)workflow_dispatchでの手動実行による最終確認