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

fix bug :http api for nodes #397

Closed
wants to merge 23 commits into from
Closed

fix bug :http api for nodes #397

wants to merge 23 commits into from

Conversation

gongna-au
Copy link
Contributor

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?:


@gongna-au gongna-au changed the title My feature fix http api for nodes Sep 3, 2022
@gongna-au gongna-au changed the title fix http api for nodes fix bug :http api for nodes Sep 3, 2022
nodesArray, err := service.ListNodes(c, cluster, group)
if err != nil {
_ = c.Error(err)
break
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

should be return.

Copy link
Contributor Author

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

Copy link
Contributor

@jjeffcaii jjeffcaii left a comment

Choose a reason for hiding this comment

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

pls fix.

@dongzl dongzl added the config Config center. label Sep 3, 2022
@gongna-au gongna-au closed this Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Config center.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants