-
Notifications
You must be signed in to change notification settings - Fork 147
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
daisy: Add StopStep #397
daisy: Add StopStep #397
Conversation
/ok-to-test |
Codecov Report
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 74.6% 74.86% +0.26%
==========================================
Files 33 34 +1
Lines 3390 3449 +59
==========================================
+ Hits 2529 2582 +53
- Misses 683 687 +4
- Partials 178 180 +2
Continue to review full report at Codecov.
|
daisy/step_stop_instances.go
Outdated
defer wg.Done() | ||
w.Logger.StepInfo(w, "StopInstances", "stopping instance %q.", i) | ||
if err := w.instances.stop(i); err != nil { | ||
if err.Type() == resourceDNEError { |
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 should never happen, just go ahead and remove the resourceDNEError check and log
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.
shouldn't we validate if we are trying to stop a machine that doesn't exist?
If I remove here, I also need to remote the test case where we try to stop a machine we didn't created.
@@ -39,6 +39,7 @@ type Client interface { | |||
DeleteDisk(project, zone, name string) error | |||
DeleteImage(project, name string) error | |||
DeleteInstance(project, zone, name string) error | |||
StopInstance(project, zone, name string) error |
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.
You'll also need to add the test implementation to test_client, thats probably why the tests are failing
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.
done, could you check please?
@@ -48,6 +48,7 @@ type Step struct { | |||
CreateInstances *CreateInstances `json:",omitempty"` | |||
CreateNetworks *CreateNetworks `json:",omitempty"` | |||
CopyGCSObjects *CopyGCSObjects `json:",omitempty"` | |||
StopInstances *StopInstances `json:",omitempty"` |
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.
Would you also need startinstances? If you don't need it for you tests there's no need to add it now, though we proabbly should make an issue to track it.
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 don't need startinstances for my tests, I'll make an issue then
5604121
to
0fc987f
Compare
sorry, codecov wasn't configured in my repo, I'll fix those checks and update the PR |
Step to stop an instance without deleting it. The StopStep is similar to DeleteResources for instances, but allow adding WaitForInstanceSignal without making it a dependency to the Delete step.
1eefa5f
to
de99029
Compare
@helen-fornazier: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Update --kubeconfig to use new key.
Step to stop an instance without deleting it.
The StopStep is similar to DeleteResources for instances, but allow
adding WaitForInstanceSignal without making it a dependency to the
Delete step.
Depend on #396