Problem/Motivation
Node.js was updated from v20 to v24 earlier today. We did not see fails on the issues updating it, but probably because the CI update issue CI results were from before it was updated while the code update did not run on CI.
All Nightwatch tests fail since then. This is due to a deep comparison difference. Both failing assertions do a deep-equality check on DOM elements returned from the browser, in jQueryUIPositionShimTest.js:1071 and again around line 1453. On Node v20, deepEqual compared Promises like plain objects and they matched. On Node v24 two distinct Promise instances are never deep-equal, even with the same resolved value.
Steps to reproduce
Proposed resolution
Instead of passing Promises as-is, gather their values and do manual comparison where needed.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
LLM disclosure
LLM was used to diagnose and fix this issue.
Issue fork drupal-3623728
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3623728-node.js-v24-upgrade
changes, plain diff MR !17157
Comments
Comment #3
gábor hojtsyComment #4
gábor hojtsyComment #5
godotislateI don't have NW expertise or experience, but the changes look pretty straightforward to understand. I have one minor question on the MR.
Comment #6
catchLet's try to get rid of nightwatch in #3338664: Migrate Nightwatch Axe tests to PHPUnit and friends asap - probably we could get down to zero core tests in 12.1 and completely remove support in 13.
I'm not really qualified to review this but the changes are simple enough and unbreak HEAD, so moving to RTBC.
Comment #9
godotislateCommitted and pushed 42aca8d to main and 113da53 and to 11.x. Thanks!
Do we need to backport to 11.4.x or other branches as well?
Comment #10
catchWe didn't backport #3620803: Update minimum Node version to 24 to 11.x, but I think it would be reasonable to backport this fix + the node version bump in
.gitlab-ci.ymlin this issue together (without increasing the requirement).Comment #11
godotislateYeah, I backported this fix to 11.x because even that was failing: https://git.drupalcode.org/project/drupal/-/jobs/12240882.
So now I'm wondering if the other branch jobs are affected as well.
Comment #12
godotislateRunning the scheduled 11.4.x daily manually to see: https://git.drupalcode.org/project/drupal/-/pipelines/964139
Comment #13
godotislate11.4.x fails too: https://git.drupalcode.org/project/drupal/-/jobs/12243227
Comment #14
catchAh probably when the container was updated, it's running on node 24 despite specifying node 20 (treated as minimum?).
Comment #15
godotislateI think I'll wait till tomorrow to commit to 11.4.
Also wait for the 10.6.x daily and 11.3.x weekly (both scheduled to run in a few hours) to see if the changes are needed there.
Comment #16
godotislateLast scheduled runs:
11.4.x: https://git.drupalcode.org/project/drupal/-/pipelines/964989 (Nightwatch fail)
11.3.x: https://git.drupalcode.org/project/drupal/-/pipelines/964700 (Nightwatch fail)
10.6.x: https://git.drupalcode.org/project/drupal/-/pipelines/964648 (Nightwatch pass)
So, it seems like we should backport to 11.4.x and 11.3.x?
Comment #17
catchBackport sounds good here, even if it's a dangling commit on 11.3.x
Comment #20
godotislateBackported to 11.4 and 11.3 after consulting with catch and xjm. Thanks!