Skip to content

Conversation

@coopernetes
Copy link
Contributor

@coopernetes coopernetes commented Dec 5, 2025

Fixes #1310

  • convert nedb file-based database setup to use in-memory databases when running
    in test mode
  • remove the single process requirement for tests, run tests in parallel

- convert nedb file-based database setup to use in-memory databases when running
  in test mode
- remove the single process requirement for tests, run tests in parallel
@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 09a0680
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6936963d10c1c60008761961

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.85%. Comparing base (4f73bf7) to head (09a0680).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/db/file/pushes.ts 50.00% 3 Missing ⚠️
src/db/file/repo.ts 50.00% 3 Missing ⚠️
src/db/file/users.ts 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1312      +/-   ##
==========================================
- Coverage   80.99%   80.85%   -0.14%     
==========================================
  Files          66       66              
  Lines        4499     4514      +15     
  Branches      776      778       +2     
==========================================
+ Hits         3644     3650       +6     
- Misses        840      849       +9     
  Partials       15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@jescalada jescalada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM! Wondering if this fixes things on your end @kriswest? I've been unable to reproduce the errors you see on the OIDC test...

@kriswest
Copy link
Contributor

kriswest commented Dec 8, 2025

This branch has given me the first clean runs of the main tests, thanks @coopernetes.

However, I'm having trouble with the CLI tests and can't get almost any to pass. I'm quite disturbed by this:

stdout | packages/git-proxy-cli/test/testCli.test.ts > test git-proxy-cli > test git-proxy-cli :: login > login should fail when server is down
stdout: false
Connecting ws://g.widyun.com/wss
error undefined undefined
close 1006

I can't find the string 'widyun' in the codebase and see no reason that it should be connecting out to a websocket. The connection message happens to cause a bunch of test failures, e.g.:

 FAIL  packages/git-proxy-cli/test/testCli.test.ts > test git-proxy-cli > test git-proxy-cli :: git push administration > cancel push and test if appears on canceled list
AssertionError: expected 'false\nConnecting ws://g.widyun.com/w…' to contain '[]'

- Expected
+ Received

- []
+ false
+ Connecting ws://g.widyun.com/wss
+ error undefined undefined
+ close 1006
+

@coopernetes @jescalada do you know anything about this and can you replicate? We may have a dependency that has been compromised!

@kriswest
Copy link
Contributor

kriswest commented Dec 8, 2025

I can't find the string widyun in the codebase or node_modules anywhere, so it may be obfuscated...

@kriswest
Copy link
Contributor

kriswest commented Dec 8, 2025

...and after switching and reinstalling many times trying to track down when this starts, it has stopped. Its possible that there was a compromised package version I was picking up but its since been resolved and I'm not picking it up anymore?!? Can others try running the CLI tests and let me know whether you replicate?

@jescalada
Copy link
Contributor

jescalada commented Dec 8, 2025

@kriswest I recall seeing those errors at some point before... During my CLI TS refactor I was having a workspace resolution issue - it was resolving to an old version of the CLI, not sure which.

I've looked through old releases right after SSH was released (v1.3.0, v1.4.0 and a few more) installed deps and searched for widyun and /wss but nothing weird came up...

@coopernetes
Copy link
Contributor Author

I'm going to go ahead and merge this since it solved the underlying concurrent file access.

For that strange websocket connection, let's track that in a separate issue. Could be some side effects of a corrupted node_modules cache, a legit security issue or some other bug in those CLI packages. I haven't had a chance to try to repro that one Kris reported yet.

@coopernetes coopernetes merged commit 7e625cd into finos:main Dec 9, 2025
14 checks passed
@coopernetes coopernetes deleted the hotfix/nedb-test branch December 9, 2025 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failures after merge of VItest refactor

3 participants