Page MenuHomePhabricator

Migrate documentation generation to Node 10.15.2 from node 6.11.0
Closed, ResolvedPublic

Description

MobileFrontend has documentation that runs using npm run doc that publishes documentation to https://docs.wikimedia.org. It has been failing for a while now.

For some reason this is still using node v6.11.0.

See https://integration.wikimedia.org/ci/job/mwext-npm-doc-publish/1934/console for example failure.

15:29:26 /src/node_modules/jsdoc/lib/jsdoc/fs.js:97
15:29:26     fs.copyFileSync(inFile, path.join(outDir, fileName));
15:29:26        ^
15:29:26 
15:29:26 TypeError: fs.copyFileSync is not a function
15:29:26     at Object.exports.copyFileSync (/src/node_modules/jsdoc/lib/jsdoc/fs.js:97:8)
15:29:26     at staticFiles.forEach.fileName (/src/node_modules/jsdoc/templates/default/publish.js:506:12)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Aug 20, 11:12 PM
Jdlrobson renamed this task from Migration documentation generation to Node 10.15.2 to Migrate documentation generation to Node 10.15.2 from node 6.11.0.Tue, Aug 20, 11:13 PM
Jdlrobson updated the task description. (Show Details)

The replacement for the mwext-npm-doc-publish (node 6) job is extension-javascript-documentation (node 10). It uses a slightly different entry point (it looks for your code to be generated into /docs rather than /docs/js) but writes them to the same place on the docs server. Should be simple enough to shift over.

Change 532417 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] layout: [MobileFrontend] Drop mwext-npm-doc-publish, using extension-javascript-documentation now

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

Change 532418 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] layout: [MinervaNeue] Drop mwext-npm-doc-publish, using extension-javascript-documentation now

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

@Jdlrobson:

Unfortunately it's not passing in CI:

00:02:07.087 <s> [webpack.Progress] 70% building 641/641 modules 0 active
00:02:07.905 npm ERR! code ELIFECYCLE
00:02:07.906 npm ERR! errno 1
00:02:07.906 npm ERR! @ build-storybook: build-storybook -o docs/ui
00:02:07.906 npm ERR! Exit status 1
00:02:07.907 npm ERR!
00:02:07.907 npm ERR! Failed at the @ build-storybook script.
00:02:07.907 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Locally it passes, both with the image used in CI (node10-test:0.5.0) and other obvious images (node10-test-browser, etc.). Investigating.

Change 532418 merged by jenkins-bot:
[integration/config@master] layout: [MinervaNeue] Drop mwext-npm-doc-publish, using extension-javascript-documentation now

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

Change 532417 merged by jenkins-bot:
[integration/config@master] layout: [MobileFrontend] Drop mwext-npm-doc-publish, using extension-javascript-documentation now

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

Jdlrobson closed this task as Resolved.Wed, Aug 28, 12:40 AM

hurrah!