-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add distinct logging for timeout types #16109
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
Add distinct logging for timeout types #16109
Conversation
|
Welcome @thiagomedina! It looks like this is your first PR to knative/serving 🎉 |
|
Hi @thiagomedina. Thanks for your PR. I'm waiting for a knative 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 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16109 +/- ##
==========================================
- Coverage 80.07% 80.05% -0.03%
==========================================
Files 214 214
Lines 16907 16920 +13
==========================================
+ Hits 13538 13545 +7
- Misses 3013 3016 +3
- Partials 356 359 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| func ErrorHandler(logger *zap.SugaredLogger) func(http.ResponseWriter, *http.Request, error) { | ||
| return func(w http.ResponseWriter, req *http.Request, err error) { | ||
| if errors.Is(err, context.Canceled) { |
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 change would be done: https://github.com/knative/pkg
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.
Hmmm, now I got it
sorry for the misunderstanding, I've opened the PR
knative/pkg#3268
pkg/http/handler/timeout_test.go
Outdated
| body: scenario.timeoutMessage, | ||
| timeoutFunc: StaticTimeoutFunc(scenario.timeout, scenario.responseStartTimeout, scenario.idleTimeout), | ||
| clock: fakeClock, | ||
| logger: zap.NewNop().Sugar(), |
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.
Can we use a zap test logger? https://pkg.go.dev/go.uber.org/zap/zaptest#NewLogger
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.
Sure, I changed it
|
/lgtm thanks @thiagomedina for the change. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, thiagomedina 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 #15752
Proposed Changes
Release Note