Skip to content
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

[BUG FIX] Config listener doesn't execute when querying result is config doesn't exist #712

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

robynron
Copy link
Contributor

fix up #711

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 32.67%. Comparing base (89c5ab6) to head (4f14a25).
Report is 1 commits behind head on master.

❗ Current head 4f14a25 differs from pull request most recent head 7eaa226. Consider uploading reports for the commit 7eaa226 to get more accurate results

Files Patch % Lines
clients/config_client/config_client.go 0.00% 4 Missing ⚠️
...nts/naming_client/naming_grpc/naming_grpc_proxy.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #712      +/-   ##
==========================================
- Coverage   32.69%   32.67%   -0.02%     
==========================================
  Files          45       45              
  Lines        3294     3296       +2     
==========================================
  Hits         1077     1077              
- Misses       2136     2138       +2     
  Partials       81       81              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@binbin0325 binbin0325 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this pr fixed it : #626

@robynron
Copy link
Contributor Author

这个pr有2部分:

  1. 对齐了部分nacos server返回的状态码;
  2. 修复了client listener的执行逻辑:在异常状态码返回时,仍执行listener的callBack逻辑(对齐了Java SDK版本方案);

这个pr先只修复listener执行逻辑,先合入一版本。

@@ -493,14 +493,17 @@ func (client *ConfigClient) refreshContentAndCheck(cacheData cacheData, notify b
cacheData.group, cacheData.tenant)
return
}
if configQueryResponse != nil && configQueryResponse.Response != nil && !configQueryResponse.IsSuccess() {
if configQueryResponse != nil && configQueryResponse.Response != nil &&
!configQueryResponse.IsSuccess() && configQueryResponse.GetErrorCode() != 300 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!=300 的状态码判断可以先去掉,只修复listen相关逻辑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants