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

Proposal: Improve eKuiper command-line tools maintainability and usability #2816

Open
yai-dev opened this issue Apr 28, 2024 · 9 comments
Open
Assignees

Comments

@yai-dev
Copy link
Contributor

yai-dev commented Apr 28, 2024

What would you like to be added/modified:

  1. We need seperating kuiper's sub-commands into different .go files, each sub-commands has it own .go file.

  2. Command-Line tools arguments naming should be kebab-case.

  3. KuiperBaseKey environment should be public to users and documented and it's naming should be upper case and seperate with underscore.

  4. Add version flag to get version of kuiper and kuiperd.

Why is this needed:

Currently, eKuiper's command-line tools, which include kuiperd and kuiper, offer a lots of functions that made developers and users could work on terminal. However, the arguments are not always clear, and the sub-commands of kuiper are written in a single .go file, which complicates maintenance.

Above are all the optimizations I can think of. If you have better suggestions, please reply in the issue to join the discussion.

BTW: This proposal is outside the roadmap maybe? and I can try to work on it.

@yai-dev yai-dev changed the title [Proposal]: Improve eKuiper command-line tools maintainability and usability Proposal: Improve eKuiper command-line tools maintainability and usability Apr 28, 2024
@yai-dev
Copy link
Contributor Author

yai-dev commented Apr 28, 2024

I think eKuiper could provide SQL like prompt experience includes create rule, table and stream for users but not just query, and this feature has lot's of work to do and priority should lower than primary topic for this issue.

@ngjaying
Copy link
Collaborator

Thanks for the proposal. I am OK with the refactor. But renaming the commands sound like breaking changes. Recommend to do that in the master-v2 branch.

@yai-dev
Copy link
Contributor Author

yai-dev commented Apr 28, 2024

Thanks for the proposal. I am OK with the refactor. But renaming the commands sound like breaking changes. Recommend to do that in the master-v2 branch.

You may have misunderstood. I'm not proposing to rename the commands, but rather to group them into separate .go files, which would make maintenance easier.

And extends the query command's prompt, adding the new feature such like create rule, create table and create stream.

Below is examples:

$ kuiper query

kuiper > CREATE STREAM stream_name ( column_name <data_type> [ ,...n ] ) WITH ( property_name = expression [, ...] );
kuiper > CREATE TABLE table_name ( column_name <data_type> [ ,...n ] ) WITH ( property_name = expression [, ...] );
kuiper > DESCRIBE TABLE table_name;

And this feature is not higher priority and not must have cuz there already has same commands could work (kuiper create)

@yai-dev
Copy link
Contributor Author

yai-dev commented Apr 28, 2024

This proposal must guarantee eKuiper's users has same experience after refactored, that is 1st accept criteria.

@yai-dev
Copy link
Contributor Author

yai-dev commented Apr 28, 2024

@ngjaying perhaps we need to vote on this proposal? What steps should I take to start working on this?

@ngjaying
Copy link
Collaborator

Hi @yai-dev , if no breaking change, you can start to work on this if you like. Thanks

@yai-dev
Copy link
Contributor Author

yai-dev commented Apr 29, 2024

Hi @yai-dev , if no breaking change, you can start to work on this if you like. Thanks

OK, please assign this issue to me and i'm ready to working on it, and refactor will based on branch master-v2.

@ngjaying
Copy link
Collaborator

Thanks. Notice that, CLI is temporarily removed in v2 now. You can try to added it back progressively.

@yai-dev
Copy link
Contributor Author

yai-dev commented Apr 29, 2024

Thanks. Notice that, CLI is temporarily removed in v2 now. You can try to added it back progressively.

OKay

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

No branches or pull requests

2 participants