Skip to content

Commit

Permalink
config: update xDS V2 deprecation error (envoyproxy#19123)
Browse files Browse the repository at this point in the history
Fixes broken link and updates error message to note that xDS V2 support has been removed. The current link is only applicable up through v1.17 docs. A similar fix should likely be applied to the release/v1.18 branch too.

Risk Level: Low
Testing: Manual
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Mike Morris <[email protected]>
  • Loading branch information
mikemorris authored Jan 25, 2022
1 parent 4b38a99 commit d343d41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions source/common/config/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ envoy_cc_library(
"//source/common/stats:stats_lib",
"//source/common/stats:stats_matcher_lib",
"//source/common/stats:tag_producer_lib",
"//source/common/version:api_version_lib",
"@com_github_cncf_udpa//udpa/type/v1:pkg_cc_proto",
"@com_github_cncf_udpa//xds/type/v3:pkg_cc_proto",
"@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto",
Expand Down
11 changes: 7 additions & 4 deletions source/common/config/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "source/common/protobuf/utility.h"
#include "source/common/runtime/runtime_features.h"
#include "source/common/singleton/const_singleton.h"
#include "source/common/version/api_version.h"
#include "source/common/version/api_version_struct.h"

#include "udpa/type/v1/typed_struct.pb.h"
#include "xds/type/v3/typed_struct.pb.h"
Expand Down Expand Up @@ -198,12 +200,13 @@ class Utility {
if (transport_api_version == envoy::config::core::v3::ApiVersion::AUTO ||
transport_api_version == envoy::config::core::v3::ApiVersion::V2) {
Runtime::LoaderSingleton::getExisting()->countDeprecatedFeatureUse();
const ApiVersion version = ApiVersionInfo::apiVersion();
const std::string& warning = fmt::format(
"V2 (and AUTO) xDS transport protocol versions are deprecated in {}. "
"The v2 xDS major version is deprecated and disabled by default. Support for v2 will be "
"removed from Envoy at the start of Q1 2021. You may make use of v2 in Q4 2020 by "
"following the advice in https://www.envoyproxy.io/docs/envoy/latest/faq/api/transition.",
api_config_source.DebugString());
"The v2 xDS major version has been removed and is no longer supported. "
"You may be missing explicit V3 configuration of the transport API version, "
"see the advice in https://www.envoyproxy.io/docs/envoy/v{}.{}.{}/faq/api/envoy_v3.",
api_config_source.DebugString(), version.major, version.minor, version.patch);
ENVOY_LOG_MISC(warn, warning);
throw DeprecatedMajorVersionException(warning);
}
Expand Down

0 comments on commit d343d41

Please sign in to comment.