Skip to content

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

Closed
robynron wants to merge 3 commits intonacos-group:masterfrom
robynron:dev/chasu/listener_callback_when_config_doesnt_exist
Closed

[BUG FIX] Config listener doesn't execute when querying result is config doesn't exist#712
robynron wants to merge 3 commits intonacos-group:masterfrom
robynron:dev/chasu/listener_callback_when_config_doesnt_exist

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执行逻辑,先合入一版本。

}
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相关逻辑

@Sunrisea Sunrisea closed this Sep 24, 2025
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.

4 participants