Coverage in aegir + node hangs on CI and Local Dev
laurentsenta opened this issue · 4 comments
Describe the bug
We had to disable code coverage in node 18, which pushed the burden of checking code coverage onto maintainers and PR reviewers.
@achingbrain has prepared a PR to enable it back, but it's still blocking:
#1195
Examples:
https://github.com/ipfs/aegir/actions/runs/4225847659/jobs/7338650113
@BigLep shared details on why we need to solve this in https://filecoinproject.slack.com/archives/C03KLC57LKB/p1678122004165499
Options:
- Figure out what happens and fix it,
- Use a different code coverage tool that doesn't have the same issue.
- NYC might be abandoned: istanbuljs/nyc#1514
Issue was created in bcoe/c8#454
There is a nodejs related issue discussed in bcoe/c8#432, which leads to nodejs/node#45013 and nodejs/node#45055.
Naively, I tried to run the test on many different version, hoping I would find a clear "v18 is broken" or something.
But, if you exclude the "missing fetch function" on older nodejs versions, it seems that every version hangs, except the node v19 on windows:
https://github.com/laurentsenta/aegir/actions/runs/4353486483/jobs/7607591085
According to this comment (bcoe/c8#432 (comment)), folks are able to fix the issue by moving to node v20.
I've updated the PR that re-enables coverage to only run coverage on node 20 but it still hangs so I think that comment is a red herring.
Edit: Actually looking at that issue they're reporting a segfault which is not the problem we are seeing. The problem we see is detailed above - the process hangs after the test run finishes, it doesn't crash.
Possibly related: nodejs/node#49344