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

WIP: VHDS: on-demand updates #6552

Closed
wants to merge 30 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f66b55a
Base implementation of VHDS
Jan 22, 2019
0e6c97e
additional formatting fixes
Apr 3, 2019
b447f33
More formatting fixes
Apr 3, 2019
2da973f
more formatting fixes
Apr 3, 2019
21bb7af
Fixing test failures
Apr 3, 2019
2a6c77f
wrapped update details into a dedicated class
Apr 3, 2019
dbafd58
fixing build failures
Apr 3, 2019
200aa3d
Fixing build failures
Apr 4, 2019
68d7c52
Added more vhds tests
Apr 4, 2019
e692f0e
Fixed formatting errors
Apr 4, 2019
38da6ab
fixes based on the PR feedback
Apr 10, 2019
9a14662
fixed a spelling mistake
Apr 10, 2019
33f795b
moved out VhdsSubscription class into its own file
Apr 10, 2019
7a40f59
VHDS: Filter-based on-demand RDS updates
Jan 22, 2019
78acd5c
Merged changes from master
May 14, 2019
96a6c90
Fixes after merging latest changes
May 16, 2019
fe73bbd
Reponded to feedback
May 16, 2019
374de2c
Moved on-demand filter to extensions/filters/http/on_demand dir
May 16, 2019
1c8c52f
Merge branch 'master' into vhds-on-demand
May 16, 2019
c5e314a
fix to build kafka extension under python3
May 17, 2019
28e6ad3
Merge branch 'master' into vhds-on-demand
May 29, 2019
bd11db6
Post-merge fixes
May 29, 2019
bf63b6d
Renamed requestRouteConfigUpdate to requestVirtualHostsUpdate, update…
May 29, 2019
bbc38b4
Added comments re: stream restart after route config update
May 29, 2019
01eca26
Fixing build issues
May 29, 2019
72896bb
Fixing build issues
May 29, 2019
2592cce
Fixing build issues
May 30, 2019
e5d9d94
Fixed formatting issues
May 30, 2019
7bab936
Fixing build issues
May 30, 2019
852c51b
Fixing build issues
May 30, 2019
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
Prev Previous commit
Next Next commit
Merge branch 'master' into vhds-on-demand
Signed-off-by: Dmitri Dolguikh <ddolguik@redhat.com>
Dmitri Dolguikh committed May 29, 2019

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
commit 28e6ad336c9ad6a22d97c87d8d940f5c79c64796
16 changes: 16 additions & 0 deletions source/common/router/rds_impl.cc
Original file line number Diff line number Diff line change
@@ -153,10 +153,26 @@ void RdsRouteConfigSubscription::onConfigUpdateFailed(const EnvoyException*) {
init_target_.ready();
}


void RdsRouteConfigSubscription::ondemandUpdate(const std::set<std::string>& aliases) {
if (vhds_subscription_.get() == nullptr)
return;
vhds_subscription_->ondemandUpdate(aliases);

}

bool RdsRouteConfigSubscription::validateUpdateSize(int num_resources) {
if (num_resources == 0) {
ENVOY_LOG(debug, "Missing RouteConfiguration for {} in onConfigUpdate()", route_config_name_);
stats_.update_empty_.inc();
init_target_.ready();
return false;
}
if (num_resources != 1) {
throw EnvoyException(fmt::format("Unexpected RDS resource length: {}", num_resources));
// (would be a return false here)
}
return true;
}

RdsRouteConfigProviderImpl::RdsRouteConfigProviderImpl(
6 changes: 3 additions & 3 deletions test/integration/vhds_integration_test.cc
Original file line number Diff line number Diff line change
@@ -187,10 +187,10 @@ class VhdsIntegrationTest : public HttpIntegrationTest,

EXPECT_TRUE(
compareDeltaDiscoveryRequest(Config::TypeUrl::get().VirtualHost, {}, {}, vhds_stream_));
sendDeltaDiscoveryResponse<envoy::api::v2::route::VirtualHost>({buildVirtualHost()}, {}, "1",
vhds_stream_);
sendDeltaDiscoveryResponse<envoy::api::v2::route::VirtualHost>(
Config::TypeUrl::get().VirtualHost, {buildVirtualHost()}, {}, "1", vhds_stream_);
EXPECT_TRUE(
compareDeltaDiscoveryRequest(Config::TypeUrl::get().VirtualHost, {}, {}, vhds_stream_));
compareDeltaDiscoveryRequest(Config::TypeUrl::get().VirtualHost, {}, {}, vhds_stream_));

// Wait for our statically specified listener to become ready, and register its port in the
// test framework's downstream listener port map.
You are viewing a condensed version of this merge commit. You can view the full changes here.