-
Notifications
You must be signed in to change notification settings - Fork 979
Feature/metadata service tri export clean #2983
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?
Feature/metadata service tri export clean #2983
Conversation
1fda49d to
d120d00
Compare
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
metadata/metadata_service.go
Outdated
| // exportV2Services exports V2 metadata service on same port with different interface | ||
| // This ensures clients can discover V2 service using standard discovery mechanisms | ||
| func (e *serviceExporter) exportV2Services(port string) error { | ||
| return e.exportV2(port) |
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.
这种一行代码的函数就没必要了吧?
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.
是的
| // do not set, because it will override MetadataService | ||
| //exporter.metadataService.SetMetadataServiceURL(ivkURL) | ||
|
|
||
| // Both V1 and V2 are now discoverable on same port with different interface names |
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.
e.opts.protocol == 'tri or 'dubbo' not both
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.
ok
| if metadataInfo == nil { | ||
| return nil, nil | ||
| } |
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.
Silent failure is not good.
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.
sounds good
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.
i will return a clear failure
0192a8b to
9e2f73b
Compare
…lity - Add MetadataServiceV2 implementation with triple protocol support - Fix import formatting issues in metadata test files - Update import block ordering for imports-formatter compatibility - Add .cursorrules to .gitignore for local development rules - Improve metadata service error handling and compatibility
92d2e1f to
c9d7e7d
Compare
- Update import indentation to match imports-formatter tool - Ensure CI formatting checks pass without modifications
- Remove unused serviceInvoker type and Invoke method - Remove unused convertV1 function - Remove unused emptyStrSlice variable in zookeeper report - Remove unused result package import Fixes golangci-lint errors for unused code
- Clean up empty lines in import sections - Ensure consistent import block formatting - Maintain imports-formatter compliance
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2983 +/- ##
===========================================
+ Coverage 39.36% 39.52% +0.16%
===========================================
Files 457 457
Lines 38863 38891 +28
===========================================
+ Hits 15299 15373 +74
+ Misses 22304 22254 -50
- Partials 1260 1264 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Remove unnecessary single-line functions (shouldExportV2, exportV2Services) - Remove unused service discovery registration for metadata service - Fix silent failure issues by returning proper error messages - Update test cases to handle new error return behavior - Remove duplicate import declaration Addresses reviewer feedback: - AlexStocks: Simplified single-line functions - FoghostCn: Removed unnecessary service discovery, fixed silent failures
- Reorganize imports into standard three-block format: * Block 1: Standard library imports * Block 2: Third-party library imports * Block 3: Internal project imports - Ensure consistent import ordering and formatting - Maintain compliance with project's import style guide
| requestData = make(map[string]any) | ||
| } | ||
|
|
||
| log.Printf("请求数据: %+v", requestData) |
Check notice
Code scanning / SonarCloud
Logging should not be vulnerable to injection attacks Low
| return | ||
| } | ||
|
|
||
| log.Printf("转换参数: types=%v, args=%+v", methodSchema.ParameterTypes, tripleArgs) |
Check notice
Code scanning / SonarCloud
Logging should not be vulnerable to injection attacks Low
|
|
||
| // 写入错误响应 | ||
| func (gw *TripleGateway) writeErrorResponse(w http.ResponseWriter, statusCode int, message string) { | ||
| log.Printf("错误响应: %d - %s", statusCode, message) |
Check notice
Code scanning / SonarCloud
Logging should not be vulnerable to injection attacks Low
8c41fdb to
5aba962
Compare
|
|
pls fix ci fail |



feat: format imports and finalize MetadataServiceV2 implementation