Skip to content

[fix](ci) filter retired versions from build-check onlyIncludeVersions#3742

Merged
morningman merged 1 commit into
apache:masterfrom
morningman:fix-build-check-filter-retired-versions
May 22, 2026
Merged

[fix](ci) filter retired versions from build-check onlyIncludeVersions#3742
morningman merged 1 commit into
apache:masterfrom
morningman:fix-build-check-filter-retired-versions

Conversation

@morningman
Copy link
Copy Markdown
Contributor

Summary

  • build-check.yml previously 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 with unknown versions (1.2,2.0) found, even when those files were just being deleted.
  • This change intersects the detected versions with the active set (current + entries from versions.json) before building. Retired/unknown versions are logged and skipped; if everything is retired, we fall back to a minimal 4.x build so the workflow still validates the site.

Repro

PR #3731 (deletes query_detail doc from every version dir including 1.2 and 2.0) failed with:

Invalid docs option "onlyIncludeVersions": unknown versions (1.2,2.0) found.
Available version names are: current, 4.x, 3.x, 2.1

Failed job: https://github.com/apache/doris-website/actions/runs/26280229035/job/77354293705?pr=3731

Test plan

  • Local simulation with PR docs: remove query_detail open API documentation #3731's changed-file list now produces DOCS_VERSIONS=current,4.x,3.x,2.1 and logs Ignoring changes to retired/unknown versions: 2.0,1.2.
  • CI of this PR passes (only .github/workflows/build-check.yml changes; this PR itself touches no doc versions, so the workflow takes the minimal 4.x fallback branch — verify by reading the === Build plan === line in the job log).
  • After merge, re-run CI on docs: remove query_detail open API documentation #3731 and confirm it goes green without reverting the 1.2/2.0 file deletions.

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>
@morningman morningman merged commit 2b52209 into apache:master May 22, 2026
3 checks passed
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.

1 participant