refactor: remove config package from polaris and config_center#3210
refactor: remove config package from polaris and config_center#3210zbchi wants to merge 10 commits intoapache:developfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3210 +/- ##
===========================================
- Coverage 47.99% 47.91% -0.09%
===========================================
Files 463 463
Lines 33727 33744 +17
===========================================
- Hits 16187 16168 -19
- Misses 16237 16271 +34
- Partials 1303 1305 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nanjiek
left a comment
There was a problem hiding this comment.
common/constant/key里面有常量了,测试直接复用就好了。
There was a problem hiding this comment.
Pull request overview
This PR refactors Polaris limiter and config center Apollo tests to avoid depending on the config package, instead deriving configuration from URL params/attributes and global types.
Changes:
- Replace
configlookups in the Polaris TPS limiter with URL attribute/parameter based detection. - Update Apollo config center tests to unmarshal into
global.ApplicationConfigand construct config-center URL params directly. - Minor cleanup in Zookeeper config center initialization struct literal.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| filter/polaris/limit/limiter.go | Switches Polaris limiter “applicationMode” detection from global config to URL attributes/params. |
| config_center/zookeeper/impl.go | Minor struct literal cleanup in Zookeeper dynamic configuration constructor. |
| config_center/apollo/impl_test.go | Removes config.RootConfig usage in tests; uses global.ApplicationConfig and URL params. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|



Description
Remove dependency on
configpackage from polaris limiter and config_center modules, use URL parameters/attributes andglobalpackage types instead.Checklist
develop