Refactor HttpStats, ScriptStats, AdaptiveSelectionStats and OsStats with Builder pattern#20014
Conversation
9ac29eb to
288f05b
Compare
|
❌ Gradle check result for 288f05b: 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? |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #20014 +/- ##
==========================================
Coverage 73.15% 73.16%
- Complexity 71455 71524 +69
==========================================
Files 5789 5789
Lines 327128 327259 +131
Branches 47122 47126 +4
==========================================
+ Hits 239326 239451 +125
- Misses 68594 68625 +31
+ Partials 19208 19183 -25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sandeshkr419
left a comment
There was a problem hiding this comment.
Minor comments, rest LGTM!
Thanks for working on this! :D
sandeshkr419
left a comment
There was a problem hiding this comment.
one small nit-pick, rest LGTM!
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
Signed-off-by: Jean Kim <bgshhd95@gmail.com>
748d555 to
566e103
Compare
|
❌ Gradle check result for 566e103: 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? |
|
❌ Gradle check result for 566e103: 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? |
Signed-off-by: Sandesh Kumar <sandeshkr419@gmail.com>
|
❌ Gradle check result for 736ac80: 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? |
|
❌ Gradle check result for 736ac80: 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? |
|
❌ Gradle check result for 736ac80: 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? |
|
❕ Gradle check result for 736ac80: 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. |
…ith Builder pattern (opensearch-project#20014) Co-authored-by: Sandesh Kumar <sandeshkr419@gmail.com>
…ith Builder pattern (opensearch-project#20014) Co-authored-by: Sandesh Kumar <sandeshkr419@gmail.com>
Description
This PR refactors the
HttpStats,ScriptStats,AdaptiveSelectionStatsandOsStatsclass 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:
There are multiple stats-related classes that need similar refactoring, and we are addressing them in priority order. This PR covers
HttpStats,ScriptStats,AdaptiveSelectionStatsandOsStatsas part of that effort.Related Issues
Related to #19225
Check List
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.