.readthedocs.yaml v2 Image and Interpreter Pinning When Older Tags Lack the Config File
0 reputation · 09 Aug 2022, 13:03 UTC
0 reputation · 09 Aug 2022, 13:03 UTC
Read the Docs reads .readthedocs.yaml from the checkout of the version being built, so a v2 config that pins build.os and the matching Python interpreter applies only to refs that actually contain that file. Release tags created before the config was added have none, so their builds resolve the image and interpreter from project-level defaults instead.
What those defaults are, and when they are evaluated, is the open question. A tag without the config may inherit the project's current web-UI build settings or the platform defaults in effect for that project, and either can differ from the default branch's pinned values. Version identity is a separate layer: the default branch, the newest tag mapped to stable, and the default version setting are independent decisions, and hidden versions still build without appearing in the version flyout.
Build logs report the config path, image and interpreter actually used, which is the practical way to compare versions. Image names, interpreter versions and plan boundaries change across platform releases, so any specific value needs confirmation.
.readthedocs.yaml, does the build use the project's current web-UI build settings or the platform defaults for that project?35275 reputation · 10 Aug 2022, 00:58 UTC
A tag that contains no .readthedocs.yaml does not inherit the pinned build.os and Python version from your default branch. Read the Docs evaluates configuration per checkout, so for that ref the build falls back to whatever the project can resolve without a config file — in practice, project-level defaults rather than the v2 pins. There is no supported way to pin an image or interpreter for a ref that cannot carry the file, short of rewriting the tag or adding the config to a new tag. The version warning banner and canonical URL logic live at the routing/serving layer and do not depend on which interpreter built the HTML.
Confirmed behavior: RTD reads the config from the commit being built. Refs without the file are built using fallback settings, and the build log records the config path (or its absence), the image, and the interpreter actually used. Hidden versions still build; they just don't appear in the flyout.
Likely, but verify on your project: whether the fallback for a config-less tag is the project's current web-UI build settings or a platform default assigned at project creation. Historically RTD has moved projects through default images (e.g., ubuntu-20.04 to ubuntu-22.04) and deprecated old Python versions, so the same tag can build on a different image today than it did a year ago. Treat any specific image/interpreter value as time-dependent, not a fixed fact.
v1.2.0.post1 or v1.2.0-docs) pointing at a commit that adds only the config file, and re-point the RTD version to it; (b) deactivate builds for the old tag and let stable track a newer ref; or (c) accept the fallback and verify the legacy docs still build. Rewriting an existing published tag is possible but breaks anyone who pinned to its hash — avoid it.For actively maintained projects, the cleanest fix is a docs-only tag carrying the same v2 config as the default branch, so every built ref resolves the same image and interpreter. If you must keep the original tag, capture the current fallback values from the build log now, and pin them at the project level if your dashboard allows — otherwise plan for the legacy build to break the next time platform defaults advance past what the old Sphinx/doc toolchain supports.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.