chr15m / bugout

Back end web app services over WebRTC.
https://chr15m.github.io/bugout
MIT License
612 stars 59 forks source link

CI tests are failing #73

Open chr15m opened 5 months ago

chr15m commented 5 months ago

At some point several of the CI tests started failing. This is likely due to changes in upstream packages. If somebody who uses this library wants to investigate and fix them I'll merge your PR.

You can find the tests here: https://github.com/chr15m/bugout/blob/master/test.js

You can see the log of failing tests here: https://github.com/chr15m/bugout/actions/runs/8998943468/job/24720079227

Several tests fail and then there is a timeout after the last test "RPC server response check async pong". It's probably hanging in the .onFinish call and needs fixing to error out if there are any failed tests.

Kos-M commented 5 months ago

I have noticed the same , some days ago , when a realized how old version of webtorrent we have here.. ( Maybe this is another issue , to upgrade all dependencies on latest )

I have two points in order to improve this project:

chr15m commented 5 months ago

I've set up the automated tests to run now. You can see the results at the link above. Browser tests can be created with Playwright in future.

chr15m commented 5 months ago

For now if you can get npm run test to work again and all the tests pass I'll merge your pending PR.

Kos-M commented 5 months ago

I ll try to find out from which commit and after , those tests are failling to understand what really going on..

chr15m commented 5 months ago

Upgrading deps also makes sense. 👍

chr15m commented 5 months ago

I ll try to find out from which commit and after , those tests are failling to understand what really going on..

Cool thanks. If you know/learn git bisect you will save a lot of time.

Note because versions are generally specified as "greater than X" it might be a change in an external package, not the repo.

chr15m commented 5 months ago

You could try pinning package versions.

Kos-M commented 5 months ago

Seems you are correct , webtorrent version 1.0.2 and after breaks tests 24-27 or more.. I figured it out by resetting head to each commit in history and installing again all dependencies and run tests again... So i managed to pass tests in commit : 024617d462862e98fc1c27b2748736aa6b5d010e which is before a bump of webtorrent's version to 1.0.2 from 0.107.6

chr15m commented 5 months ago

There are a lot of changes in that commit. I wonder what happens if you roll back the changes but keep the upgraded version of WebTorrent?

Kos-M commented 5 months ago

Νο i mean in that commit is in working state , all tests are passing fine.

It broke after one or two commits , in that one with the webtorrent upgrade , after that upgrade tests are failing..

chr15m commented 5 months ago

I should have set the CI tests up earlier so that would have been caught. Oh well.

Kos-M commented 5 months ago

No worries we can fix it anyway :) Later if you want we can setup some actions for automatic deployments to npm also ..