Skip to content

ci(docs): Upgrade Docusaurus to 3.10.0, pin webpack dep and track docs/yarn.lock for deterministic CI runs#2817

Merged
awahab07 merged 4 commits into
elastic:mainfrom
awahab07:Lock-Docusaurus-version-and-depencies
Apr 10, 2026
Merged

ci(docs): Upgrade Docusaurus to 3.10.0, pin webpack dep and track docs/yarn.lock for deterministic CI runs#2817
awahab07 merged 4 commits into
elastic:mainfrom
awahab07:Lock-Docusaurus-version-and-depencies

Conversation

@awahab07
Copy link
Copy Markdown
Collaborator

Summary

  • upgrade the docs workspace to @docusaurus/*@^3.10.0
  • track docs/yarn.lock so docs installs are deterministic in CI
  • pin the transitive webpack version to 5.105.1, which is compatible with the currently resolved webpackbar@6.0.1

Problem

The docs step started failing on PR builds such as build 223 and build 228, including on PR #2816, with the following error:

[ERROR] Error: Unable to build website for locale en.
--
...
[cause]: ValidationError: Invalid options object. Progress Plugin has been initialized using an options object that does not match the API schema.

The underlying issue was not simply "Docusaurus 3.10 is broken". The docs workspace did not have a tracked lockfile, so yarn install --frozen-lockfile had nothing to freeze in docs/ and CI was free to resolve newer transitive versions than local development.

Solution / Fix

This PR makes the docs install path deterministic and upgrades it intentionally:

  • upgrade the docs workspace from @docusaurus/*@^3.2.1 to @docusaurus/*@^3.10.0
  • add a tracked docs/yarn.lock
  • pin webpack to 5.105.1 via resolutions in docs/package.json

Details / Background

  • yarn install --frozen-lockfile is only protective when a lockfile is actually present and tracked. Without docs/yarn.lock, CI was still resolving fresh versions for the docs workspace.
  • The blanket nested-lockfile ignore came from #1572. That PR ignored nested yarn.lock files globally, while e2e/ explicitly re-included its own lockfile.
  • .buildkite/yarn.lock is tracked because it predates that ignore rule. Tracked files stay tracked even if a later ignore rule would have matched them.
  • The docs workspace was introduced later in #2280, after the blanket nested-lock ignore already existed, so docs/yarn.lock never entered git.
  • The failure boundary lines up with the webpack release timing more than with a docs source change on the branch:
    • build 222 was created before webpack@5.106.0 was published
    • build 223 and build 228 happened after that publish and hit the docs failure
  • Local reproduction showed that webpackbar@6.0.1 works through webpack@5.105.1 and starts failing with webpack@5.106.0+, while Docusaurus 3.10.0 itself still builds successfully when webpack is kept on 5.105.1.

How to test

  1. Run yarn typedoc
  2. Run DOCUSAURUS_URL="https://example.com" DOCS_URL="https://example.com" yarn --cwd docs build
  3. Run yarn typecheck:all
  4. Run yarn test

The generated docs on this PR can also be compared with one of earlier build versions e.g.

@awahab07 awahab07 added :ci :build Build tools / dependencies labels Apr 10, 2026
@awahab07
Copy link
Copy Markdown
Collaborator Author

buildkite test this

@elastic-datavis
Copy link
Copy Markdown
Contributor

@awahab07 awahab07 marked this pull request as ready for review April 10, 2026 16:26
@awahab07 awahab07 changed the title ci(docs): track docs lockfile and pin webpack for Docusaurus 3.10.0 ci(docs): Upgrade Docusaurus to 3.10.0, pin webpack dep and track docs/yarn.lock for deterministic CI runs Apr 10, 2026
Copy link
Copy Markdown
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I didn't realize at the time non-workspace lock files were needed.

@awahab07 awahab07 merged commit cede679 into elastic:main Apr 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:build Build tools / dependencies :ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants