-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Reduce default status check deadline to 2 mins #3687
Conversation
Codecov Report
|
@@ -110,7 +113,7 @@ func getDeployments(client kubernetes.Interface, ns string, l *DefaultLabeller, | |||
deployments := make([]Resource, 0, len(deps.Items)) | |||
for _, d := range deps.Items { | |||
var deadline time.Duration | |||
if d.Spec.ProgressDeadlineSeconds == nil || *d.Spec.ProgressDeadlineSeconds > int32(deadlineDuration.Seconds()) { | |||
if d.Spec.ProgressDeadlineSeconds == nil { | |||
deadline = deadlineDuration | |||
} else { | |||
deadline = time.Duration(*d.Spec.ProgressDeadlineSeconds) * time.Second |
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.
Same here?
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 dont understand what you mean?
Do you meant *d.Spec.ProgressDeadline * time.Second
?
i see an IDE error
cannot use type int as type Duration in an assignment
and also a make error
pkg/skaffold/deploy/status_check.go:119:47: invalid operation: *d.Spec.ProgressDeadlineSeconds * time.Second (mismatched types int32 and time.Duration)
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.
My bad. Only works with constants
@dgageot Addressed your comments. Please take another look. |
@@ -110,7 +113,7 @@ func getDeployments(client kubernetes.Interface, ns string, l *DefaultLabeller, | |||
deployments := make([]Resource, 0, len(deps.Items)) | |||
for _, d := range deps.Items { | |||
var deadline time.Duration | |||
if d.Spec.ProgressDeadlineSeconds == nil || *d.Spec.ProgressDeadlineSeconds > int32(deadlineDuration.Seconds()) { | |||
if d.Spec.ProgressDeadlineSeconds == nil { | |||
deadline = deadlineDuration | |||
} else { | |||
deadline = time.Duration(*d.Spec.ProgressDeadlineSeconds) * time.Second |
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.
My bad. Only works with constants
Related to #3638, #176
In this PR, we decrease the default Status check deadline to 3 seconds.
In this changes
statusCheckDeadlineSeconds
is present in the skaffold deploy config, respect that.progressDeadlineSeconds
inDeployment.Spec
defaultStatusCheckDeadline