Skip to content

[CLI-744] verify cluster existence in confluent cluster unregister to avoid false success message#1485

Merged
Brian Strauch (brianstrauch) merged 4 commits intomainfrom
CLI-744
Oct 27, 2022
Merged

[CLI-744] verify cluster existence in confluent cluster unregister to avoid false success message#1485
Brian Strauch (brianstrauch) merged 4 commits intomainfrom
CLI-744

Conversation

@MuweiHe
Copy link
Contributor

@MuweiHe MuweiHe commented Oct 26, 2022

Checklist

  1. [CRUCIAL] Is the change for CP or CCloud functionalities that are already live in prod?
    • yes: ok

What

MDS client doesn't return error when trying to unregister a non-exist cluster. add a verification before that and return error if no such cluster name is found.

References

https://confluentinc.atlassian.net/browse/CLI-744

Test & Review

@MuweiHe MuweiHe marked this pull request as ready for review October 26, 2022 21:36
@MuweiHe MuweiHe requested a review from a team as a code owner October 26, 2022 21:36
Copy link
Member

Choose a reason for hiding this comment

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

👍

return err
}

response, err := c.MDSClient.ClusterRegistryApi.DeleteNamedCluster(ctx, name)

Choose a reason for hiding this comment

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

Can we open a ticket with the security team to make this API return an error if the cluster doesn't exist? This shouldn't have to be a CLI change.

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