You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/06/07 12:10:18 UTC

[GitHub] [dubbo-go] ray2011 opened a new pull request, #1926: Fix: fix revision calc

ray2011 opened a new pull request, #1926:
URL: https://github.com/apache/dubbo-go/pull/1926

   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md before commit pull request.
   -->
   
   **What this PR does**: 
   fix different revision calc in `service_revision_customizer.go:resolveRevision` and `metadata_info.go:(*MetadataInfo).CalcAndGetRevision`, which make client get empty server metadata.
   
   **Which issue(s) this PR fixes**: 
   Fixes #1925
   
   **You should pay attention to items below to ensure your pr passes our ci test**
   We do not merge pr with ci tests failed
   
   - [x] All ut passed (run 'go test ./...' in project root)
   - [x] After go-fmt ed , run 'go fmt project' using goland.
   - [x] Golangci-lint passed, run 'sudo golangci-lint run' in project root.
   - [x] After import formatted, (using [imports-formatter](https://github.com/dubbogo/tools#5-how-to-get-imports-formatter) to run 'imports-formatter .' in project root, to format your import blocks, mentioned in [CONTRIBUTING.md](https://github.com/apache/dubbo-go/blob/master/CONTRIBUTING.md) above) 
   - [x] Your new-created file needs to have [apache license](https://raw.githubusercontent.com/dubbogo/resources/master/tools/license/license.txt) at the top, like other existed file does.
   - [x] All integration test passed. You can run integration test locally (with docker env). Clone our [dubbo-go-samples](https://github.com/apache/dubbo-go-samples) project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] sanxun0325 commented on a diff in pull request #1926: Fix: fix revision calc

Posted by GitBox <gi...@apache.org>.
sanxun0325 commented on code in PR #1926:
URL: https://github.com/apache/dubbo-go/pull/1926#discussion_r892401012


##########
common/metadata_info.go:
##########
@@ -87,10 +87,10 @@ func (mi *MetadataInfo) CalAndGetRevision() string {
 	if len(mi.Services) == 0 {
 		return "0"
 	}
-	candidates := make([]string, 8)
+	candidates := make([]string, 0, 8)
 
 	for _, s := range mi.Services {
-		sk := s.ServiceKey
+		sk := s.URL.GetParam(constant.InterfaceKey, "")

Review Comment:
   获取interfaceKey,变量名sk改一下吧



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] ray2011 commented on a diff in pull request #1926: Fix: fix revision calc

Posted by GitBox <gi...@apache.org>.
ray2011 commented on code in PR #1926:
URL: https://github.com/apache/dubbo-go/pull/1926#discussion_r893087621


##########
common/metadata_info.go:
##########
@@ -87,10 +87,10 @@ func (mi *MetadataInfo) CalAndGetRevision() string {
 	if len(mi.Services) == 0 {
 		return "0"
 	}
-	candidates := make([]string, 8)
+	candidates := make([]string, 0, 8)
 
 	for _, s := range mi.Services {
-		sk := s.ServiceKey
+		sk := s.URL.GetParam(constant.InterfaceKey, "")

Review Comment:
   > 获取interfaceKey,变量名sk改一下吧
   
   已修改



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #1926: Fix: fix revision calc

Posted by GitBox <gi...@apache.org>.
AlexStocks merged PR #1926:
URL: https://github.com/apache/dubbo-go/pull/1926


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #1926: Fix: fix revision calc

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1926:
URL: https://github.com/apache/dubbo-go/pull/1926#issuecomment-1148596903

   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1926?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1926](https://codecov.io/gh/apache/dubbo-go/pull/1926?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e281456) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/07defad2eeb6befc24a3c75d8b8afb28dd4b1ed2?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07defad) will **increase** coverage by `0.07%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1926      +/-   ##
   ==========================================
   + Coverage   45.02%   45.10%   +0.07%     
   ==========================================
     Files         287      287              
     Lines       17135    17135              
   ==========================================
   + Hits         7715     7728      +13     
   + Misses       8606     8592      -14     
   - Partials      814      815       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1926?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [common/metadata\_info.go](https://codecov.io/gh/apache/dubbo-go/pull/1926/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL21ldGFkYXRhX2luZm8uZ28=) | `0.00% <0.00%> (ø)` | |
   | [...tocol/rest/server/server\_impl/go\_restful\_server.go](https://codecov.io/gh/apache/dubbo-go/pull/1926/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJvdG9jb2wvcmVzdC9zZXJ2ZXIvc2VydmVyX2ltcGwvZ29fcmVzdGZ1bF9zZXJ2ZXIuZ28=) | `41.37% <0.00%> (-3.45%)` | :arrow_down: |
   | [metrics/prometheus/reporter.go](https://codecov.io/gh/apache/dubbo-go/pull/1926/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWV0cmljcy9wcm9tZXRoZXVzL3JlcG9ydGVyLmdv) | `35.02% <0.00%> (+1.69%)` | :arrow_up: |
   | [metadata/report/delegate/delegate\_report.go](https://codecov.io/gh/apache/dubbo-go/pull/1926/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bWV0YWRhdGEvcmVwb3J0L2RlbGVnYXRlL2RlbGVnYXRlX3JlcG9ydC5nbw==) | `42.38% <0.00%> (+7.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1926?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1926?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07defad...e281456](https://codecov.io/gh/apache/dubbo-go/pull/1926?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org