Skip to content

[MINOR] Reduce logging in MLContextTests#2432

Open
Baunsgaard wants to merge 2 commits intoapache:mainfrom
Baunsgaard:reduceLogging
Open

[MINOR] Reduce logging in MLContextTests#2432
Baunsgaard wants to merge 2 commits intoapache:mainfrom
Baunsgaard:reduceLogging

Conversation

@Baunsgaard
Copy link
Contributor

There are some PRs that fail on MLContextTests, and i saw they produce over 80k logging.
Therefore, to test my new setup, here is a PR that reduce this.

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.39%. Comparing base (3f7b17b) to head (1fa95a1).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2432      +/-   ##
============================================
- Coverage     71.55%   71.39%   -0.16%     
+ Complexity    47461    47368      -93     
============================================
  Files          1539     1539              
  Lines        182631   182631              
  Branches      35919    35919              
============================================
- Hits         130677   130397     -280     
- Misses        41944    42184     +240     
- Partials      10010    10050      +40     

☔ 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

@e-strauss e-strauss left a comment

Choose a reason for hiding this comment

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

lgtm, now you can read again the logs in the github actions without downloading them :)

addTestConfiguration(dir, name);
getAndLoadTestConfiguration(name);

//run all mlcontext tests in loglevel trace to improve test coverage
Copy link
Contributor

Choose a reason for hiding this comment

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

how would enabling the tracing, would help with code coverage anyways? is there conditional code on log level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a bit annoying but people do this if we are not carefull.

In essence, many places use :

if(LOG.isDebug()) {
 // some code
}

This means code coverage will be low, unless we explicity enable the logging.

We can circumvent it by having explicit logging tests, instead of just fully enabling logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants