-
Notifications
You must be signed in to change notification settings - Fork 289
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
Improve Botkube CLI login
, migrate
commands and fix E2E migration tests
#1128
Conversation
a55476d
to
7faf9f5
Compare
7faf9f5
to
e47865e
Compare
login
, migrate
commands and fix E2E migration tests
flags.StringVar(&opts.CloudDashboardURL, "cloud-dashboard-url", "https://app.botkube.io", "Botkube Cloud URL") | ||
flags.StringVarP(&opts.Label, "label", "l", "app=botkube", "Label of Botkube pod") | ||
flags.StringVarP(&opts.Namespace, "namespace", "n", "botkube", "Namespace of Botkube pod") | ||
flags.BoolVarP(&opts.SkipConnect, "skip-connect", "q", false, "Skips connecting to Botkube Cloud after migration") | ||
flags.BoolVar(&opts.SkipOpenBrowser, "skip-open-browser", false, "Skips opening web browser after migration") | ||
flags.BoolVar(&opts.AutoUpgrade, "auto-upgrade", false, "Automatically upgrades Botkube instance without additional prompt") |
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.
suggestion
WDYT about having sth more generic like --no-input
/--no-interactivty
/--no-confirm
?
So basically a user will have one flag to use when they want to disable all prompts, e.g. on CI.
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.
Not sure about this one - if --no-input
is passed then IMO automatic upgrade shouldn't be enabled by default 🤔 WDYT?
Ah, we have skip-connect
flag, so yeah, it's all good I think. Should we keep skip-open-browser
flag as a separate one?
To make it easier, if we decided to go with this option, I'd also do it in a separate PR (even as a follow-up, let's see)
flags.StringVar(&opts.ConfigExporter.Tag, "cfg-exporter-image-tag", DefaultImageTag, "Config Exporter job image tag") | ||
flags.DurationVar(&opts.ConfigExporter.PollPeriod, "cfg-exporter-poll-period", 1*time.Second, "Config Exporter job poll period") | ||
flags.DurationVar(&opts.ConfigExporter.Timeout, "cfg-exporter-timeout", 1*time.Minute, "Config Exporter job timeout") | ||
flags.BoolVarP(&opts.Debug, "debug", "d", false, "Turn on debug logging") |
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.
On my PR I introduce a global verbose
flag, so it will be easy to check across the whole code-base whether we should print more info. It should also make it more consistent and scalable in case when we reuse some components between commands, as the one global value will be used.
Additionally, I introduced an option to specify verbose level, the same what we had in the previous project. It can be useful when we run some GraphQL calls, and with trace
we can print them too, but not always when -v
is specified as it could be too verbose.
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, but I will adjust this after your PR is merged 👍 Or in a follow-up, let's discuss that later 👍
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 👍
Description
Changes proposed in this pull request:
And others...
Testing
E2E tests prove the migration works (without
login
).Install Botkube:
Login:
Migrate:
Related issue(s)
#1125