Skip to content

Revert "Support api config source without cluster names (#2999)"#3018

Merged
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
htuch:rollback-api-config-source
Apr 6, 2018
Merged

Revert "Support api config source without cluster names (#2999)"#3018
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
htuch:rollback-api-config-source

Conversation

@htuch
Copy link
Copy Markdown
Member

@htuch htuch commented Apr 6, 2018

This reverts commit 01e75f9.

Discussion on #envoy-users revealed that this is going to break operationally for folks who are
trying to roll forward binaries with the same config, there's no config that can work both
before/after.

Signed-off-by: Harvey Tuch htuch@google.com

)"

This reverts commit 01e75f9.

Discuession on #envoy-users revealed that this is going to break operationally for folks who are
trying to roll forward binaries with the same config, there's no config that can work both
before/after.

Signed-off-by: Harvey Tuch <htuch@google.com>
@htuch
Copy link
Copy Markdown
Member Author

htuch commented Apr 6, 2018

@ambuc FYI; we can discuss Monday, but we need to weaken one of the checks here to avoid folks breaking when they are rolling forward binaries without config. Most of this PR can be re-reverted as is.

@mattklein123 mattklein123 merged commit fdcbe10 into envoyproxy:master Apr 6, 2018
ambuc added a commit to ambuc/envoy that referenced this pull request Apr 9, 2018
…yproxy#2999)" (envoyproxy#3018)"

This reverts commit fdcbe10.

Signed-off-by: James Buckland <jbuckland@google.com>
htuch pushed a commit that referenced this pull request Apr 11, 2018
This reverts #3018, which reverted #2999. Therefore this PR is similar to #2999, except that
77b292c allows REST/gRPC config mismatch errors to warn instead of throwing an error. Hopefully this solves the issue for users who were unable to roll forward their binaries while keeping the same config.

Changelist for #2999:

To support the deprecation of cluster_names in the api_config_source (#2860), I

added a more verbose error in utility.cc for GRPC api_config_sources with any named clusters
hunted down places in tests where api_config_source.cluster_names()[0] was implicitly used (assuming that API would be GRPC and would have cluster names).
renamed factoryForApiConfigSource to factoryForGrpcApiConfigSource, as it already implicitly returns a Grpc::AsyncClientFactoryPtr, and gave a more verbose error for when the user passes a config with cluster_names set.
separated out checkApiConfigSourceSubscriptionBackingCluster into checkApiConfigSourceNames, which does the gRPC services v. cluster names validation, and - checkApiConfigSourceSubscriptionBackingCluster, which actually validates the cluster name against the clusters map.
more completely covered the tests for the branching cases for non-gRPC API configs which happened to have grpc services defined.
Risk Level: Low

Testing: bazel test test/... all passed.

Fixed #2680
Fixed #2902

Signed-off-by: James Buckland <jbuckland@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants