ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

Fix node versions

Open jochem-brouwer opened this issue 1 year ago • 5 comments

Closes #3279

TODO

  • [ ] Fix node version tests
  • [ ] Remove node-versions job from being triggered on PRs
  • [ ] Restore the old CI jobs back (remove this commit: aabeb3fd5befa89c6378481e291662d3fa7d0c96)

Note: the client test seems to rely upon the internal timing of the NodeJS timers. I think if we make this longer (I made it 100 times longer) then we are ok. (Although this raises the question if we should take a deeper look if we can improve this test)

jochem-brouwer avatar Feb 15 '24 22:02 jochem-brouwer

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.60%. Comparing base (891ee51) to head (0175f87).

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.43% <ø> (ø)
blockchain 91.61% <ø> (ø)
client 84.86% <ø> (-0.03%) :arrow_down:
common 98.43% <ø> (ø)
devp2p 82.12% <ø> (ø)
ethash ∅ <ø> (∅)
evm ?
genesis 99.98% <ø> (ø)
rlp ?
statemanager 77.00% <ø> (ø)
trie 89.28% <ø> (-0.04%) :arrow_down:
tx 95.55% <ø> (ø)
util 89.19% <ø> (ø)
vm 79.85% <ø> (ø)
wallet 88.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Feb 15 '24 23:02 codecov[bot]

This test fails intermittently even on normal CI runs. I've thought about looking into this more but haven't had a chance. An ideal solution would be event based rather than timer based so we don't have these failures that just aren't guaranteed to work that well. Or explore using vitest's fakeTimers API to manually control the timers. I've done this in some ultralight tests that are dependent on timestamps to eliminate random test failures there.

acolytec3 avatar Feb 16 '24 03:02 acolytec3

Well, the weird thing is that it keeps failing the VM nightly tests, see: https://github.com/ethereumjs/ethereumjs-monorepo/actions/workflows/vm-nightly-test.yml

So this is not a random event.

I had it passing locally but it keeps failing on CI, so yes, I think we should go with your suggestion and make the test more robust. (I will not have time to address this today)

jochem-brouwer avatar Feb 16 '24 10:02 jochem-brouwer

Thanks for giving this a start! 🙏

holgerd77 avatar Feb 16 '24 14:02 holgerd77

In looking further at this test, this looks like a prime candidate for moving from td to vitest.mock for mocking. At the same time we ought to be able to switch over to fakeTimers to make this work robustly. I will take a look tonight and/or this weekend as life allows.

acolytec3 avatar Feb 17 '24 03:02 acolytec3