Skip to content

Conversation

@pado0
Copy link
Contributor

@pado0 pado0 commented Oct 31, 2025

Description

This PR refactors the RefreshStats class to use the Builder pattern instead of relying on multiple constructors.

By adopting the Builder pattern, it becomes easier to evolve the stats API, add new metrics, and maintain backward compatibility without forcing disruptive constructor changes.

Based on the related issue:

  1. Added a Builder and deprecated the existing constructors.
  2. Replaced usages of constructors in code and tests with the new Builder.

There are multiple stats-related classes that need similar refactoring, and we are addressing them in priority order. This PR covers RefreshStats as part of that effort.

Related Issues

Related to #19225

Check List

  • Functionality includes testing.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

❌ Gradle check result for 1e1b027: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@pado0 pado0 closed this Oct 31, 2025
@pado0 pado0 reopened this Oct 31, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for 1e1b027: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 1e1b027: null

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Member

@sandeshkr419 sandeshkr419 left a comment

Choose a reason for hiding this comment

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

Minor correction on deprecation version, rest LGTM.

Thanks for refactoring this @pado0!

@pado0 pado0 requested a review from peternied as a code owner November 1, 2025 16:50
@pado0 pado0 force-pushed the builder-refresh-stats branch from c48eedb to 6bf8163 Compare November 1, 2025 16:51
@pado0 pado0 force-pushed the builder-refresh-stats branch from 6bf8163 to c128664 Compare November 1, 2025 16:53
@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2025

❕ Gradle check result for c128664: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.02%. Comparing base (d822f62) to head (64461dc).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19835      +/-   ##
============================================
- Coverage     73.09%   73.02%   -0.08%     
+ Complexity    71060    71010      -50     
============================================
  Files          5754     5754              
  Lines        325230   325295      +65     
  Branches      47035    47036       +1     
============================================
- Hits         237735   237547     -188     
- Misses        68359    68630     +271     
+ Partials      19136    19118      -18     

☔ 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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

✅ Gradle check result for 64461dc: SUCCESS

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.

3 participants