-
Notifications
You must be signed in to change notification settings - Fork 115
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
Prevent deploys from failing if pod is evicted #293
Conversation
@@ -155,6 +155,21 @@ def test_deploy_failed_is_true_for_container_cannot_run_error | |||
assert_equal expected_msg, pod.failure_message | |||
end | |||
|
|||
def test_deploy_failed_is_false_for_evicted_ |
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.
nit: you've got a trailing underscore (maybe you meant to add "pods"?)
@@ -155,6 +155,21 @@ def test_deploy_failed_is_true_for_container_cannot_run_error | |||
assert_equal expected_msg, pod.failure_message | |||
end | |||
|
|||
def test_deploy_failed_is_false_for_evicted_ | |||
container_state = { |
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.
Did this test really fail without your change? This is setting container status info, but eviction data (as your business logic correctly assumes) is at the top level of the pod status, like this:
status:
message: 'The node was low on resource: nodefs.'
phase: Failed
reason: Evicted
startTime: 2018-05-04T21:17:08Z
It didn't, probably because I guessed at what the status looks like for an evicted pod. I've updated the test based on |
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
Evictions should be recoverable so don't let them cause a failure.
Fixes: #230