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

Init flow improvement #825

Merged
merged 3 commits into from
Jun 10, 2019
Merged

Init flow improvement #825

merged 3 commits into from
Jun 10, 2019

Conversation

edvald
Copy link
Collaborator

@edvald edvald commented Jun 7, 2019

No description provided.

Copy link
Collaborator

@thsig thsig left a 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.

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) {
Copy link
Collaborator

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`"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing . at the end.

@edvald edvald force-pushed the init-improvement branch from ca20e8b to 5a7366b Compare June 10, 2019 16:04
edvald added 3 commits June 10, 2019 18:10
This signals to the handler whether it's being run implicitly, or explicitly
in the context of `garden init`
@edvald edvald force-pushed the init-improvement branch from 5a7366b to 07ba9ee Compare June 10, 2019 16:10
@edvald edvald merged commit bc6f5d7 into master Jun 10, 2019
@edvald edvald deleted the init-improvement branch June 10, 2019 16:17
@eysi09 eysi09 self-requested a review June 10, 2019 18:15
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

Successfully merging this pull request may close these issues.

2 participants