Add configurable probe timeout and frequency for activator#16250
Add configurable probe timeout and frequency for activator#16250knative-prow[bot] merged 4 commits intoknative:mainfrom
Conversation
Signed-off-by: Dhruv Bindra <[email protected]>
|
Hi @bindrad. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test |
Signed-off-by: Dhruv Bindra <[email protected]>
|
/test unit-tests |
|
I'm not sure if |
|
It's likely a flaky test indicated by a webhook deployment not being ready in the E2E test setup. Let's do a simple retest. /retest |
|
@bindrad Seems like the flaky test finished without errors. I just reviewed the code and think it might make sense to only set/overwrite these values through the I'm not a long-term contributor/approver though so someone else might have a better idea. |
|
@linkvt Thanks for the feedback. I thought to follow the same pattern as |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16250 +/- ##
==========================================
+ Coverage 80.02% 80.04% +0.01%
==========================================
Files 215 216 +1
Lines 13327 13439 +112
==========================================
+ Hits 10665 10757 +92
- Misses 2299 2320 +21
+ Partials 363 362 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cmd/activator/main.go
Outdated
| ProbeTimeout int `split_words:"true" default:"300"` | ||
| ProbeFrequency int `split_words:"true" default:"200"` |
There was a problem hiding this comment.
I'd like more flexibility here to provide a golang duration string and parse it using https://pkg.go.dev/time#ParseDuration to prase
There was a problem hiding this comment.
Otherwise not having the unit in the name is confusing
| probeTimeout time.Duration | ||
| probeFrequency time.Duration |
There was a problem hiding this comment.
Where and when is probeFrequency changed on a per revision basis?
If we're not changing things per-revision we can save ourselves all this extra code plumbing these fields down and maybe just use the constants that can be overridden by the env var
There was a problem hiding this comment.
Correct, these values are global settings from env vars and aren't changed per-revision. I'll refactor to use package-level variables instead of plumbing them through multiple layers. This will simplify the code.
|
I tweaked the commit a bit. I didn't like tests having to call |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bindrad, dprotaso The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #16249
Proposed Changes
PROBE_TIMEOUTenvironment variable to configure activator health check timeout (default: 300ms)PROBE_FREQUENCYenvironment variable to configure activator probe frequency (default: 200ms)Release Note