-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: avoid empty reason when auto-pausing canary #133
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.
This pull request contains a valid label.
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 pull request contains a valid label.
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 pull request contains a valid label.
Codecov Report
@@ Coverage Diff @@
## main #133 +/- ##
==========================================
+ Coverage 62.28% 62.31% +0.03%
==========================================
Files 41 41
Lines 2166 2168 +2
==========================================
+ Hits 1349 1351 +2
Misses 711 711
Partials 106 106
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -142,7 +142,9 @@ func HighestRestartCount(pod *v1.Pod) (int, datadoghqv1alpha1.ExtendedDaemonSetS | |||
restartCount = s.RestartCount | |||
reason = datadoghqv1alpha1.ExtendedDaemonSetStatusReasonUnknown | |||
if s.LastTerminationState != (v1.ContainerState{}) && *s.LastTerminationState.Terminated != (v1.ContainerStateTerminated{}) { | |||
reason = datadoghqv1alpha1.ExtendedDaemonSetStatusReason(s.LastTerminationState.Terminated.Reason) | |||
if s.LastTerminationState.Terminated.Reason != "" { // The Reason field is optional and can be empty |
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.
👍
What does this PR do?
HighestRestartCount
andMostRecentRestart
cannotStartReasons
set:Motivation
Make the canary auto-pause more reliable
Describe your test plan
InvalidImageName
is the easiest option to reproduce: