fix(kafka create): run interactive if no name provided and fix typos#705
fix(kafka create): run interactive if no name provided and fix typos#705rkpattnaik780 merged 4 commits intomainfrom
Conversation
craicoverflow
left a comment
There was a problem hiding this comment.
When I pass the --provider flag, it will re-prompt me to enter the provider value in the interactive prompt:
❯ ./rhoas kafka create --provider aws
? Name: my-kafka
? Cloud Provider: [Use arrows to move, type to filter]
> awsThe way it was (supposed to be) working before now was as follows:
If no name argument is passed, and any value flag is passed, such as provider, then throw an error as the user is trying to mix interactive with non-interactive Kafka creation.
I think that this is more maintainable in the long run, and I believe it is consistent with the other create commands (not sure though).
| one = 'name is required. Run "rhoas kafka create <name>"' | ||
|
|
||
| [kafka.create.flags.notAllowedWhenInteractive] | ||
| one = 'region and provider flags not allowed for interactive Kafka instance creation' |
There was a problem hiding this comment.
Suggestion for a better error message @craicoverflow ?
There was a problem hiding this comment.
Swap it round like something like this: "name" argument is required when creating a Kafka instance
There was a problem hiding this comment.
Changed it to 'name is required. Run "rhoas kafka create <name>"'
fc3b6a9 to
1f41972
Compare


rhoas kafka createis run with flags but no name.Closes #703, #704
Verification Steps
rhoas kafka create --provider aws, it should open the interactive mode.rhoas kafka consumergroup list --topic <topic-name>where the topic has no associated consumergroup, it should display the messageKafka instance "<instance name>" has no consumer groups for topic "<topic-name>"Type of change
Checklist