Skip to content

refactor: simplify custom registry usage in metrics tracker#16772

Merged
parametalol merged 1 commit intomasterfrom
michael/refactor-custom-registry
Sep 12, 2025
Merged

refactor: simplify custom registry usage in metrics tracker#16772
parametalol merged 1 commit intomasterfrom
michael/refactor-custom-registry

Conversation

@parametalol
Copy link
Copy Markdown
Contributor

@parametalol parametalol commented Sep 11, 2025

Description

Let's remove the registry factory from the constructor signature, as the tests can access the internal tracker field to override the factory for testing purposes.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

CI

@parametalol parametalol requested a review from a team September 11, 2025 13:48
@rhacs-bot
Copy link
Copy Markdown
Contributor

Images are ready for the commit at 35e895a.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.9.x-745-g35e895a504.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.80%. Comparing base (8868116) to head (35e895a).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
central/metrics/custom/singleton.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #16772   +/-   ##
=======================================
  Coverage   48.80%   48.80%           
=======================================
  Files        2679     2680    +1     
  Lines      200331   200342   +11     
=======================================
+ Hits        97766    97780   +14     
+ Misses      94954    94953    -1     
+ Partials     7611     7609    -2     
Flag Coverage Δ
go-unit-tests 48.80% <83.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Sep 11, 2025

@parametalol: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocp-4-19-nongroovy-e2e-tests 35e895a link false /test ocp-4-19-nongroovy-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@parametalol parametalol merged commit 010acbc into master Sep 12, 2025
89 of 90 checks passed
@parametalol parametalol deleted the michael/refactor-custom-registry branch September 12, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants