digidem / mapeo-core-next

The upcoming version of Mapeo Core
MIT License
7 stars 1 forks source link

chore: add Node 20 to CI #652

Closed achou11 closed 1 month ago

achou11 commented 1 month ago

Adds Node 20 to the matrix for CI, as that's the current LTS and it would seem advisable to be testing on that version in addition to 18 (which is still needed because of our usage of NodeJS Mobile)

achou11 commented 1 month ago

ooo interesting - test failure on 20: https://github.com/digidem/mapeo-core-next/actions/runs/9099775156/job/25013115175?pr=652#step:6:3694

 # ok 2 - device info written to projects \# time = 359.825798ms
# \# device info sent to peers
#     ok 1 - should be equal
#     ok 2 - should be equal
#     not ok 3 - should be equal
#       ---
#       actual: device0
#       expected: new name
#       operator: is
#       source: |
#               const [peersFromEvent] = await once(manager, 'local-peers')
#               t.is(peersFromEvent.find(isChangedPeer)?.name, 'new name')
#         --------^
#         
#               const updatedLocalPeers = await manager.listLocalPeers()
#       stack: |
#         ./test-e2e/device-info.js:167:9
#         process.processTicksAndRejections (node:internal/process/task_queues:95:5)
#         async ./test-e2e/device-info.js:176:3
#         async Test._run (./node_modules/brittle/index.js:576:7)
#       ...
#     ok 4 - should be equal
achou11 commented 1 month ago

haven't been able to reproduce the test failure locally yet 🙃

EvanHahn commented 1 month ago

I don't have a solution but I reproduced it on my machine with no issue. I wonder if it's a Linux thing?

achou11 commented 1 month ago

I don't have a solution but I reproduced it on my machine with no issue. I wonder if it's a Linux thing?

Failure seems to occur on all machines in CI though?

EvanHahn commented 1 month ago

Ah true. Uh...did you run npm rebuild? I don't expect that to be the issue.

achou11 commented 1 month ago

Ah true. Uh...did you run npm rebuild? I don't expect that to be the issue.

yep, no luck though 🤔

EvanHahn commented 1 month ago

Strange...let me know if I can help at all.

achou11 commented 1 month ago

Strange...let me know if I can help at all.

if you can just...fix everything, that would be a great help 👍

EvanHahn commented 1 month ago

I have a simple fix but don't really understand why it works. Investigating further...

EvanHahn commented 1 month ago

Pushed eb23f663b9895a07a21746de452b6ddd654b0dfa to fix the problem. It has a wordy explanation about the race condition that happened here.