-
Notifications
You must be signed in to change notification settings - Fork 263
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
Added flag to configure wait-window between intermediate errors durin… #1645
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.
@vyasgun: 3 warnings.
In response to this:
…g service create
Description
Added the flag
--wait-window
for configuring the default error window between intermediate false Ready conditions when a service is coming upChanges
- Added the flag
- Changed existing signature for Wait function to accommodate the flag value
Reference
Fixes #1023
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.
pkg/serving/v1/client.go
Outdated
@@ -89,7 +89,7 @@ type KnServingClient interface { | |||
|
|||
// Wait for a service to become ready, but not longer than provided timeout. | |||
// Return error and how long has been waited | |||
WaitForService(ctx context.Context, name string, timeout time.Duration, msgCallback wait.MessageCallback) (error, time.Duration) | |||
WaitForService(ctx context.Context, name string, timeout, errorWindow time.Duration, msgCallback wait.MessageCallback) (error, 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.
(Note for the future :))
I wonder if it was worth to introduce simple waitConfig structure to represent those timeout values. The number of arguments is still manageable, until it won't grow too much. :) Maybe an overall refactor of wait would help, but that's certainly outside of the PR's scope.
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.
Thanks, I added the waitConfig struct for now
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.
There're a few more functions to be updated to reflect the changes in unit tests particularly.
611aa68
to
fbf9769
Compare
Codecov Report
@@ Coverage Diff @@
## main #1645 +/- ##
==========================================
+ Coverage 79.28% 79.30% +0.01%
==========================================
Files 171 171
Lines 12914 12925 +11
==========================================
+ Hits 10239 10250 +11
Misses 1955 1955
Partials 720 720
Continue to review full report at Codecov.
|
/retest |
type WaitConfig struct { | ||
Timeout time.Duration | ||
ErrorWindow 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.
Thanks! 💯
f13f1e0
to
18765de
Compare
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.
Thanks!
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dsimansk, vyasgun 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 |
…g service create
Description
Added the flag
--wait-window
for configuring the default error window between intermediate false Ready conditions when a service is coming upChanges
Reference
Fixes #1023