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

Verify cluster name in remove cluster call #3715

Merged
merged 3 commits into from
Dec 21, 2022
Merged

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Dec 15, 2022

What changed?
Verify cluster name in remove cluster call.

Why?
The remove response should return an error if the cluster name is invalid instead of return a success.

How did you test it?

Potential risks

Is hotfix candidate?

}
}
if !isClusterNameExist {
return nil, serviceerror.NewInvalidArgument("The cluster to be deleted cannot be found in clusters cache.")
Copy link
Member

Choose a reason for hiding this comment

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

Should it be NotFound error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Updated to not found error.

@yux0 yux0 marked this pull request as ready for review December 16, 2022 01:12
@yux0 yux0 requested a review from a team as a code owner December 16, 2022 01:12
@yux0 yux0 merged commit b2c5357 into temporalio:master Dec 21, 2022
@yux0 yux0 deleted the val-cluster branch December 21, 2022 18:03
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