Page MenuHomePhabricator

Popups failing LibUp due to "Please ensure you are running the correct version of nvm"
Open, Stalled, LowPublic

Description

https://libraryupgrader2.wmcloud.org/r/mediawiki/extensions/Popups

CHECKING BUILD SOURCES ARE COMMITTED OR STAGED
(node:1619) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
Built at: 09/30/2020 9:14:59 PM
diff --git a/resources/dist/index.js b/resources/dist/index.js
index d0974d5..5903688 100644
Binary files a/resources/dist/index.js and b/resources/dist/index.js differ
diff --git a/resources/dist/index.js.map.json b/resources/dist/index.js.map.json
index 240bf55..9c02043 100644
Binary files a/resources/dist/index.js.map.json and b/resources/dist/index.js.map.json differ
v10.21.0
6.14.5
Please ensure you are running the correct version of nvm before running this command.
npm ERR! Test failed.  See above for more details.

I am not sure what happens here, but Popups passed on CI some days ago
https://integration.wikimedia.org/ci/job/mwgate-node10-docker/165730/consoleFull

Event Timeline

I'm not sure we should encourage this; letting repos come up with random versions of node via nvm is pretty likely to result in much less good npm audit capabilities, which is the primary purpose of LibUp. PopUps hard-coding node versions and committing built files is broken-by-design, unfortunately.

libup doesn't use nvm, it installs nodejs using the same version as CI. I agree with James, this is pretty fragile. Isn't node6 pretty old anyways? Can we update them to node10?

I moved it to node 10 in rEPOP4fb6120fc9b7: Upgrade from node 6 to node 10, now that CI is running that to match the version in CI at the time (and still), v10.15.2. However, it looks like LibUp is running on v10.21.0 instead?

I moved it to node 10 in rEPOP4fb6120fc9b7: Upgrade from node 6 to node 10, now that CI is running that to match the version in CI at the time (and still), v10.15.2. However, it looks like LibUp is running on v10.21.0 instead?

I misremembered, because libup moved to buster we're using the nodejs from Debian, which is 10.21.0~dfsg-1~deb10u1. stretch-wikimedia's component/node10 is at 10.15.2~dfsg-1+wmf1. :|

Ah. We could move CI over to buster for node testing pretty easily, but it'd be less like production (though all node in production runs in the service pipeline nowadays, so that's less a concern).

@Jdforrester-WMF I came across this ticket as I was facing a similar issue in Vector when working on T257582. Vector has hard coded the version of node to 10.16.0 with nvm, but as mentioned CI images have version 10.5.2. Your comment about letting repos come up with random versions of node made sense, just interested to see how this gets resolved.

Legoktm changed the task status from Open to Stalled.Dec 29 2020, 5:21 AM

At this time LibUp is going to continue using the nodejs version in whichever apt packages are convenient. Given that this only an issue for one or two special repositories, I'm not that interested in investing a lot of time in getting this to work for them.

So the underlying problem is that the Popups (and a few other repositories) npm tests can only be run with a specific version of nodejs, otherwise they'll fail. For reasons I briefly explained above, LibUp uses a different version.

There are a few different ways forward, including:

  • Change the nodejs version LibUp uses
  • Change the version CI and Popups uses to be in sync with LibUp
  • Change Popups so you can use arbitrary nodejs versions without it failing
  • ...?

As the primary LibUp maintainer, I've provided input on what I'm willing to do and don't want to do. I think at this point we need feedback from the Popups maintainers to see what's reasonable on their end to figure out how to fix this, hence I marked the task as stalled.

at this point we need feedback from the Popups maintainers to see what's reasonable on their end to figure out how to fix this, hence I marked the task as stalled.

Explicitly adding Web-Team-Backlog - could this please get input? Thanks.

Jdlrobson subscribed.

I'm not sure what input is required here from my team. We are waiting on the outcome of T279108 at which point we'll hopefully be able to remove this CI check. Until then it's essential that the Node version we hardcode must be synced with CI so we can verify that the developer is not submitting code that cannot be reproduced.

taavi renamed this task from Update nvm for libup to match CI to Popups failing LibUp due to "Please ensure you are running the correct version of nvm".Apr 21 2024, 11:26 PM
taavi triaged this task as Low priority.
taavi subscribed.