internal/transport: validate balancer and address metadata - #9203
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9203 +/- ##
==========================================
- Coverage 83.21% 83.15% -0.06%
==========================================
Files 420 422 +2
Lines 34008 34866 +858
==========================================
+ Hits 28299 28994 +695
- Misses 4275 4382 +107
- Partials 1434 1490 +56
🚀 New features to boost your workflow:
|
a77ed9e to
99ce15e
Compare
99ce15e to
1155fc0
Compare
|
Apologies for the delay in reviewing this. I will have this reviewed shortly. |
|
Thank you for fixing this. It mostly looks good to me, I have added a few comments about test. |
1155fc0 to
2ea7b27
Compare
|
Thanks @eshitachandwani, I updated this PR to address your review feedback. Changes applied:
Local validation passed: go test ./test -run '^Test/(InvalidMetadataInPickResult|AddressMetadataValidation)' -count=1\ngo test ./internal/transport -count=1\ngo test ./test -count=1\n``` |
2ea7b27 to
ed23ab8
Compare
eshitachandwani
left a comment
There was a problem hiding this comment.
LGTM modulo one minor nit.
Adding @easwars as a second reviewer.
ed23ab8 to
b67d483
Compare
|
Thanks @eshitachandwani, I updated the picker helper naming to address the readability nit. Change applied:
Local validation passed: go test ./test -run '^Test/(InvalidMetadataInPickResult|AddressMetadataValidation)' -count=1
git diff --check |
|
I looked into the failed The failure appears unrelated to this PR. The failing package/test is This PR only changes metadata validation paths in I also ran the exact failing test locally against this PR branch multiple times and it passed: go test ./internal/xds/clients/xdsclient/test -run '^Test/ConnectedMetric_Reconnection$' -count=10So this looks like an xDS metrics timing flake rather than a regression from the metadata validation change. |
We already have an open issue for this test, I have added the run there for the record and am re-running the test here. |
|
@buger : Thanks for your contribution! |
Fixes #9199
Validate metadata supplied by balancer
PickResult.Metadatabefore merging it into the outgoing context, and validate resolver/address metadata before converting it to HTTP/2 header fields.The tests cover invalid address metadata at the transport boundary and invalid balancer metadata through an end-to-end RPC path.
RELEASE NOTES: