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

fix onConfigUpdate #4943

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ bind(
# 1. Determine SHA256 `wget https://github.com/envoyproxy/envoy/archive/$COMMIT.tar.gz && sha256sum $COMMIT.tar.gz`
# 2. Update .bazelversion, envoy.bazelrc and .bazelrc if needed.
#
# Commit date: 2023-09-06
ENVOY_SHA = "403d1db30f55721eb98ee655e61b5e4c73da6645"
# Commit date: 2023-09-08
ENVOY_SHA = "6ba0ef69686011e1fb8d92471f8c839e34973f98"

ENVOY_SHA256 = "1c3050e103c73fd02b71cdf396998402fe21e334c08b34df7f86c44365999f99"
ENVOY_SHA256 = "defafa8e1412f737ee428acda5b4c413d9699ce917082265417b88e292e1b7f5"

ENVOY_ORG = "envoyproxy"

Expand Down
12 changes: 7 additions & 5 deletions source/extensions/common/workload_discovery/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class WorkloadMetadataProviderImpl : public WorkloadMetadataProvider, public Sin

private:
// Config::SubscriptionCallbacks
void onConfigUpdate(const std::vector<Config::DecodedResourceRef>& resources,
const std::string&) override {
absl::Status onConfigUpdate(const std::vector<Config::DecodedResourceRef>& resources,
const std::string&) override {
AddressIndexSharedPtr index = std::make_shared<AddressIndex>();
for (const auto& resource : resources) {
const auto& workload =
Expand All @@ -143,10 +143,11 @@ class WorkloadMetadataProviderImpl : public WorkloadMetadataProvider, public Sin
}
}
parent_.reset(index);
return absl::OkStatus();
}
void onConfigUpdate(const std::vector<Config::DecodedResourceRef>& added_resources,
const Protobuf::RepeatedPtrField<std::string>& removed_resources,
const std::string&) override {
absl::Status onConfigUpdate(const std::vector<Config::DecodedResourceRef>& added_resources,
const Protobuf::RepeatedPtrField<std::string>& removed_resources,
const std::string&) override {
AddressIndexSharedPtr added = std::make_shared<AddressIndex>();
for (const auto& resource : added_resources) {
const auto& workload =
Expand All @@ -163,6 +164,7 @@ class WorkloadMetadataProviderImpl : public WorkloadMetadataProvider, public Sin
removed->push_back(resource);
}
parent_.update(added, removed);
return absl::OkStatus();
}
void onConfigUpdateFailed(Config::ConfigUpdateFailureReason, const EnvoyException*) override {
// Do nothing - feature is automatically disabled.
Expand Down