From 3babe9994cc5d96c6494ec2159fafaf87e624b98 Mon Sep 17 00:00:00 2001 From: "Mingyu Chen (Rayner)" Date: Tue, 5 May 2026 23:59:03 -0700 Subject: [PATCH 1/4] [fix] revert per-locale split build and drop legacy dev docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Restore the single bilingual `docusaurus build --locale en --locale zh-CN` invocation in the cron and manual deploy workflows; the prior per-locale split produced different webpack content hashes for EN and ZH, leaving zh-CN HTML referencing /assets/styles..css that only existed under build/zh-CN/ and 404'd under root. Disable building the unversioned (dev) tree of the legacy docs plugin — the dev version now lives under the docs-next plugin only — by removing "current" from versions.json and setting includeCurrentVersion: false on the classic preset's docs config. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/cron-deploy-website.yml | 9 +-------- .github/workflows/manual-deploy-website.yml | 9 +-------- docusaurus.config.js | 3 +++ versions.json | 2 +- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cron-deploy-website.yml b/.github/workflows/cron-deploy-website.yml index 63b4098f1b303..6fe7c3390db15 100644 --- a/.github/workflows/cron-deploy-website.yml +++ b/.github/workflows/cron-deploy-website.yml @@ -39,14 +39,7 @@ jobs: export NODE_OPTIONS=--max-old-space-size=8192 yarn node ./scripts/update_github_info.js - # Build each locale separately into its own out-dir to halve per-process peak memory and avoid OOM on the GitHub-hosted runner. - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --out-dir build-en - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale zh-CN --out-dir build-zh - rm -rf ./build && mkdir ./build - cp -a ./build-en/. ./build/ - # docusaurus build --locale zh-CN --out-dir build-zh writes the locale's full output directly under build-zh/ (no zh-CN subdir); the emitted HTML already contains /zh-CN/ URL prefixes, so we publish build-zh/ verbatim under build/zh-CN/. - mkdir -p ./build/zh-CN - cp -a ./build-zh/. ./build/zh-CN/ + PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --locale zh-CN if [ ! -d "./ja-build" ]; then echo "ja-build directory not found, aborting to avoid publishing incorrect ja content." exit 1 diff --git a/.github/workflows/manual-deploy-website.yml b/.github/workflows/manual-deploy-website.yml index cefd4c3a70900..b8a8b985b009e 100644 --- a/.github/workflows/manual-deploy-website.yml +++ b/.github/workflows/manual-deploy-website.yml @@ -42,14 +42,7 @@ jobs: yarn cache clean export NODE_OPTIONS=--max-old-space-size=8192 yarn - # Build each locale separately into its own out-dir to halve per-process peak memory and avoid OOM on the GitHub-hosted runner. - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --out-dir build-en - PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale zh-CN --out-dir build-zh - rm -rf ./build && mkdir ./build - cp -a ./build-en/. ./build/ - # docusaurus build --locale zh-CN --out-dir build-zh writes the locale's full output directly under build-zh/ (no zh-CN subdir); the emitted HTML already contains /zh-CN/ URL prefixes, so we publish build-zh/ verbatim under build/zh-CN/. - mkdir -p ./build/zh-CN - cp -a ./build-zh/. ./build/zh-CN/ + PWA_SERVICE_WORKER_URL=https://doris.apache.org/sw.js yarn docusaurus build --locale en --locale zh-CN if [ ! -d "./ja-build" ]; then echo "ja-build directory not found, aborting to avoid publishing incorrect ja content." exit 1 diff --git a/docusaurus.config.js b/docusaurus.config.js index 50cfed6f2b69b..93dc0a05c8c69 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -262,6 +262,9 @@ const config = { /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: SKIP_DOCS ? false : { + // Dev (unversioned) build moved to the docs-next plugin; the legacy + // docs/ tree only ships the snapshotted versions in versions.json. + includeCurrentVersion: false, ...(ONLY_VERSIONS && { onlyIncludeVersions: ONLY_VERSIONS }), // When filtering versions, lastVersion must be in the // included list. Fall back to the first included version. diff --git a/versions.json b/versions.json index 7f902aa2102c1..a9a6278010411 100644 --- a/versions.json +++ b/versions.json @@ -1 +1 @@ -["4.x", "3.x", "2.1", "current"] +["4.x", "3.x", "2.1"] From 29472290f67760051630770de2d84a6684524592 Mon Sep 17 00:00:00 2001 From: "Mingyu Chen (Rayner)" Date: Wed, 6 May 2026 00:04:13 -0700 Subject: [PATCH 2/4] [fix] switch docs-next-build to SKIP_DOCS=true The previous DOCS_VERSIONS=current env still tried to filter the legacy docs plugin to its (now-removed) current version, producing "Docs option lastVersion: current is invalid. Available version names are: 4.x, 3.x, 2.1". Skipping the legacy plugin via SKIP_DOCS=true leaves docs-next as the only plugin building the unversioned content. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/docs-next-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-next-build.yml b/.github/workflows/docs-next-build.yml index cadf880d3eb00..77b30bb54a9bb 100644 --- a/.github/workflows/docs-next-build.yml +++ b/.github/workflows/docs-next-build.yml @@ -65,10 +65,13 @@ jobs: npm install -g yarn yarn install --frozen-lockfile || yarn install - - name: Build (current only, EN + zh-CN) + - name: Build (docs-next only, EN + zh-CN) if: steps.changes.outputs.relevant == 'true' env: - DOCS_VERSIONS: current + # Skip the legacy docs plugin entirely — its dev/current build was + # moved to the docs-next plugin, so the old DOCS_VERSIONS=current + # filter no longer matches any version in the legacy plugin. + SKIP_DOCS: 'true' run: | export NODE_OPTIONS=--max-old-space-size=8192 yarn docusaurus build --locale en --locale zh-CN From b9db4b3f43959bd319baeeab5e042f300c324404 Mon Sep 17 00:00:00 2001 From: "Mingyu Chen (Rayner)" Date: Wed, 6 May 2026 00:06:32 -0700 Subject: [PATCH 3/4] [fix] replace 'current' with '4.x' in build-check.yml Same lastVersion-invalid error as docs-next-build.yml: build-check fed DOCS_VERSIONS=current to the legacy docs plugin (sidebars.ts and no-versioned-change fallback paths), but the legacy plugin no longer ships current. Map all four call sites to 4.x so the smoke build hits a real version. Also note in comments that docs/ and i18n current dirs are no longer compiled (PR #3610 forbids edits there). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/build-check.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 0109332c1401d..96314c864a54e 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -86,18 +86,22 @@ jobs: # Check each changed file and map to doc version while IFS= read -r file; do case "$file" in - # English current (dev) docs + # English legacy current dir — no longer compiled + # (dev moved to docs-next plugin). PR #3610 forbids + # modifying these files; if they change anyway, fall + # through to a minimal default-version smoke build. docs/*) - VERSIONS="current,$VERSIONS" + VERSIONS="4.x,$VERSIONS" ;; # English versioned docs versioned_docs/version-*/*) ver=$(echo "$file" | sed -n 's|versioned_docs/version-\([^/]*\)/.*|\1|p') VERSIONS="${ver},$VERSIONS" ;; - # Chinese current docs + # Chinese legacy current dir — no longer compiled + # (see docs/* note above). i18n/zh-CN/docusaurus-plugin-content-docs/current/*) - VERSIONS="current,$VERSIONS" + VERSIONS="4.x,$VERSIONS" LOCALES="en,zh-CN" ;; # Chinese versioned docs @@ -110,9 +114,11 @@ jobs: i18n/zh-CN/docusaurus-plugin-content-docs-community/*|i18n/zh-CN/code.json) LOCALES="en,zh-CN" ;; - # Sidebar for current (dev) version + # Sidebar for legacy current — no longer compiled + # (legacy plugin uses includeCurrentVersion: false). + # Fall through to minimal default-version build. sidebars.ts) - VERSIONS="current,$VERSIONS" + VERSIONS="4.x,$VERSIONS" ;; # Versioned sidebars: extract version from filename # e.g. versioned_sidebars/version-4.x-sidebars.json → 4.x @@ -158,9 +164,10 @@ jobs: # No versioned doc changes (e.g., only blog, community, or scripts). # Blog and community plugins are always compiled by Docusaurus # regardless of DOCS_VERSIONS, so we just set the minimal docs - # scope to keep the build fast. - DOCS_VERSIONS="current" - echo "No doc version changes detected, doing minimal build with 'current' only." + # scope to keep the build fast. Use the default version since + # the legacy plugin no longer ships an unversioned 'current'. + DOCS_VERSIONS="4.x" + echo "No doc version changes detected, doing minimal build with '4.x' only." echo "(Blog and community plugins are always built regardless.)" fi From e5b79cc7a9af1262c88e6666e98a82c8a74e5426 Mon Sep 17 00:00:00 2001 From: "Mingyu Chen (Rayner)" Date: Wed, 6 May 2026 00:14:04 -0700 Subject: [PATCH 4/4] [fix] keep legacy docs plugin enabled in docs-next-build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SKIP_DOCS=true removed the default content-docs plugin entirely, which broke SSG of /archive-docs and /community/how-to-contribute/docs-format- specification — both use a navbar with type: docsVersionDropdown that defaults to pluginId='default'. Instead, build the legacy plugin with DOCS_VERSIONS=4.x so the plugin instance and its global data exist. --- .github/workflows/docs-next-build.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs-next-build.yml b/.github/workflows/docs-next-build.yml index 77b30bb54a9bb..87d35ec5eadfe 100644 --- a/.github/workflows/docs-next-build.yml +++ b/.github/workflows/docs-next-build.yml @@ -65,13 +65,14 @@ jobs: npm install -g yarn yarn install --frozen-lockfile || yarn install - - name: Build (docs-next only, EN + zh-CN) + - name: Build (docs-next + minimal legacy 4.x, EN + zh-CN) if: steps.changes.outputs.relevant == 'true' env: - # Skip the legacy docs plugin entirely — its dev/current build was - # moved to the docs-next plugin, so the old DOCS_VERSIONS=current - # filter no longer matches any version in the legacy plugin. - SKIP_DOCS: 'true' + # Keep the legacy docs plugin enabled (needed by docsVersionDropdown + # navbar items on /archive-docs, /community/..., etc.) but limit it + # to a single version to keep the smoke build fast. 'current' is no + # longer a valid legacy version — that build moved to docs-next. + DOCS_VERSIONS: '4.x' run: | export NODE_OPTIONS=--max-old-space-size=8192 yarn docusaurus build --locale en --locale zh-CN