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

Xds mux unification: introduced unifed mux implementation #17352

Merged
merged 61 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
4993962
Introduced a unified mux implementation
Jun 16, 2021
c43f23c
Removed init fetch timeout from the mux
Jul 9, 2021
3308ced
delta mux tests are passing now
Jul 14, 2021
4a66a31
Moved most of mux functionality into the base class
Jul 14, 2021
084a576
Added more mux tests
Jul 14, 2021
b2b5729
Merge remote-tracking branch 'upstream/main' into xds-unification-part-2
Jul 14, 2021
916d8ba
Fixed vuild failure
Jul 14, 2021
6bed794
Fixed formatting
Jul 14, 2021
7289b6e
Fixing formatting
Jul 14, 2021
968b68c
Fixing formatting
Jul 14, 2021
25d7134
Added tests to improve test coverage
Jul 16, 2021
6414bf7
Merge branch 'main' into xds-unification-mux
Jul 21, 2021
8aa55b8
small refactoring
Jul 22, 2021
d9e3966
Added grpc_mux_impl.h to code coverage exceptions with 69.8 coverage
Jul 22, 2021
4947a4b
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Jul 22, 2021
421b56e
Fixed per-extension coverage for xds_mux
Jul 23, 2021
93ea6f5
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Jul 27, 2021
284cdca
Moved grpc_stream_ from concrete classes into the base
Jul 28, 2021
1fd1c36
removed paused() method from mux interface
Jul 28, 2021
a11a2dc
Removed BaseGrpcStream interface
Jul 28, 2021
2450ab8
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Jul 28, 2021
52a2b1a
Ported support for mux shutdown
Jul 28, 2021
d156273
Added comments re: GrpcMuxImpl template parameters
Jul 28, 2021
4fabd09
Adjusted test coverage for xds_mux
Jul 29, 2021
9da89e1
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Jul 29, 2021
026d42d
Reponded to feedback
Aug 3, 2021
c5c8048
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 3, 2021
e094de6
Removed mutex from XdsMux::AllMuxesState
Aug 3, 2021
262f3fc
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 4, 2021
08e71af
Trying to fix failing tests
Aug 4, 2021
f551585
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 4, 2021
c564840
Trying to fix test failures
Aug 4, 2021
b3d0f1c
Fixing tests
Aug 4, 2021
9219521
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 9, 2021
2f169b9
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 16, 2021
a317d84
Fixing build failure: removed v2_link_hacks
Aug 16, 2021
5dd4162
Fixed formatting
Aug 16, 2021
3568c20
Fixing build
Aug 17, 2021
335d7d6
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 17, 2021
533bb6f
trying to fix windows build
Aug 17, 2021
f8178dc
Fixed formatting
Aug 17, 2021
5ac0553
Trying to fix tests under windows
Aug 17, 2021
03f7a7c
Revert "Trying to fix tests under windows"
Aug 17, 2021
de40b51
Trying to fix test failures on Windows
Aug 17, 2021
58837b7
Trying to fix test failures on Windows
Aug 17, 2021
2a7a5af
Trying to fix test failures on Windows
Aug 17, 2021
dfe3515
Revert "Trying to fix test failures on Windows"
Aug 18, 2021
ab0cab5
Revert "Trying to fix test failures on Windows"
Aug 18, 2021
349de21
Revert "Trying to fix test failures on Windows"
Aug 18, 2021
cda496e
Trying to fix test failures under Windows
Aug 18, 2021
3777c61
Revert "Trying to fix test failures under Windows"
Aug 18, 2021
1b5564c
Trying to fix test failures under Windows
Aug 18, 2021
1970420
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 18, 2021
95075f9
Trying to fix test failures under Windows
Aug 18, 2021
1e58a3d
Trying to fix test failures under Windows
Aug 18, 2021
ba094fb
Revert "Trying to fix test failures under Windows"
Aug 18, 2021
e169379
Trying to fix test failures under Windows
Aug 18, 2021
893ce72
Trying to fix test failures under Windows
Aug 18, 2021
1ab61ad
Trying to fix test failures under Windows
Aug 18, 2021
bfde33b
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 18, 2021
cd20489
Merge remote-tracking branch 'upstream/main' into xds-unification-mux
Aug 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions envoy/config/grpc_mux.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class GrpcMux {

virtual void requestOnDemandUpdate(const std::string& type_url,
const absl::flat_hash_set<std::string>& for_update) PURE;

// TODO (dmitri-d) remove this when legacy muxes have been removed
virtual bool isUnified() const { return false; }
};

using GrpcMuxPtr = std::unique_ptr<GrpcMux>;
Expand Down
20 changes: 20 additions & 0 deletions source/common/config/xds_mux/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,23 @@ envoy_cc_library(
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)

envoy_cc_library(
name = "grpc_mux_lib",
srcs = ["grpc_mux_impl.cc"],
hdrs = ["grpc_mux_impl.h"],
deps = [
":delta_subscription_state_lib",
":sotw_subscription_state_lib",
"//envoy/event:dispatcher_interface",
"//envoy/grpc:async_client_interface",
"//source/common/config:grpc_stream_lib",
"//source/common/config:pausable_ack_queue_lib",
"//source/common/config:version_converter_lib",
"//source/common/config:watch_map_lib",
"//source/common/config:xds_context_params_lib",
"//source/common/config:xds_resource_lib",
"//source/common/memory:utils_lib",
"@envoy_api//envoy/service/discovery/v3:pkg_cc_proto",
],
)
14 changes: 14 additions & 0 deletions source/common/config/xds_mux/delta_subscription_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ class DeltaSubscriptionState
std::set<std::string> names_removed_;
};

class DeltaSubscriptionStateFactory : public SubscriptionStateFactory<DeltaSubscriptionState> {
public:
DeltaSubscriptionStateFactory(Event::Dispatcher& dispatcher) : dispatcher_(dispatcher) {}
~DeltaSubscriptionStateFactory() override = default;
std::unique_ptr<DeltaSubscriptionState>
makeSubscriptionState(const std::string& type_url, UntypedConfigUpdateCallbacks& callbacks,
OpaqueResourceDecoder&, const bool wildcard) override {
return std::make_unique<DeltaSubscriptionState>(type_url, callbacks, dispatcher_, wildcard);
}

private:
Event::Dispatcher& dispatcher_;
};

} // namespace XdsMux
} // namespace Config
} // namespace Envoy
Loading