router: inherit upstream connection filter state in upstream request stream info#10458
router: inherit upstream connection filter state in upstream request stream info#10458ggreenway merged 18 commits intoenvoyproxy:masterfrom
Conversation
…r state Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
| */ | ||
| virtual const FilterStateSharedPtr& filterState() PURE; | ||
| virtual const FilterState& filterState() const PURE; | ||
| virtual const FilterStateSharedPtr& filterState() const PURE; |
There was a problem hiding this comment.
This change is a bit unfortunate; it's to make it possible to get the parent FilterStateSharedPtr from a const handle. Open for suggestions here for how to do this better
There was a problem hiding this comment.
I'd rather have a const-cast somewhere; this looks on the surface like it is const-safe, but the returned ptr is non-const, even though the method is const.
There was a problem hiding this comment.
Actually, I think I would make onPoolReady() pass a non-const StreamInfo. I think it's reasonable for that function to have non-const access to the StreamInfo.
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
| */ | ||
| virtual const FilterStateSharedPtr& filterState() PURE; | ||
| virtual const FilterState& filterState() const PURE; | ||
| virtual const FilterStateSharedPtr& filterState() const PURE; |
There was a problem hiding this comment.
I'd rather have a const-cast somewhere; this looks on the surface like it is const-safe, but the returned ptr is non-const, even though the method is const.
| */ | ||
| virtual const FilterStateSharedPtr& filterState() PURE; | ||
| virtual const FilterState& filterState() const PURE; | ||
| virtual const FilterStateSharedPtr& filterState() const PURE; |
There was a problem hiding this comment.
Actually, I think I would make onPoolReady() pass a non-const StreamInfo. I think it's reasonable for that function to have non-const access to the StreamInfo.
test/common/router/router_test.cc
Outdated
| bool filter_state_verified = false; | ||
| router_.config().upstream_logs_.push_back( | ||
| std::make_shared<TestAccessLog>([&](const auto& stream_info) { | ||
| filter_state_verified = stream_info.upstreamFilterState()->hasDataWithName("foo"); |
There was a problem hiding this comment.
nit: would slightly increase readability if the string was "upstream data" or similar.
|
/wait |
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
|
|
||
| for (const auto& key : config.filter_state_objects_to_log()) { | ||
| if (stream_info.filterState().hasDataWithName(key)) { | ||
| if (stream_info.filterState()->hasDataWithName(key)) { |
There was a problem hiding this comment.
It appears #9845 added this ambiguity causing the windows CI compilation failures, not yet quite sure why MSVC is able to resolve it here: https://github.com/envoyproxy/envoy/pull/9845/files#diff-a5570d8b9053a47a1547728cb6c90989 and not this case
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
|
/retest |
|
🔨 rebuilding |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 2 pipeline(s). |
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
|
CI is unhappy :( /wait |
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
|
Seems to be OOMing in CI, merging again to pick up #10669 |
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
Signed-off-by: Snow Pettersen <kpettersen@netflix.com>
|
@ggreenway I think this can be reviewed now, the failing PR run seems to be due to general OS X issues in CI |
…stream info (envoyproxy#10458) Signed-off-by: Snow Pettersen <kpettersen@netflix.com> Signed-off-by: pengg <pengg@google.com>
This adds the upstream connection filter state to the upstream request stream info, making it possible to look up upstream connection state from upstream HTTP access logs.
Risk Level: Low
Testing: UT
Docs Changes: n/a
Release Notes: n/a
Fixes #10457