-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodejs: run JS test suite as part of the checks #313982
Conversation
Diff looks good, but this should go to The commit metadata also seems wrong, check your Git |
@ofborg build nodejs_18 nodejs_20 nodejs_22 |
Looks like you rebased on staging (as opposed to the merge base of staging) before changing the target branch -- the rebase on staging shouldn't happen until after the target branch change -- but thankfully this didn't result in a huge amount of notifications so I think we can keep this PR rather than opening a new one (sorry to the unrelated requested reviewers!). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, will merge if the builds pass
The build seems to be failing on ofborg: https://logs.ofborg.org/?key=nixos/nixpkgs.313982&attempt_id=fdb75382-9baf-43dc-9dfa-990f53fc001f maybe this is an issue with the non-slim build? |
Yes, the macOS failures are real but weren't introduced here. Not sure how to parse the first part of your comment though -- ready or not? :) |
Yes sorry, I meant that IMO it's ready to land. |
This has broken nodejs_18 and nodejs_22. |
@alyssais can you give more info regarding what's broken? |
On Mon, Jun 17, 2024 at 05:35:40AM -0700, Antoine du Hamel wrote:
@alyssais can you give more info regarding what's broken?
They no longer build on x86_64-linux.
(On current staging, nodejs_20 doesn't build either, but that wasn't introduced by this PR, rather by the OpenSSL upgrade, and nodejs has an upstream patch for it.)
|
Do you have a link or could you copy the output please? |
nodejs_18 on b26563a is building for me now, so for that one it either fails intermittently or I made a mistake. |
Hum unfortunately some tests are flaky (it's also a problem for Node.js CI, but unfortunately quite tricky to fix). I'll try to make a patch to automatically re-run failing tests to avoid failing the build just because of a flake. |
If test failures are likely to be due to flakiness, is it worth it for us to run the tests in the first place? |
If the options are:
IMO the middle point is the best tradeoff, but that's certainly a subjective call. |
@lheckemann wdyt? |
I'm guessing it's only individual tests that are flaky (and known to be flaky)? I think it would be worth skipping those specifically, or having the tests retry (if they can't be fixed in order not to be flaky). I imagine that would be a welcome improvement upstream as well? |
There's already such system upstream, and this PR is already taking advantage of it and skip the tests that have been marked as flaky upstream:
However, because the Node.js project has a relatively high bar for marking tests as flaky (the idea being a test marked as flaky has less chance of getting fixed, because flaky tests do not block PRs from merging); however, for NixOS, those flakes can be very annoying, and IMO it's not realistic to try to manage our own list of FLAKY tests, so I think the best course of action would be to allow to retry failing tests – if a test fails once, and succeeds e.g. the 9 following times, it's safe to assume it was just a flake, no? |
Right, but we don't want to have to restart drv builds every time the tests fail (especially since that will involve building the code again too) and that means manual work in addition to wasted compute and time. And I'd expect tests that aren't marked as flaky... not to be flaky 🙃 |
Update, I don't think these are actually flaky, but failing maybe for OpenSSL-related reasons?
|
Yep, nodejs/node@14863e8 seems to be the fix for this, so it must have been an unfortunate timing coincidence with the merging of this PR. |
Asked about backporting the nodejs-side fix: nodejs/node#53373 (comment) |
I cherry-picked that commit to the 20.x update PR
It's different from the failure reported in #313982 (comment):
I tried running that test 999 times on my machine for a stress test on the latest
It's certainly not an unreasonable expectation :) however it's inevitable there are some flaky tests that are going to slip through, and I guess the question is "are we fine with those flakes affecting us (Nix)?"
That's precisely why I'm suggesting we retry the failing tests to not fail the build if it hits a flaky test (that is, a test flaky in practice even though not marked as flaky for whatever reason). |
That's not the test failures we're talking about here. (I mentioned it already in #313982 (comment)) |
Argh, sorry. I'll throw it at a builder a couple of times to see if I can get an idea of how often it happens. |
This was recently enabled in NixOS#313982. It seems to be much too flaky on Darwin currently, especially x86; see: * <https://hydra.nixos.org/build/264860513/nixlog/8> * <https://hydra.nixos.org/build/264956149/nixlog/3> * <https://hydra.nixos.org/build/265094929/nixlog/3> * <https://hydra.nixos.org/build/264901296/nixlog/3> Disable these tests on macOS for now as the broken Node.js package is holding up a lot of builds. Fixes: b26563a
Basically reverting this on darwin: |
This was recently enabled in NixOS#313982. It seems to be much too flaky on Darwin currently, especially x86; see: * <https://hydra.nixos.org/build/264860513/nixlog/8> * <https://hydra.nixos.org/build/264956149/nixlog/3> * <https://hydra.nixos.org/build/265094929/nixlog/3> * <https://hydra.nixos.org/build/264901296/nixlog/3> Disable these tests on macOS for now as the broken Node.js package is holding up a lot of builds. Fixes: b26563a (cherry picked from commit d25d9b6)
Description of changes
I noticed the JS test suite of Node.js wasn't run as part of the check phase, so I spent some time making it work. I've opened nodejs/node#53105 and nodejs/node#53104 to land the fixes upstream.
I've only the changes with
nix-build -A nodejs-slim_20
. I think there are some improvements that could be made (e.g. currently the list of skip tests is shared for all versions, it would probably make more sense to have per-version specific lists instead).Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.