feat: Decouple framework plugins from pkg/epp/metrics via MetricsRecorder interface#2797
feat: Decouple framework plugins from pkg/epp/metrics via MetricsRecorder interface#2797gyliu513 wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: gyliu513 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @gyliu513. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Summary
MetricsRecorderinterface inpkg/epp/framework/interface/pluginto abstract metrics recording, following the dependency inversion principleRecorderimplementation inpkg/epp/metricsthat delegates to existing package-level functionsMetricsRecorderthrough theHandleinterface so framework plugins no longer directly importpkg/epp/metricspkg/epp/metricsentries from the framework import exception list inhack/verify-framework-imports.goMotivation
Framework plugins under
pkg/epp/framework/should not import upper-layer packages likepkg/epp/metrics. Previously, 7 plugin files had directpkg/epp/metricsimports tracked as exceptions inverify-framework-imports.go.This PR eliminates those violations by introducing a
MetricsRecorderinterface at the framework layer and injecting the concrete implementation viaHandle.Which issue(s) this PR fixes:
Fixes #2785
Does this PR introduce a user-facing change?: