-
Notifications
You must be signed in to change notification settings - Fork 590
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
Remove double invocations to responseWriter.WriteHeader in filter handler #4466
Remove double invocations to responseWriter.WriteHeader in filter handler #4466
Conversation
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #4466 +/- ##
==========================================
+ Coverage 81.19% 81.27% +0.07%
==========================================
Files 281 282 +1
Lines 7981 8004 +23
==========================================
+ Hits 6480 6505 +25
Misses 1112 1112
+ Partials 389 387 -2
Continue to review full report at Codecov.
|
/assign |
I'm just a bit concerned that some of the error cases which this is intended to fix don't really have coverage. So I'm not sure the extent to which this is fully tested. Still, to my eyes this looks good! /lgtm |
@tommyreddad Can you be more specific on which error case? I can try to cover them all, although the real issue was that the /hold |
Just examining the coverage report, the following cases don't seem covered:
|
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@tommyreddad I covered only the case 1, the case 2 is infallible and for the case 3 failure is very hard to simulate (a failure that comes to my mind is a broken i/o pipe to simulate), not really worth it. I think now we're well covered /unhold |
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierDipi, slinkydeveloper 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 |
The following is the coverage report on the affected files.
|
little bit late w/ the reviews, but most has been covered already LGTM |
Porting to 0.17 and 0.18 |
…dler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
…dler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
…dler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
…dler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Remove double invocations to responseWriter.WriteHeader in filter handler (#4466) * Fix #4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Remove double invocations to responseWriter.WriteHeader in filter handler (#4466) * Fix #4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Remove double invocations to responseWriter.WriteHeader in filter handler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> Co-authored-by: slinkydeveloper <francescoguard@gmail.com>
* Remove double invocations to responseWriter.WriteHeader in filter handler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Remove double invocations to responseWriter.WriteHeader in filter handler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
* Update pingsource-mt-adapter.yaml * Like on 0.18.3, we skip the tracing tests Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * [release-0.18] Retry on network failures (knative#4454) (knative#4457) * Retry on network failures (knative#4454) Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * nethttp -> http Signed-off-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> * Backport knative#4465 (knative#4468) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * [0.18] Backport knative#4466 (knative#4471) * Remove double invocations to responseWriter.WriteHeader in filter handler (knative#4466) * Fix knative#4464 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Docs Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Moar tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Linting Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit with metrics Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> (cherry picked from commit a6fc540) Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Nit Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * fixed wrong marshall in apiserversouece which will fix the missing ceOverrides extension (knative#4477) (knative#4480) * fixed wrong marshall * fixed UT * [0.18] Readyness probe in broker ingress (knative#4483) * Fix knative#4473 Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> * Massage the filter yaml Signed-off-by: Francesco Guardiani <francescoguard@gmail.com> Co-authored-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com> Co-authored-by: Francesco Guardiani <francescoguard@gmail.com> Co-authored-by: capri-xiyue <52932582+capri-xiyue@users.noreply.github.com>
Signed-off-by: Francesco Guardiani francescoguard@gmail.com
Fixes #4464
Proposed Changes
WriteHeader
is invoked more than once