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

PublishConfig CasMd5检测不通过发布失败时,无err,并且返回成功;导致应用程序无法判断发布到底是否真的成功 #727

Open
zhangms opened this issue Mar 2, 2024 · 0 comments
Labels
2.0.0 research Need to investigate the problem

Comments

@zhangms
Copy link

zhangms commented Mar 2, 2024

What version of nacos-sdk-go are you using?

v2.2.5

What version of nacos-sever are you using?

v2.3.0

What version of Go are you using (go version)?

go 1.21

What operating system (Linux, Windows, …) and version?

Linux

What did you do?

func (n *configClientNacos) PublishCas(dataId, groupId, content, casMd5 string) error {
success, err := n.client.PublishConfig(vo.ConfigParam{
DataId: dataId,
Group: groupId,
Content: strings.TrimSpace(content),
CasMd5: casMd5,
})
if err != nil || !success {
return errors.Join(errors.New("publish config not success"), err)
}
return nil
}

What did you expect to see?

当参数casMd5 与 nacos-server 上配置的md5不一致时,返回失败或者错误

What did you see instead?

当参数casMd5 与 nacos-server 上配置的md5不一致时,nacos-server实际未发布成功,但sdk返回了正确

@binbin0325 binbin0325 added research Need to investigate the problem 2.0.0 labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0.0 research Need to investigate the problem
Projects
None yet
Development

No branches or pull requests

2 participants