-
Notifications
You must be signed in to change notification settings - Fork 976
chore: update tag and polaris from config to global #3029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #3029 +/- ##
===========================================
- Coverage 46.76% 40.31% -6.46%
===========================================
Files 295 457 +162
Lines 17172 32458 +15286
===========================================
+ Hits 8031 13086 +5055
- Misses 8287 18107 +9820
- Partials 854 1265 +411 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request refactors router configuration by moving router configuration types from the config package to a new router package, and improves the integration of application and registry context within router logic.
- Router configuration types (
RouterConfig,Tag, etc.) moved fromconfigpackage torouterpackage - Polaris router now receives and stores application and registry context from URL attributes
- Registry directory now sets application and registry attributes on URLs when missing
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| registry/directory/directory.go | Adds logic to set application and registry attributes on URLs when missing |
| cluster/router/tag/router_test.go | Updates imports and type references from config.RouterConfig to router.RouterConfig |
| cluster/router/tag/router.go | Updates imports and type references to use new router package |
| cluster/router/tag/match.go | Updates function signatures to use router.RouterConfig instead of config.RouterConfig |
| cluster/router/polaris/router.go | Refactors to accept URL parameter and store application/registry context |
| cluster/router/polaris/factory.go | Updates factory method to pass URL parameter to router constructor |
| cluster/router/config.go | Defines router configuration types moved from config package |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
| } | ||
| // set registry if not exist | ||
| if _, ok := url.GetAttribute(constant.RegistryKey); !ok { | ||
| configRegistries := config.GetRootConfig().Registries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| configRegistries := config.GetRootConfig().Registries | |
| // TODO: Temporary compatibility with old APIs, can be removed later | |
| configRegistries := config.GetRootConfig().Registries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|



This pull request refactors router configuration handling and improves the integration of application and registry context within router logic. The main changes include moving the router configuration types from the
configpackage to a newrouterpackage, updating references throughout the codebase, and ensuring that application and registry information is consistently set and used in routing operations. These changes enhance modularity, maintainability, and correctness in routing behavior, particularly for tag-based and Polaris routers.