-
Notifications
You must be signed in to change notification settings - Fork 486
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
feat: use installation type in cli commands #3675
feat: use installation type in cli commands #3675
Conversation
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.
LGTM!
#[arg(long)] | ||
no_k8: bool, | ||
} | ||
pub struct ShutdownOpt; |
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.
Are the any cases where a manual override of the recorded installation_type might be needed?
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.
There should not be any cases when you install one type and want to override it for delete or shutdown.
But, if there is a need for a hack, it can be done by creating a profile fluvio profile add some_profile localhost:1234 local-k8
with setting another installation type and then execute delete or shutdown.
} | ||
if s.eq_ignore_ascii_case("readonly") { | ||
return Ok(Self::ReadOnly); | ||
} |
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.
Should these different spelling variations be allowed in the installation type parsing from str?
Docs and configs should really only have one spelling to reduce confusion.
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 is involved in the only place where we pass the installation type as an input:
fluvio profile add <PROFILE_NAME> <CLUSTER_ADDRESS> [INSTALLATION_TYPE]
and while using it I realized that I didn't want to remember if it should be local-k8
or local_k8
etc. So, I added support for all of them.
However, in start command:
fluvio cluster start --local-k8
it is a CLI argument with --, so it only supports one form.
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.
LGTM, I added some notes (none intended as blocking).
A lot of the changes were a nice exmple of much cleaner the test commands were in terms of fewer flags as a result of carrying the installaton_type in the profile.
This reverts commit 3d87bf1. CI was unstable when this was merged, need to revert to get back to a stable master
Installation type (Local, LocalK8, K8, ReadOnly) will be stored in the profile after
fluvio cluster start --local/k8/local-k8/read-only
and will be used in other cluster operations, so, the user does need to specify it onfluvio cluster delete/shutdown/diagnostics