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

[Improvement] Sample command in CLI document may report error #5541

Open
shaofengshi opened this issue Nov 12, 2024 · 2 comments
Open

[Improvement] Sample command in CLI document may report error #5541

shaofengshi opened this issue Nov 12, 2024 · 2 comments
Labels
improvement Improvements on everything

Comments

@shaofengshi
Copy link
Contributor

shaofengshi commented Nov 12, 2024

What would you like to be improved?

In the "cli.md" document, there are some sample commands to illustrate how to use the CLI. While if user just copy & paste them, they may get error as some name conflicts. For example, when run:

"gcli catalog update --name catalog_mysql --rename mysql"

If he already run the commands prior to this, the name "mysql" is aready been occupied. As @justinmclean suggested, this should be recorded and improved later.

How should we improve?

The document can improved to avoid such conflict.

@justinmclean
Copy link
Member

justinmclean commented Nov 12, 2024

I don't think there is any simple solution to this:
a) If they are not running the playground, they will likely get an error (as the catalog may not exist). Other commands before this would have also failed.
b) If they have run the other catalog create command, this will also fail as they would be trying to create a catalog that already exists.
c) Even if we change it to a new unused catalog name, then commands after this will fail as that catalog doesn't exist anymore.
d) If we change the later commands, they will fail if a user doesn't rename the catalog.

As far as I can see, the commands can potentially fail no matter what solution we pick.

Does it matter if a rename command fails with reason if it is there just to show the syntax? I think we prefer one command failing to multiple commands failing?

@justinmclean
Copy link
Member

@shaofengshi Any suggestions on the best path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements on everything
Projects
None yet
Development

No branches or pull requests

2 participants