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
Convert create into async #23
Conversation
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frobware The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
klog.Infof("Machine %q already exists", r.machine.Name) | ||
return true, nil | ||
switch instance.Status { | ||
case "PROVISIONING", "REPAIRING", "RUNNING", "STAGING": |
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.
I wonder whether this should be inverted:
switch instance.Status {
case "TERMINATED":
klog.Infof("Machine %q is considered as non existent as its status is %q", instance.Status)
return false, nil
default:
klog.Infof("Machine %q already exists", r.machine.Name)
return true, nil
}
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.
we should make all explicit and error otherwise
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.
we should make all explicit and error otherwise
This becomes brittle. We only really care for the TERMINATED
state.
🌱Remove vendor from gitignore
This mimics aws behaviour for async creation by relying on the
instance.Status
.Staging:
Running:
Logs reflects the machine going from provisioning->staging->running: