-
Notifications
You must be signed in to change notification settings - Fork 91
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
fix bug :http api for nodes #397
Conversation
* add http server api for tenant * fix import format * fix go format Co-authored-by: Zhang Aphelios <aphelios.zhang@shopee.com>
nodesArray, err := service.ListNodes(c, cluster, group) | ||
if err != nil { | ||
_ = c.Error(err) | ||
break |
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.
Should be return
.
result, err := service.GetNode(c, cluster, group, node) | ||
if err != nil { | ||
_ = c.Error(err) | ||
continue |
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.
Should be return
, and remove else
.
groups, err := service.ListGroups(c, cluster) | ||
if err != nil { | ||
_ = c.Error(err) | ||
continue |
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.
Should be return.
data, err = service.GetNode(c, cluster, group, node) | ||
if err != nil { | ||
_ = c.Error(err) | ||
continue |
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.
should be return.
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.
should be return.
I think should be continue ? 对于一组group Array 如果 在这之前group Array 中的一个元素返回了错误,没有调用通过service.GetNode(c, cluster, group, node) 返回一个node,但是其余的group Array中的元素有可能返回需要的node ,还是说对于这种情况,我们需要重新请求而不是返回出错信息和node
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.
pls fix.
1113978
to
bce3f02
Compare
What this PR does:
Which issue(s) this PR fixes:
Fixes #344
Special notes for your reviewer:
Does this PR introduce a user-facing change?: