Page MenuHomePhabricator

Patchdemo's Node LTS version is incompatible with latest Vitepress
Closed, ResolvedPublicBUG REPORT

Description

We recently pushed a change that updates Vitepress (used for the Codex docs site) to v1.0.0-alpha.47. It looks like this latest version of Vitepress requires Node v16.6.0 or greater due to use of Array.prototype.at in its internals (parsing filenames). See the compatibility table for this method here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at#browser_compatibility

PatchDemo is still running Node 14. This means that all attempts to build Codex inside of a PatchDemo instance now fail with the following error:

build error:
TypeError: filename.split(...).at is not a function

There are also a lot of "unsupported engine" warnings in the console output.

Short-term solution

We should revert the Vitepress update in our code to preserve PatchDemo functionality.

Long-term solution

PatchDemo should be updated to use Node LTS version 16.

Alternate solution

Looks like Vitepress fixed this problem themselves upstream, and it's been included in the alpha 48 release which came out yesterday. See https://github.com/vuejs/vitepress/commit/fd995906f61e5181ca8e1116dcd93eec65075056 (included in the latest release).

Event Timeline

Change 892412 had a related patch set uploaded (by Eric Gardner; author: Catrope):

[design/codex@main] Revert "build: Upgrade VitePress from 1.0.0.alpha.29 to 1.0.0.alpha.47"

https://gerrit.wikimedia.org/r/892412

I've confirmed that this patch fixes the immediate problem – see the patchdemo link above as evidence for this.

Once this is merged, we may want to re-write this task to represent the fact that our ability to update Vitepress will be blocked until we can upgrade the Node TLS version in PatchDemo. @Catrope if you file a PatchDemo task or post a patch feel free to reference it here.

egardner renamed this task from Updating Vitepress to v1.0.0-alpha.47 breaks PatchDemo to Patchdemo's Node LTS version is incompatible with latest Vitepress.Feb 27 2023, 10:38 PM

Change 892412 merged by jenkins-bot:

[design/codex@main] Revert "build: Upgrade VitePress from 1.0.0.alpha.29 to 1.0.0.alpha.47"

https://gerrit.wikimedia.org/r/892412

Change 892413 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[design/codex@main] build: Upgrade Vitepress to 1.0.0-alpha.48

https://gerrit.wikimedia.org/r/892413

egardner claimed this task.

Closing this since there is a PatchDemo issue filed here: https://github.com/MatmaRex/patchdemo/issues/531.

Codex PatchDemo builds are working again after the revert, and future updates to the docs site can use VitePress alpha 48 or greater to avoid this problem.

Change 893051 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from v0.6.0 to v0.6.2

https://gerrit.wikimedia.org/r/893051

Change 893051 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.6.0 to v0.6.2

https://gerrit.wikimedia.org/r/893051

Change 892413 merged by jenkins-bot:

[design/codex@main] build: Upgrade Vitepress to 1.0.0-alpha.48

https://gerrit.wikimedia.org/r/892413

Change 898895 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/core@master] Update Codex from v0.6.2 to v0.7.0

https://gerrit.wikimedia.org/r/898895

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/5422db01f3/w/

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/3dd6e2b7c7/w/