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

test: Fix file cache verbose logging leakage during pytest #16984

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Jun 16, 2024

I played around a bit, I think what happens is pytest joins on the N workers it spawns together at the end, and some workers finish running tests earlier. This and combined with that pytest I think only silences test output during execution of a test, so the workers that have finished (and are getting joined on) no longer have silenced stdout/stderr, the printing from the background task then gets displayed after the background task runs, as POLARS_VERBOSE was set to true during the test execution

I can seemingly confirm because the more I increase the worker count, the more messages get logged.

This is fixed by not caching the config::verbose value, as it gets unset after the test finishes.

@nameexhaustion nameexhaustion marked this pull request as ready for review June 16, 2024 07:21
@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Jun 16, 2024
Copy link

codecov bot commented Jun 16, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.05%. Comparing base (24dafd9) to head (f4808da).
Report is 1 commits behind head on main.

Files Patch % Lines
crates/polars-io/src/file_cache/eviction.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16984      +/-   ##
==========================================
+ Coverage   81.02%   81.05%   +0.03%     
==========================================
  Files        1445     1445              
  Lines      190318   190317       -1     
  Branches     2709     2709              
==========================================
+ Hits       154203   154263      +60     
+ Misses      35618    35557      -61     
  Partials      497      497              

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

@ritchie46 ritchie46 merged commit 41f58a8 into pola-rs:main Jun 16, 2024
23 checks passed
@c-peters c-peters added the accepted Ready for implementation label Jun 16, 2024
@nameexhaustion nameexhaustion deleted the verbose branch June 22, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants