Skip to content

fix(ci): read _versions.yml from the serving bucket - #811

Merged
XciD merged 1 commit into
mainfrom
fix/versions-yml-from-serving-bucket
Jul 31, 2026
Merged

fix(ci): read _versions.yml from the serving bucket#811
XciD merged 1 commit into
mainfrom
fix/versions-yml-from-serving-bucket

Conversation

@XciD

@XciD XciD commented Jul 31, 2026

Copy link
Copy Markdown
Member

Problem

https://huggingface.co/docs/tokenizers/index returned a 404.

moon-landing serves docs from the hf-doc-build/doc bucket. It reads {package}/_versions.yml from that bucket, takes the first non-main entry as the default version, then readdirs {package}/{version} and turns ENOENT into a 404 (server/app/contentRoutes.ts:1774-1786 and :1841).

The Create build directory step here fetched _versions.yml from the legacy hf-doc-build/doc-build dataset, and the later Sync to bucket step pushed that list to the bucket. So the bucket could advertise versions it did not contain.

That is what happened to tokenizers:

  • 27 Apr 2026: the v0.23.1 tag build ran when this workflow had no Sync to bucket step, so the build only landed in the dataset.
  • 15 Jul 2026: the main build imported the dataset's version list (first non-main entry: v0.23.1) into the bucket, while uploading only main/. 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/index serves 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.

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.
@XciD
XciD marked this pull request as ready for review July 31, 2026 13:20
@XciD
XciD merged commit 7ccf6c0 into main Jul 31, 2026
4 checks passed
@XciD
XciD deleted the fix/versions-yml-from-serving-bucket branch July 31, 2026 13:20
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.

2 participants