fix(ci): read _versions.yml from the serving bucket - #811
Merged
Conversation
The main doc build fetched the version list from the legacy doc-build dataset and synced it to the hf-doc-build/doc bucket, which is what moon-landing actually serves. When a release build had only reached the dataset, the bucket ended up advertising a version whose folder it did not have, and hf.co/docs/<package> returned a 404 on its default version (tokenizers v0.23.1). Reading the list from the bucket keeps the served version list consistent with the served content.
rtrompier
approved these changes
Jul 31, 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.
Problem
https://huggingface.co/docs/tokenizers/indexreturned a 404.moon-landing serves docs from the
hf-doc-build/docbucket. It reads{package}/_versions.ymlfrom that bucket, takes the first non-mainentry as the default version, thenreaddirs{package}/{version}and turnsENOENTinto a 404 (server/app/contentRoutes.ts:1774-1786and:1841).The
Create build directorystep here fetched_versions.ymlfrom the legacyhf-doc-build/doc-builddataset, and the laterSync to bucketstep pushed that list to the bucket. So the bucket could advertise versions it did not contain.That is what happened to tokenizers:
v0.23.1tag build ran when this workflow had noSync to bucketstep, so the build only landed in the dataset.mainbuild imported the dataset's version list (first non-mainentry:v0.23.1) into the bucket, while uploading onlymain/. From then on the default version pointed at a folder the bucket never received.Fix
Read the version list from the bucket that is actually served, so the served list stays consistent with the served content by construction.
The bucket has been backfilled for the version folders that were dataset-only (
tokenizers/v0.23.1,tokenizers/v0.23.1-rc0,datasets/v4.8.5,datasets/v5.0.0,datasets/v5.0.1,huggingface_hub/v1.11.0,optimum/v2.2.0,optimum-intel/v2.0.0), so this change loses no version./docs/tokenizers/indexserves v0.23.1 again.Every package present in the dataset also has a bucket folder, so no package loses its version list with this change.