Skip to content
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

do not use resp if it fails, use 0 instead #3897

Merged
merged 2 commits into from
Aug 20, 2020

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Aug 20, 2020

Addresses #3791

When send fails or response is nil, set the response code to 0.

Proposed Changes

  • Seen while debugging 3791, does not fix the flakiness though.

Release Note

- 🐛 Fix bug
In cases where Filter sends a message and it fails or response is nil, it will panic because it uses it.

Docs

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 20, 2020
@knative-prow-robot knative-prow-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 20, 2020
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2020
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2020
@lberk
Copy link
Member

lberk commented Aug 20, 2020

/lgtm
/approve

thanks for looking into this

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lberk, pierDipi, vaikas

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/mtbroker/filter/filter_handler.go 86.6% 86.9% 0.3

@knative-prow-robot knative-prow-robot merged commit dfd7e77 into knative:master Aug 20, 2020
@vaikas vaikas deleted the issue-3791 branch August 20, 2020 21:27
@grantr
Copy link
Contributor

grantr commented Aug 20, 2020

Good catch! Would a unit test help here? Looks like coverage didn't decrease and is already pretty high, but this was a case not previously covered.

@vaikas
Copy link
Contributor Author

vaikas commented Aug 20, 2020

Yeah, working on it... :)

@lberk lberk mentioned this pull request Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants