-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Make prober more generic #4543
Make prober more generic #4543
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.
@JRBANCEL: 0 warnings.
In response to this:
The prober needs to be made more generic in order to be reused for #3312.
Proposed Changes
- Remove hard-coded assumption that a probe request contains the header 'K-Network-Probe' and the probe response will contain a matching body
- Extend ProbeOption to allow both modifying the probe request and validate the probe response
- Rename ProbeOption to option to match go naming convention: prober.Option seems cleaner than prober.ProbeOption
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.
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
/approve
/hold
in case you want to change the name, otherwise cancel.
// ProbeOption is a way for caller to modify the HTTP request before it goes out. | ||
type ProbeOption func(r *http.Request) *http.Request | ||
// Preparer is a way for the caller to modify the HTTP request before it goes out. | ||
type Preparer func(r *http.Request) *http.Request |
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.
RequestOpt(ion)
is probably more expressive, but up to you.
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.
Naming is hard. I don't have an opinion on this.
Can easily be changed later if it is not clear enough.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JRBANCEL, vagababov 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 |
/test pull-knative-serving-integration-tests |
ac095b9
to
81917f5
Compare
The following is the coverage report on pkg/.
|
I had to fix merge conflicts. |
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
/hold cancel |
The prober needs to be made more generic in order to be reused for #3312.
Proposed Changes