-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
added trailer match capability #1709 #1721
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
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.
Thanks for this PR! It seems that you're missing the logic for actually using the new field to filter the trailers. We'll need to add this somewhere in the ServeMux logic, I suggest looking at how outgoingHeaderMatcher
is used.
Also I'd like a test for this before we can merge it. Again I suggest looking at how outgoingHeaderMatcher
is tested.
Let me know if you need anymore pointers!
I am unsure of how to test the handler. Should I modify the TestForwardResponseMessage func to include tests with trailers in handler_test.go? Or append a spec to the TestMuxServeHTTP func in mux_test.go? I'm assuming the latter, even though the changes were made in handler.go. |
Sorry if I wasn't clear. I thought we had some tests for Does that sound okay? |
Got it. No worries. I didn't add the logic at first because I mistakenly thought the implementation of the interface would be done by the client, but even back then I still felt like I was incorrect. I will continue to work on this until it is up to standard. |
Still unsure of how to test in handler_test.go, the only test headers I see are in mux_test.go.I feel like both test files need to be modified in order to test this functionality. The modified handler was the non-exported func handleForwardResponseServerMetadata(w http.ResponseWriter, mux *ServeMux, md ServerMetadata) |
The CI tests pass because if there is no specified outgoingTrailerMatcher, "TE" will be passed. The original issue wanted to be agnostic to whether or not "TE" was passed. |
I'm not sure what you're trying to say. There are two different concerns here:
These are separate concerns, there is no conflict between the two. This PR should tackle #1697. Don't worry about the other issue for the purposes of this PR. Re: testing, I think you should be able to copy one of the tests in |
I am not necessarily saying there is a conflict between the concerns. I'm saying that the way I resolved issue #1697 Ok. I'll spend more time attempting to modify the handler_test.go. Also, If you have any tips for me to improve my communication, please let me know. I am gladly willing to explain my current understanding of the problem, no matter how incorrect it may be, so that we can solve the issue. I took this on thinking it was OK for first timers. |
Hi, could you please rebase this on |
Are you still intending to merge this? Otherwise I will close it soon. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Related to #1697
Fixes #1697
(hopefully)