Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI tests are failing #73

Open
chr15m opened this issue May 8, 2024 · 12 comments
Open

CI tests are failing #73

chr15m opened this issue May 8, 2024 · 12 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@chr15m
Copy link
Owner

chr15m commented May 8, 2024

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 chr15m added bug Something isn't working help wanted Extra attention is needed labels May 8, 2024
@Kos-M
Copy link
Contributor

Kos-M commented May 8, 2024

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 ?

@chr15m
Copy link
Owner Author

chr15m commented May 8, 2024

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
Copy link
Owner Author

chr15m commented May 8, 2024

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
Copy link
Contributor

Kos-M commented May 8, 2024

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

@chr15m
Copy link
Owner Author

chr15m commented May 8, 2024

Upgrading deps also makes sense. 👍

@chr15m
Copy link
Owner Author

chr15m commented May 8, 2024

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
Copy link
Owner Author

chr15m commented May 8, 2024

You could try pinning package versions.

@Kos-M
Copy link
Contributor

Kos-M commented May 8, 2024

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 : 024617d
which is before a bump of webtorrent's version to 1.0.2 from 0.107.6

@chr15m
Copy link
Owner Author

chr15m commented May 8, 2024

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
Copy link
Contributor

Kos-M commented May 8, 2024

Νο 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
Copy link
Owner Author

chr15m commented May 8, 2024

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

@Kos-M
Copy link
Contributor

Kos-M commented May 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants