[fix](ci) filter retired versions from build-check onlyIncludeVersions#3742
Merged
morningman merged 1 commit intoMay 22, 2026
Merged
Conversation
When a PR touches files under retired version dirs (e.g. versioned_docs/version-1.2/, version-2.0/) that are no longer in versions.json, the build-check workflow used to forward those versions verbatim to Docusaurus onlyIncludeVersions, which then failed with "unknown versions (1.2,2.0) found". Intersect the detected version list with the active set (current + versions.json) so edits to retired dirs are logged and skipped instead of breaking CI. If every detected version is retired, fall back to a minimal '4.x' build so the site still gets validated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
build-check.ymlpreviously forwarded every version segment it found in changed file paths straight to Docusaurus'onlyIncludeVersions. Touching files under retired version dirs (e.g.versioned_docs/version-1.2/,version-2.0/) made the build fail withunknown versions (1.2,2.0) found, even when those files were just being deleted.current+ entries fromversions.json) before building. Retired/unknown versions are logged and skipped; if everything is retired, we fall back to a minimal4.xbuild so the workflow still validates the site.Repro
PR #3731 (deletes
query_detaildoc from every version dir including 1.2 and 2.0) failed with:Failed job: https://github.com/apache/doris-website/actions/runs/26280229035/job/77354293705?pr=3731
Test plan
DOCS_VERSIONS=current,4.x,3.x,2.1and logsIgnoring changes to retired/unknown versions: 2.0,1.2..github/workflows/build-check.ymlchanges; this PR itself touches no doc versions, so the workflow takes the minimal4.xfallback branch — verify by reading the=== Build plan ===line in the job log).