bugout icon indicating copy to clipboard operation
bugout copied to clipboard

CI tests are failing

Open chr15m opened this issue 1 year ago • 12 comments

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.

chr15m avatar May 08 '24 08:05 chr15m

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:

  • We need to run automated tests to early detect those kind of issues
  • In browser side , do we have any way to quick test library ? ( Maybe demo app ? ) , can this be done automatically with browser tests ?

Kos-M avatar May 08 '24 09:05 Kos-M

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 avatar May 08 '24 09:05 chr15m

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

chr15m avatar May 08 '24 09:05 chr15m

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

Kos-M avatar May 08 '24 10:05 Kos-M

Upgrading deps also makes sense. 👍

chr15m avatar May 08 '24 10:05 chr15m

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 avatar May 08 '24 10:05 chr15m

You could try pinning package versions.

chr15m avatar May 08 '24 10:05 chr15m

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

Kos-M avatar May 08 '24 11:05 Kos-M

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?

chr15m avatar May 08 '24 11:05 chr15m

Νο 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..

Kos-M avatar May 08 '24 11:05 Kos-M

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

chr15m avatar May 08 '24 11:05 chr15m

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

Kos-M avatar May 08 '24 11:05 Kos-M