diff --git a/README.md b/README.md index 1dde951d350e6ee51f3f2aeeac7bb516b1b999be..2975ce9de0236a0274b378ffac0bd1d301907452 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [](https://travis-ci.org/apache/dubbo-go) [](https://codecov.io/gh/apache/dubbo-go) [](https://pkg.go.dev/github.com/apache/dubbo-go?tab=doc) +[](https://goreportcard.com/report/github.com/apache/dubbo-go) + --- Apache Dubbo Go Implementation. diff --git a/README_CN.md b/README_CN.md index ade924e7a9a6206b6e935e084d68679957dd7fcb..62c5b06575343474636906c3aee57c643cc9d5d2 100644 --- a/README_CN.md +++ b/README_CN.md @@ -3,6 +3,8 @@ [](https://travis-ci.org/apache/dubbo-go) [](https://codecov.io/gh/apache/dubbo-go) [](https://pkg.go.dev/github.com/apache/dubbo-go?tab=doc) +[](https://goreportcard.com/report/github.com/apache/dubbo-go) + --- Apache Dubbo Go 璇█瀹炵幇 diff --git a/common/proxy/proxy.go b/common/proxy/proxy.go index 6765a810a5ed48d95f49b5b97fbf660dd8587715..68ba3ff7882837a9419c5e47228461af11fd79ba 100644 --- a/common/proxy/proxy.go +++ b/common/proxy/proxy.go @@ -140,6 +140,14 @@ func (p *Proxy) Implement(v common.RPCService) { inv.SetAttachments(k, value) } + // add user setAttachment + atm := invCtx.Value("attachment") + if m, ok := atm.(map[string]string); ok { + for k, value := range m { + inv.SetAttachments(k, value) + } + } + result := p.invoke.Invoke(invCtx, inv) err = result.Error() diff --git a/config/generic_service.go b/config/generic_service.go index 9895486e977a9848e576597f31b724d51d144d4e..b66e399f9e5f467e51c8eccf465f926ac44299d5 100644 --- a/config/generic_service.go +++ b/config/generic_service.go @@ -17,9 +17,11 @@ package config +import "context" + // GenericService ... type GenericService struct { - Invoke func(req []interface{}) (interface{}, error) `dubbo:"$invoke"` + Invoke func(ctx context.Context, req []interface{}) (interface{}, error) `dubbo:"$invoke"` referenceStr string } diff --git a/config_center/parser/configuration_parser.go b/config_center/parser/configuration_parser.go index f342dc62e765f8d38c9e64ba3be03f3362f0bf61..f33b4ba866da69e1d23b493f42152bbb0f437878 100644 --- a/config_center/parser/configuration_parser.go +++ b/config_center/parser/configuration_parser.go @@ -233,18 +233,10 @@ func getParamString(item ConfigItem) (string, error) { "you want to change in the rule.") } for k, v := range params { - retStr = retStr + "&" - retStr = retStr + k - retStr = retStr + "=" - retStr = retStr + v + retStr += "&" + k + "=" + v } - if len(item.ProviderAddresses) >= 0 { - retStr = retStr + "&" - retStr = retStr + constant.OVERRIDE_PROVIDERS_KEY - retStr = retStr + "=" - retStr = retStr + strings.Join(item.ProviderAddresses, ",") - } + retStr += "&" + constant.OVERRIDE_PROVIDERS_KEY + "=" + strings.Join(item.ProviderAddresses, ",") return retStr, nil } diff --git a/doc/apache/apache-release-procedure-20200306.md b/doc/apache/apache-release-procedure-20200306.md new file mode 100644 index 0000000000000000000000000000000000000000..3f677ff56b8a97f881ae3d1b9bf842754ddb05ab --- /dev/null +++ b/doc/apache/apache-release-procedure-20200306.md @@ -0,0 +1,448 @@ + +# Apache 杞欢鍙戠増娴佺▼ + +> author: wongoo@apache.org +> last updated: 2020-03-06 + +Apache寮€婧愯蒋浠舵槸鏈夌ぞ鍖洪┍鍔ㄧ殑锛屼负浜嗘彁楂樺彂甯冭蒋浠惰川閲忚€屾寚瀹氫簡杞欢鍙戝竷娴佺▼锛屾湰鏂囦富瑕佷粙缁嶆娴佺▼锛屼互缁欑涓€娆″彂甯冩墦鍖呯殑apacher鍙傝€冦€� + +濡傛灉浣犺鍑嗗鎵撳寘涓€涓猘pache杞欢浜嗭紝鎯冲繀浣犲凡缁忔槸涓€涓」鐩殑committer浜嗭紝鑰屼笖鐭ラ亾绀惧尯銆丳MC杩欎簺姒傚康锛岃€屼綘鐜板湪杩樻媴浠绘湰娆″彂甯冪殑 release manager 涓€鑱屻€� + +鍙戠増娴佺▼鍏跺疄涔熷緢绠€鍗曪紝鏃犻潪濡備笅锛� +1. 鏁寸悊鍙樻洿鍐呭锛屾墦鍖呭苟瀵规墦鍖呮枃浠剁鍚嶏紱 +2. 灏嗙鍚嶆枃浠朵笂浼燼pache svn浠撳簱锛� +3. 鍙戦偖浠惰绀惧尯PMC澶т浆鎶曠エ锛� +4. 鎶曠エ閫氳繃鍚庡彂涓€涓姇绁ㄧ粨鏋滈€氬憡閭欢锛� +5. 鍙戠増 +6. 鍙戠増閭欢閫氬憡绀惧尯鏂扮増鏈彂甯冿紱 + +涓嬮潰璇︾粏鏁寸悊鍙戠増鐨勪竴浜涙祦绋嬫楠わ紝浣跨敤 dubbo 鐨勫瓙椤圭洰 dubbog-go-hessian2 鍙戠増涓轰緥锛� + + +## 1. 鍙戠増鍑嗗 + +鍙戠増鏂囦欢闇€瑕佺鍚嶏紝闇€瑕佸畨瑁卲gp宸ュ叿. + +```bash +$ brew install gpg +$ gpg --version +$ gpg --full-gen-key + (1) RSA and RSA (default) <-- RSA 绫诲瀷 + What keysize do you want? (2048) 4096 <-- key澶у皬涓�4096 + 0 = key does not expire <-- 姘镐笉杩囨湡 + Real name: Liu Yang + Email address: wongoo@apache.org + Comment: CODE SIGNING KEY + + gpg: /Users/gelnyang/.gnupg/trustdb.gpg: trustdb created + gpg: key 7DB68550D366E4C0 marked as ultimately trusted + gpg: revocation certificate stored as '/Users/gelnyang/.gnupg/openpgp-revocs.d/1376A2FF67E4C477573909BD7DB68550D366E4C0.rev' + public and secret key created and signed. + + pub rsa4096 2019-10-17 [SC] + 1376A2FF67E4C477573909BD7DB68550D366E4C0 + uid Liu Yang (CODE SIGNING KEY) <wongoo@apache.org> + sub rsa4096 2019-10-17 [E] + +$ gpg --list-keys + gpg: checking the trustdb + gpg: marginals needed: 3 completes needed: 1 trust model: pgp + gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u + /Users/gelnyang/.gnupg/pubring.kbx + ---------------------------------- + pub rsa4096 2019-10-17 [SC] + 1376A2FF67E4C477573909BD7DB68550D366E4C0 + uid [ultimate] Liu Yang (CODE SIGNING KEY) <wongoo@apache.org> + sub rsa4096 2019-10-17 [E] + + +# 鍏挜鏈嶅姟鍣ㄦ槸缃戠粶涓婁笓闂ㄥ偍瀛樼敤鎴峰叕閽ョ殑鏈嶅姟鍣� +# 閫氳繃key id鍙戦€乸ublic key鍒発eyserver +$ gpg --keyserver pgpkeys.mit.edu --send-key 1376A2FF67E4C477573909BD7DB68550D366E4C0 + gpg: sending key 7DB68550D366E4C0 to hkp://pgpkeys.mit.edu +# 鍏朵腑锛宲gpkeys.mit.edu涓洪殢鎰忔寫閫夌殑keyserver锛宬eyserver鍒楄〃涓猴細https://sks-keyservers.net/status/锛屼负鐩镐簰涔嬮棿鏄嚜鍔ㄥ悓姝ョ殑锛岄€変换鎰忎竴涓兘鍙互銆� + +# 濡傛灉鏈夊涓猵ublic key锛岃缃粯璁ey銆備慨鏀� ~/.gnupg/gpg.conf +$ vi ~/.gnupg/gpg.conf +default-key 7DB68550D366E4C0 + +# 濡傛灉鏈夊涓猵ublic key, 涔熷彲浠ュ垹闄ゆ棤鐢ㄧ殑key锛� +### 鍏堝垹闄ょ閽ワ紝鍐嶅垹闄ゅ叕閽� +$ gpg --yes --delete-secret-keys shenglicao2@gmail.com ###鑰佺殑绉侀挜锛屾寚鏄庨偖绠卞嵆鍙� +$ gpg --delete-keys 1808C6444C781C0AEA0AAD4C4D6A8007D20DB8A4 + +## 鐢变簬鍏挜鏈嶅姟鍣ㄦ病鏈夋鏌ユ満鍒讹紝浠讳綍浜洪兘鍙互鐢ㄤ綘鐨勫悕涔変笂浼犲叕閽ワ紝鎵€浠ユ病鏈夊姙娉曚繚璇佹湇鍔″櫒涓婄殑鍏挜鐨勫彲闈犳€с€� +## 閫氬父锛屼綘鍙互鍦ㄧ綉绔欎笂鍏竷涓€涓叕閽ユ寚绾癸紝璁╁叾浠栦汉鏍稿涓嬭浇鍒扮殑鍏挜鏄惁涓虹湡銆� +# fingerprint鍙傛暟鐢熸垚鍏挜鎸囩汗锛� +$ gpg --fingerprint wongoo + + pub rsa4096 2019-10-17 [SC] + 1376 A2FF 67E4 C477 5739 09BD 7DB6 8550 D366 E4C0 + uid [ultimate] Liu Yang (CODE SIGNING KEY) <wongoo@apache.org> + sub rsa4096 2019-10-17 [E] + # 灏嗕笂闈㈢殑 fingerprint 锛堝嵆 1376 A2FF 67E4 C477 5739 09BD 7DB6 8550 D366 E4C0锛夌矘璐村埌鑷繁鐨勭敤鎴蜂俊鎭腑锛� + # https://id.apache.org OpenPGP Public Key Primary Fingerprint: +``` + +> 璇︾粏鍙傝€冿細 +> - 鍙戝竷绛惧悕: http://www.apache.org/dev/release-signing.html +> - 鍙戝竷绛栫暐: http://www.apache.org/dev/release-distribution +> - 灏嗗瘑閽ヤ笂浼犲埌鍏叡瀵嗛挜鏈嶅姟鍣�: https://www.apache.org/dev/openpgp.html#generate-key + +## 2. 鎵撳寘绛惧悕 + +鍑嗗鎵撳寘鍓嶏紙灏ゅ叾鎻愮涓€娆℃墦鍖咃級闇€瑕佹敞鎰忎互涓嬪唴瀹�: +- 姣忎釜鏂囦欢鐨凩ICENSE澶撮儴鏄惁姝g‘, 鍖呮嫭 `*.java`, `*.go`, `*.xml`, `Makefile` 绛� +- LICENSE 鏂囦欢鏄惁瀛樺湪 +- NOTICE 鏂囦欢鏄惁瀛樺湪 +- CHANGE.md 鏄惁瀛樺湪 锛堝彉鏇村唴瀹规牸寮忕鍚堣鑼冿級 + +浠ヤ笂鍙互鍙傝€冨叾浠栧凡鍙戝竷椤圭洰鐨勯厤缃€� + + +``` + +# NOTICE: 杩欓噷鍒囧垎鏀紝鍒嗘敮鍚嶇О涓嶈鍜岀増鏈彿锛坱ag鐢級绫讳技锛屼笉鐒朵細鏈夊啿绐� +$ git checkout -b 1.4 + +$ git tag -a v1.4.0-rc1 -m "v1.4.0 release candidate 1" + +$ git push --tags + +# 鎵撳寘 +$ git archive --format=tar 1.4 --prefix=dubbo-go-hessian2-v1.4.0/ | gzip > dubbo-go-hessian2-v1.4.0-src.tar.gz + +# 绛惧悕 +$ gpg -u wongoo@apache.org --armor --output dubbo-go-hessian2-v1.4.0-src.tar.gz.asc --detach-sign dubbo-go-hessian2-v1.4.0-src.tar.gz + +# 楠岃瘉绛惧悕 +$ gpg --verify dubbo-go-hessian2-v1.4.0-src.tar.gz.asc dubbo-go-hessian2-v1.4.0-src.tar.gz + +# hash +$ shasum -a 512 dubbo-go-hessian2-v1.4.0-src.tar.gz > dubbo-go-hessian2-v1.4.0-src.tar.gz.sha512 + +# 楠岃瘉 hash +$ shasum --check dubbo-go-hessian2-v1.4.0-src.tar.gz.sha512 + +``` + +> 鍙戝竷鐗堟湰: http://www.apache.org/dev/release-publishing.html + +## 3. 涓婁紶鎵撳寘鏂囦欢鍒皊vn浠撳簱 + +``` +$ svn checkout https://dist.apache.org/repos/dist/dev/dubbo + +$ cd dubbo + +# 鏇存柊 +$ svn update + +# 娣诲姞 绛惧悕 鍜� public key 鍒癒EYS鏂囦欢骞舵彁浜ゅ埌SVN浠撳簱 +# 杩欓噷鏄皢鍏挜KEYS鏀惧埌鏍圭洰褰�, 鏈夌殑椤圭洰鏀惧埌鏈鎵撳寘鏂囦欢鐩綍 +$ (gpg --list-sigs wongoo && gpg --armor --export wongoo) >> KEYS + +$ mkdir -p dubbo-go-hessian2/v1.4.0-rc1 + +# 鎷疯礉鐩稿叧鏂囦欢鍒版柊寤虹洰褰曚笅 + +$ tree dubbo-go-hessian2 +dubbo-go-hessian2 +鈹斺攢鈹€ v1.4.0-rc1 + 鈹溾攢鈹€ dubbo-go-hessian2-v1.4.0-src.tar.gz + 鈹溾攢鈹€ dubbo-go-hessian2-v1.4.0-src.tar.gz.asc + 鈹斺攢鈹€ dubbo-go-hessian2-v1.4.0-src.tar.gz.sha512 + +$ svn add dubbo-go-hessian2 +$ svn add dubbo-go-hessian2/* +$ svn status +$ svn commit --username wongoo -m "Release dubbo-go-hessian2 v1.4.0-rc1" +``` + +> 璇︾粏鍙傝€�: svn鐗堟湰绠$悊 https://www.apache.org/dev/version-control.html + + +## 4. 鍙戞姇绁� [VOTE] 閭欢 + +鍙戜换浣曢偖浠堕兘鏄湁涓€瀹氭牸寮忕殑锛屼綘鍔犲叆绀惧尯閭欢鍒楄〃鍚庯紝灏变細鏀跺埌寰堝杩欐牱鐨勯偖浠讹紝澶氱湅鐪嬪氨鐭ラ亾浜嗭紝鍏蜂綋閭欢鑼冩湰鍙傝€冩枃绔犲悗闈㈢殑閭欢鑼冩湰銆� + +鍙戝畬銆怴OTE銆戦偖浠讹紝绉佷笅娌熼€氱兢閲岄潰璇峰ぇ浣琍MC鎶曠エ銆� +PMC鎶曠エ浼氬浣犱笂浼犳墦鍖呮枃浠惰繘琛岀浉鍏虫鏌�, +璇︾粏鍙互浜嗚В瀛靛寲涓殑椤圭洰鍙戝竷瀹屾暣鐨勬鏌ラ」鍙傝€冿細 https://cwiki.apache.org/confluence/display/INCUBATOR2/IncubatorReleaseChecklist + +鏀跺埌3涓猙inding閭欢涓旇秴杩�72灏忔椂鍚庯紝灏卞彲浠ュ彂 鎶曠エ缁撴灉 [RESULT] [VOTE] 閭欢浜嗐€� + +> 鍘熷垯涓婂彧鏈塒MC鐨勬姇绁ㄦ墠绠梑inding閭欢, 褰撶劧涔熷彲浠ョ敱绀惧尯鍐冲畾銆� + +杩欎竴姝ラ鏈€甯歌鏈変互涓嬮棶棰橈細 +- 鏂囦欢绛惧悕鏈夐棶棰� +- 寮曠敤椤圭洰LICENSE闂 +- 鍗曞厓娴嬭瘯涓嶉€氳繃 + +> 鍙﹀闇€瑕佹敞鎰�: 涓€涓猘pache椤圭洰鍙兘鍖呭惈寰堝瀛愰」鐩紝椤圭洰鐨凱MC鍙兘鍙涓婚」鐩瘮杈冧簡瑙o紝 浠栦滑骞朵笉娓呮濡備綍灏嗗瓙椤圭洰璺戣捣鏉ワ紝涔熶笉鐭ラ亾濡備綍璺戝崟鍏冩祴璇曪紝鏈€濂藉湪閭欢涓檮甯︿竴涓浣曡繘琛屽崟鍏冩祴璇曠殑杩炴帴銆備緥濡� PMC 鏈€浜嗚В java锛屼絾瀛愰」鐩槸golang锛宲ython锛宩s绛夛紝浣犻渶瑕佸憡璇変粬浠浣曟祴璇曚綘鐨勯」鐩€� + +鍙互鍙傝€冩姇绁ㄨ鍒�: https://www.apache.org/foundation/voting.html + +## 5. 鍙戝竷鐗堟湰 + +褰撴寮忓彂甯冩姇绁ㄦ垚鍔熷悗锛屽厛鍙慬Result]閭欢锛岀劧鍚庡氨鍑嗗 release package銆� +灏嗕箣鍓嶅湪dev涓嬪彂甯冪殑瀵瑰簲rc鏂囦欢澶逛笅鐨勬簮鐮佸寘銆佺鍚嶆枃浠跺拰hash鏂囦欢鎷疯礉鍒板彟涓€涓洰褰� v1.4.0锛� +娉ㄦ剰鏂囦欢鍚嶅瓧涓笉瑕乺cxx (鍙互rename锛屼絾涓嶈閲嶆柊璁$畻绛惧悕锛宧ash鍙互閲嶆柊璁$畻锛岀粨鏋滀笉浼氬彉)銆� + +灏唕elease鍖呯Щ鍔ㄥ埌姝e紡鐗堢洰褰曘€傚鏋滀綘鐨勮蒋浠舵槸闇€瑕佸鎴蜂粠apache涓嬭浇鐨勶紝鍒欒繖涓€姝ユ槸蹇呴』鐨勩€傚鏋滀笉鏄紝姣斿golang寮曠敤github鎵撳寘鍦板潃鐨勫垯鍙互蹇界暐銆� +``` +svn up +cd dubbo-go-hessian2 +svn move v1.4.0-rc1 v1.4.0 +svn status +svn commit --username wongoo -m "Release dubbo-go-hessian2 v1.4.0" +``` + +绉诲埌鍙戠増鐩綍鍚庯紝杩橀渶瑕佽繘琛岀浉搴旂殑姝e紡鐗堟湰鍙戝竷锛� 杩欓噷灏嗗叿浣撳彂甯冩柟寮忔暣鐞嗗埌鍗曠嫭鐨勭珷鑺� `7. 涓嶅悓璇█鐗堟湰鍙戝竷`锛屽洜涓哄彂甯冩祦绋嬮┈涓婂氨瑕佺粨鏉熶簡 ^v^ + + +## 6. 鏂扮増鏈€氬憡 ANNOUNCE 閭欢 + +鎭枩浣犱綘宸茬粡鍒板彂鐗堟渶鍚庝竴姝ヤ簡锛岄偖浠舵牸寮忓弬鑰冧互涓嬮偖浠惰寖鏈紒 + + +## 7. 涓嶅悓璇█鐗堟湰鍙戝竷 + +### 7.1 golang + +鍦� github 鍩轰簬鎶曠エ鍒嗘敮鍙戝竷浜� release 鐗堟湰銆� + +### 7.2 java + +java椤圭洰鍙戠増闇€鍙戝竷鍒癹ava maven浠撳簱銆� + +TODO + +### 7.3 js + +js椤圭洰鍙戠増闇€鍙戝竷鍒皀pm浠撳簱銆� + +TODO + +### 7.4 python + +TODO + +## 8. 閭欢鑼冩湰 + +### 8.1. 鎻愬嚭鍙戠増鎶曠エ + +- TO: dev@dubbo.apache.org +- Title: [VOTE] Release Apache dubbo-go-hessian2 v1.4.0 RC1 + +``` +Hello Dubbo/Dubbogo Community, + + This is a call for vote to release Apache dubbo-go-hessian2 version v1.4.0 RC1. + + The release candidates: https://dist.apache.org/repos/dist/dev/dubbo/dubbo-go-hessian2/v1.4.0-rc1/ + Git tag for the release: https://github.com/apache/dubbo-go-hessian2/tree/1.4 + Hash for the release tag: 4c31e88c35afe84c0321d9f12f036e6d3c8962d0 + Release Notes: https://github.com/apache/dubbo-go-hessian2/blob/1.4/CHANGE.md + The artifacts have been signed with Key :7DB68550D366E4C0, which can be found in the keys file: + https://dist.apache.org/repos/dist/dev/dubbo/KEYS + + The vote will be open for at least 72 hours or until necessary number of votes are reached. + + Please vote accordingly: + [ ] +1 approve + [ ] +0 no opinion + [ ] -1 disapprove with the reason + + Thanks, + The Apache Dubbo-go Team + ``` + + +### 8.2. PMC 鎶曠エ閭欢鍥炲 + + +鑼冧緥1锛� +``` ++1 approve <-- 棣栧厛琛ㄦ槑鍚屼笉鍚屾剰 + +I have checked: <-- 鍏舵瑕佽鏄庤嚜宸辨鏌ヤ簡鍝簺椤� + +1.source code can build <-- 鑳藉惁鏋勫缓 +2.tests can pass in my local <-- 鍗曞厓娴嬭瘯鑳藉惁閫氳繃 +3. NOTICE LICENSE file exist <-- 鍗忚鏂囦欢鏄惁瀛樺湪 +4.git tag is correct <-- git tag 鏄惁姝g‘ + +there is one minor thing that in change logs file, there is no space +between text And link. I suggest add one to make it looks better. <--- 涓€浜涘叾浠栨敼杩涘缓璁� +``` + +鑼冧緥2锛� +``` ++1 + +I checked the following items: + +[v] Are release files in correct location? <-- 鍙戝竷鏂囦欢鐩綍鏄惁姝g‘ +[v] Do release files have the word incubating in their name? +[v] Are the digital signature and hashes correct? <-- 绛惧悕銆乭ash鏄惁姝g‘ +[v] Do LICENSE and NOTICE files exists? +[v] Is the LICENSE and NOTICE text correct? <-- 鍗忚鏂囨湰鏄惁姝g‘ +[v] Is the NOTICE year correct? <-- 娉ㄦ剰骞翠唤鏄惁姝g‘ +[v] Un-included software dependencies are not mentioned in LICENSE or NOTICE? <-- 娌℃湁鍖呭惈鍗忚鎴栨敞鎰忔病鏈夋彁鍒扮殑杞欢渚濊禆 +[v] License information is not mentioned in NOTICE? <-- 鍗忚淇℃伅娌℃湁鍦ㄦ敞鎰忎腑鎻愬強 +[x] Is there any 3rd party code contained inside the release? If so: <-- 鏄惁鍖呭惈绗笁鏂逛唬鐮� + [ ] Does the software have a compatible license? + [ ] Are all software licenses mentioned in LICENSE? + [ ] Is the full text of the licenses (or pointers to it) in LICENSE? + Is any of this code Apache licensed? Do they have NOTICE files? If so: + [ ] Have relevant parts of those NOTICE files been added to this NOTICE file? +[v] Do all source files have ASF headers? <-- 鏄惁鎵€鏈夋簮鐮侀兘鏈堿SF澶撮儴 +[v] Do the contents of the release match with what's tagged in version control? <-- 鍙戝竷鐨勬枃浠舵槸鍚﹀拰github涓璽ag鏍囪鐨勭増鏈竴鑷� +[x] Are there any unexpected binary files in the release? <-- 鏄惁鍖呭惈涓嶅簲璇ュ瓨鍦ㄧ殑浜岃繘鍒舵枃浠� +[v] Can you compile from source? Are the instruction clear? <-- 鑳藉惁缂栬瘧锛熸寚浠ゆ槸鍚︽槑纭紵 + +On my mac laptop, I could compile successfully but there's one failed unit +test against net.go. I believe this issue [1] can be fixed with [2] in the +next release. <-- 缂栬瘧闂鍙婂缓璁� + +Is the issue minor? <-- 缂栬瘧瀛樺湪鐨勯棶棰樻槸鍚﹂兘鏄緝灏忕殑锛� +[v] Yes [ ] No [ ] Unsure + +Could it possibly be fixed in the next release? <-- 鑳藉惁鍦ㄤ笅涓€鐗堟湰淇锛� +[v] Yes [ ] No [ ] Unsure + +I vote with: <-- 鎴戠殑鎶曠エ +[v] +1 release the software +[ ] +0 not sure if it should be released +[ ] -1 don鈥檛 release the software because... + +Regards, +-Ian. + +1. https://github.com/apache/dubbo-go/issues/207 +2. https://github.com/apache/dubbo-go/pull/209 +``` + +鑼冧緥3锛� +``` ++1 + +I checked the following items: + +[鈭歖 Do LICENSE and NOTICE files exists? +[鈭歖 Is the LICENSE and NOTICE text correct? +[鈭歖 Is the NOTICE year correct? +[鈭歖 Do all source files have ASF headers? +[鈭歖 Do the contents of the release match with what's tagged in version control? +[鈭歖 Can you compile from source? +I could compile successfully but there's failed units test. I run the unit +test refer to :https://github.com/apache/dubbo-go#running-unit-tests . +But I think it is not matter, the test can be fixed in next release. + + +I vote with: +[鈭歖 +1 release the software +``` + +鑼冧緥4: +``` +Great improvement over the previous release but there are still issues from the last vote that have not been resolved. e.g. [6][7][8] + +Can someone tell me if these files [1][2][3][4][5] are just missing ASF headers or have a different license? + +If they are just missing headers and [6][7][8] explained then it +1 form me, otherwise it鈥檚 probably a -1. + +Can people please carefully check the contents, and write down what you checked, rather than just saying +1. + +I checked: +- signatures and hashes good +- LICENSE is missing the appendix (not a major issue) +- LICENSE may be is missing some information[1][2][3][4][5] +- NOTICE is fine +- No binaries in source release +- Some files are missing ASF headers or other license headers [1][2][3][4][5] - please fix + +Thanks, +Justin + +1. dubbo-go-1.1.0/cluster/loadbalance/round_robin_test.go +2. dubbo-go-1.1.0/common/extension/router_factory.go +3. dubbo-go-1.1.0/config_center/configuration_parser.go +4. dubbo-go-1.1.0/config_center/configuration_parser_test.go +5. dubbo-go-1.1.0/registry/zookeeper/listener_test.go +6. dubbo-go-1.1.0/cluster/loadbalance/least_active.go +7. dubbo-go-1.1.0/protocol/RpcStatus.go +8. dubbo-go-1.1.0/filter/impl/active_filter.go +``` + + +### 8.3. 鍙� [RESULT] [VOTE] 鎶曠エ缁撴灉閫氱煡閭欢 + +- TO: dev@dubbo.apache.org +- Title: [RESULT] [VOTE]: Release Apache dubbo-go-hessian2 v1.4.0 RC1 + + +``` +Hello Dubbo/Dubbogo Community, + +The release dubbo-go-hessian2 v1.4.0 RC1 vote finished, We鈥檝e received 3 +1 (binding) votes. + ++1 binding, Stocks Alex ++1 binding, Ian Luo ++1 binding, Jun Liu + +The vote and result thread: +https://lists.apache.org/thread.html/r8070f3b00984888069dd4ddad1bbc424cde51ea68b6ff0520e609e18%40%3Cdev.dubbo.apache.org%3E + + +The vote passed. Thanks all. +I will proceed with the formal release later. + + +Best regards, + +The Apache Dubbogo Team +``` + + +### 8.4. 鍙� Announce 鍙戠増閭欢 + +- TO: dev@dubbo.apache.org +- [ANNOUNCE] Apache Dubbo version 2.7.4 Released + +``` +Hello Community, + +The Apache Dubbo team is pleased to announce that the 2.7.4 has been +released. + +Apache Dubbo鈩� is a high-performance, java based, open source +RPC framework. Dubbo offers three key functionalities, which include +interface based remote call, fault tolerance & load balancing, and +automatic service registration & discovery. + +Both the source release[1] and the maven binary release[2] are available +now, you can also find the detailed release notes in here[3]. + + +If you have any usage questions, or have problems when upgrading or find +any problems about enhancements included in this release, please don鈥檛 +hesitate to let us know by sending feedback to this mailing list or filing +an issue on GitHub[4]. + + + +[1] http://dubbo.apache.org/en-us/blog/download.html +[2] http://central.maven.org/maven2/org/apache/dubbo +[3] https://github.com/apache/dubbo/releases +[4] https://github.com/apache/dubbo/issues +``` + +## 9. 鍙傝€� + +- dubbo鍙戝竷娴佺▼: http://dubbo.apache.org/zh-cn/docs/developers/committer-guide/release-guide_dev.html +- doris鍙戝竷娴佺▼: https://github.com/apache/incubator-doris/blob/master/docs/documentation/cn/community/release-process.md +- spark鍙戝竷娴佺▼: http://spark0apache0org.icopy.site/release-process.html + + diff --git a/doc/apache/release_note.md b/doc/apache/release_note.md new file mode 100644 index 0000000000000000000000000000000000000000..747a3348a1324cc059906fae16cb432b3bc6188d --- /dev/null +++ b/doc/apache/release_note.md @@ -0,0 +1,11 @@ +### How to release a new version? +--- + +* 1 Check the time range of NOTICE; +* 2 Add the features to the feature list of README.md/README_CN.md/CHANGE.md; +* 3 Check whether every code file has the Apache License 2.0 or not; +* 4 There should not be author info(name & email etc) exist in code file; +* 5 Run all unit tests; +* 6 Run all samples in apache/dubbo-samples/golang; +* 7 Write "What's New" by releaser who should be an apache/dubbo-go committer; +* 8 And then, u can release a new version refer to [Apache 杞欢鍙戠増娴佺▼](./apache-release-procedure-20200306.md); \ No newline at end of file diff --git a/go.mod b/go.mod index 73046bc1866176d5e6b52b7bbdea70851fe32269..27bcc2b9314eef5268e79a9d0f0754ff6f975252 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/Workiva/go-datastructures v1.0.50 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e // indirect - github.com/apache/dubbo-go-hessian2 v1.3.1-0.20200302092433-6ae5479d93a3 + github.com/apache/dubbo-go-hessian2 v1.4.0 github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23 // indirect github.com/coreos/bbolt v1.3.3 // indirect github.com/coreos/etcd v3.3.13+incompatible @@ -26,6 +26,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.9.5 // indirect + github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 github.com/hashicorp/consul v1.5.3 github.com/hashicorp/consul/api v1.1.0 github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect diff --git a/go.sum b/go.sum index d3570af4839139dc884ff730da333f6fdbe97651..cfde0ef1bd6832cdbdffa08617eb765f88630716 100644 --- a/go.sum +++ b/go.sum @@ -35,8 +35,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e h1:MSuLXx/mveDbpDNhVrcWTMeV4lbYWKcyO4rH+jAxmX0= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190802083043-4cd0c391755e/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/apache/dubbo-go-hessian2 v1.3.1-0.20200302092433-6ae5479d93a3 h1:1HM47ILUkLaMxLKUub+WHPncqrJGEQ0KRJzSJueMDpY= -github.com/apache/dubbo-go-hessian2 v1.3.1-0.20200302092433-6ae5479d93a3/go.mod h1:VwEnsOMidkM1usya2uPfGpSLO9XUF//WQcWn3y+jFz8= +github.com/apache/dubbo-go-hessian2 v1.4.0 h1:Cb9FQVTy3G93dnDr7P93U8DeKFYpDTJjQp44JG5TafA= +github.com/apache/dubbo-go-hessian2 v1.4.0/go.mod h1:VwEnsOMidkM1usya2uPfGpSLO9XUF//WQcWn3y+jFz8= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -202,6 +202,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= +github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul v1.5.3 h1:EmTWRf/cuqZk6Ug9tgFUVE9xNgJPpmBvJwJMvm+agSk= diff --git a/protocol/grpc/client.go b/protocol/grpc/client.go index d35a2c770cd8b9bda805715889791ccf53c562db..6026f0991b926fd38de8aef3774e46b001820edd 100644 --- a/protocol/grpc/client.go +++ b/protocol/grpc/client.go @@ -22,6 +22,8 @@ import ( ) import ( + "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc" + "github.com/opentracing/opentracing-go" "google.golang.org/grpc" ) @@ -39,7 +41,11 @@ type Client struct { // NewClient ... func NewClient(url common.URL) *Client { - conn, err := grpc.Dial(url.Location, grpc.WithInsecure(), grpc.WithBlock()) + // if global trace instance was set , it means trace function enabled. If not , will return Nooptracer + tracer := opentracing.GlobalTracer() + conn, err := grpc.Dial(url.Location, grpc.WithInsecure(), grpc.WithBlock(), + grpc.WithUnaryInterceptor( + otgrpc.OpenTracingClientInterceptor(tracer, otgrpc.LogPayloads()))) if err != nil { panic(err) } diff --git a/protocol/grpc/server.go b/protocol/grpc/server.go index 19b9db4ac743ceefcf035d399c0bbcdd99f1fa80..cc184bf3cff83e6ed57bc41cba49c184860233dd 100644 --- a/protocol/grpc/server.go +++ b/protocol/grpc/server.go @@ -24,6 +24,8 @@ import ( ) import ( + "github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc" + "github.com/opentracing/opentracing-go" "google.golang.org/grpc" ) @@ -63,7 +65,11 @@ func (s *Server) Start(url common.URL) { if err != nil { panic(err) } - server := grpc.NewServer() + + // if global trace instance was set , then server tracer instance can be get. If not , will return Nooptracer + tracer := opentracing.GlobalTracer() + server := grpc.NewServer( + grpc.UnaryInterceptor(otgrpc.OpenTracingServerInterceptor(tracer))) key := url.GetParam(constant.BEAN_NAME_KEY, "") service := config.GetProviderService(key)