-
Notifications
You must be signed in to change notification settings - Fork 40
Fix(cli): bugs in cli first round testing #664
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
Conversation
When using the same path for each tenant, will raise an NFS error "Error 9081 (HY000): format file does not match, try to set a new directory". This commit fixes the issue by ensuring the destination configuration correctly matches the current cluster/tenant/backup type.
| if !utils.CheckIfClusterExists(cmd.Context(), clusterOptions.Name, clusterOptions.Namespace) { | ||
| break | ||
| } | ||
| logger.Printf("Cluster %s already exists in namespace %s, please input another cluster name", clusterOptions.Name, clusterOptions.Namespace) |
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.
This for-loop seems to be endless if the flow gets here.
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.
Yes, because here we want to check if the cluster name typed by user is available in the corresponding namespace, and if it is not exists (which is meet the requirements, the return value of utils.CheckIfClusterExists is false), and the workflow will be advanced.
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.
OK, I see. The cli tool is asking the user to enter the name and namespace of the cluster here.
| if !utils.CheckIfTenantExists(cmd.Context(), tenantOptions.Name, clusterOptions.Namespace) { | ||
| break | ||
| } | ||
| logger.Printf("Tenant %s already exists in namespace %s, please input another tenant name", tenantOptions.Name, clusterOptions.Namespace) |
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.
The same as the above
| if !utils.CheckIfClusterExists(cmd.Context(), clusterOptions.Name, clusterOptions.Namespace) { | ||
| break | ||
| } | ||
| logger.Printf("Cluster %s already exists in namespace %s, please input another cluster name", clusterOptions.Name, clusterOptions.Namespace) |
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.
OK, I see. The cli tool is asking the user to enter the name and namespace of the cluster here.
Summary
This PR fix bugs in the first round of cli testing. The problem solved is as follows:
showcmd: 426a61fCompletefunction when creating a backup policy: 81a827d, and the details can be seen in the commit message. The tenant’s create command has also been modified in 4faa655Solution Description