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

fix: Fix unit tests in CI on pg_bm25 and pg_search #588

Merged
merged 10 commits into from
Nov 30, 2023
Merged

Conversation

philippemnoel
Copy link
Collaborator

@philippemnoel philippemnoel commented Nov 30, 2023

Ticket(s) Closed

  • Closes #N/A

What

There are two issues with our tests:

  • For pg_bm25, the Rust cache pulls broken extensions and they try to update, causing a recursive loop. This should fix it.
  • For pg_search, some of the new functions and unit tests did not use pg_test, but used regular test. This fixes it.

Why

Broken tests

How

^

Tests

See CI

Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
paradedb ⬜️ Ignored (Inspect) Visit Preview Nov 30, 2023 9:18pm

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #588 (fc53762) into dev (ecd0463) will decrease coverage by 0.30%.
Report is 2 commits behind head on dev.
The diff coverage is 88.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #588      +/-   ##
==========================================
- Coverage   81.74%   81.44%   -0.30%     
==========================================
  Files          28       30       +2     
  Lines        3664     3703      +39     
==========================================
+ Hits         2995     3016      +21     
- Misses        669      687      +18     
Files Coverage Δ
pg_bm25/src/api/aggregation.rs 100.00% <ø> (ø)
pg_bm25/src/api/index.rs 80.21% <ø> (ø)
pg_bm25/src/api/search.rs 59.00% <ø> (ø)
pg_bm25/src/index_access/delete.rs 87.95% <ø> (ø)
pg_bm25/src/index_access/scan.rs 73.10% <ø> (ø)
pg_bm25/src/index_access/validate.rs 100.00% <ø> (ø)
pg_bm25/src/json/builder.rs 31.81% <ø> (ø)
pg_bm25/src/json/json_string.rs 37.97% <ø> (ø)
pg_bm25/src/manager/mod.rs 98.93% <ø> (ø)
pg_bm25/src/operator/mod.rs 73.20% <ø> (ø)
... and 7 more

... and 2 files with indirect coverage changes

@philippemnoel philippemnoel marked this pull request as ready for review November 30, 2023 19:29
@philippemnoel philippemnoel changed the title fix: try this fix: Fix unit tests in CI on pg_bm25 and pg_search Nov 30, 2023
@neilyio
Copy link
Contributor

neilyio commented Nov 30, 2023

Looks good!

It sounds like we'll rely exclusively on cargo pgrx test across the board, as opposed to running plain cargo test at any point.

Are we running cargo pgrx test on shared as well as the extensions?

@philippemnoel
Copy link
Collaborator Author

Looks good!

It sounds like we'll rely exclusively on cargo pgrx test across the board, as opposed to running plain cargo test at any point.

Are we running cargo pgrx test on shared as well as the extensions?

We're just running it on the extensions currently, but I believe that includes the test in shared?

@philippemnoel
Copy link
Collaborator Author

Looks good!
It sounds like we'll rely exclusively on cargo pgrx test across the board, as opposed to running plain cargo test at any point.
Are we running cargo pgrx test on shared as well as the extensions?

We're just running it on the extensions currently, but I believe that includes the test in shared?

I do not think we should use cargo test. Pgrx works well if we commit fully to it. If we do a bit of both, we start to face cryptic and hard-to-debug issues

@philippemnoel philippemnoel merged commit 83fd8f1 into dev Nov 30, 2023
19 checks passed
@philippemnoel philippemnoel deleted the phil/fixtest2 branch November 30, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants