* Implement FilterChainMatch logic
* Add tests for transport protocol too
* Tests for duplicate NACKing
* Introduce ConnectionManager as an interface for config fetchers
* Do not parameterize IncrementIfNonZero
* Some formatting
* Reviewer comments
* Add filter chain match information for duplicate match error
* Reviewer comments
* Some cleanup
* Reviewer comments
* Reviewer comments
* Reviewer comments
* Clang-tidy
* Implement the xDS Config Dump as CSDS in Core
* Revemp the logic of caching and constructing the CSDS response
* Unref created error
* Fix the clang tidy complains
* Resolve comments about symbol preload and Json ctor
* Improve readability
* Merge with new ADS logic && support latest CSDS
* Refactor the version/client_status logic
* Add support for error_state
* Add support for does_not_exist
* Add node information
* Fix the ProtoBuf segfault
* More test cases
* Refactor to use bytes as cache instead of JSON
* Apply clang_tidy's suggestion
* Resolve reviewer's requests
* Tiny stylish fixes && make sanity test happy
* WIP: still working on the matchers
* Update a bunch of matchers
* Improve readability a bit
* Resolve reviewer's suggestions
* Resolve reviewer's comments
* Make Unpack fail fast
* Revert "Revert "xDS status notifier (#25321)" (#25702)"
This reverts commit 3c9f3972e3.
* Remove connection from map when OnClose is not registered
* Reviewer comments
* Refactored with dynamic filters
* Error-tolerance tuned
* Fix leak of grpc_error and data race of canceller
* Adopt the latest xDS HTTP filter framework
* Fix fault injection tests' conflict with router filter
* Test alternative setup (override, no-override) without copy
* Refactor file strcutures of fault injection filter
* Rewrite the Json parsing/assembling logic again
* Added logic for aborting streaming RPC && resolve comments
* Revert "Revert "xDS HTTP filter support for gRPC client" (#25555)"
This reverts commit 785a128a83.
* xds_end2end_test: avoid flakes from lingering shutdown from previous test
Interop reported an error for a present match and it is discovered this
case is missing from unit test. We have test for present (false) and we
have special case test but we don't have the normal present (true) test.
We also had a bug in a our code:
if (!value.has_value()) {
if (header_matcher.type ==
XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PRESENT) {
return !header_matcher.present_match;
} else {
// For all other header matcher types, we need the header value to
// exist to consider matches.
return false;
}
}
switch (header_matcher.type) {
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::EXACT:
return value.value() == header_matcher.string_matcher;
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::REGEX:
return RE2::FullMatch(value.value().data(), *header_matcher.regex_match);
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::RANGE:
int64_t int_value;
if (!absl::SimpleAtoi(value.value(), &int_value)) {
return false;
}
return int_value >= header_matcher.range_start &&
int_value < header_matcher.range_end;
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PREFIX:
return absl::StartsWith(value.value(), header_matcher.string_matcher);
case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::SUFFIX:
return absl::EndsWith(value.value(), header_matcher.string_matcher);
default:
return false;
}
Note if header has value, we will go into the swtich but there is no case
XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PRESENT,
which means we would have gone into default and decleared not a match.
The same day this bug was discovered by interop test, https://github.com/grpc/grpc/pull/25122
was submitted and the refactoring fixed the bug.
Nevertheless, I added the test case for the future.