-
Notifications
You must be signed in to change notification settings - Fork 273
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
Init flow improvement #825
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.
Had a couple of minor suggestions, looks good otherwise.
garden-service/src/actions.ts
Outdated
const entry = log.info({ section: "providers", msg: "Getting status...", status: "active" }) | ||
const statuses = await this.getEnvironmentStatus({ pluginName, log: entry }) | ||
|
||
const needManualInit = Object.entries(statuses) | ||
.map(([name, status]) => ({ ...status, name })) | ||
.filter(status => status.ready === false && status.needManualInit === true) | ||
|
||
if (!allowUserInput && needManualInit.length > 0) { | ||
if (!init && needManualInit.length > 0) { |
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.
Just a thought—would manualInit
be a clearer name than init
here? Or alternatively, using needInit
instead of needManualInit
? If I'm, not mistaken, they're both referring to the same flag.
force: Joi.boolean() | ||
.description("Force re-configuration of the environment."), | ||
init: Joi.boolean() | ||
.description("Set to true if the environment is being explicitly initialized via `garden init`"), |
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.
Missing .
at the end.
This signals to the handler whether it's being run implicitly, or explicitly in the context of `garden init`
No description provided.