Skip to content

Commit

Permalink
rename alimesh to higress
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlanni committed Aug 1, 2024
1 parent f4bdca5 commit 7d44bc8
Show file tree
Hide file tree
Showing 131 changed files with 339 additions and 344 deletions.
8 changes: 4 additions & 4 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,11 @@ config_setting(
define_values = {"FUZZING_ENGINE": "oss-fuzz"},
)

# By default we enable AliMesh build. If want to build community
# version then build Envoy with flag of '--define alimesh=false'.
# By default we enable Higress build. If want to build community
# version then build Envoy with flag of '--define higress=false'.
config_setting(
name = "alimesh",
values = {"define": "alimesh=false"},
name = "higress",
values = {"define": "higress=false"},
)

alias(
Expand Down
4 changes: 2 additions & 2 deletions bazel/envoy_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load(
"envoy_select_exported_symbols",
"envoy_stdlib_deps",
"tcmalloc_external_dep",
"envoy_select_alimesh",
"envoy_select_higress",
)

# Envoy C++ binary targets should be specified with this function.
Expand Down Expand Up @@ -87,7 +87,7 @@ def _envoy_linkopts():
"@envoy//bazel:boringssl_fips": [],
"@envoy//bazel:windows_x86_64": [],
"//conditions:default": ["-pie"],
}) + envoy_select_exported_symbols(["-Wl,-E"]) + envoy_select_alimesh(["-lcrypt"])
}) + envoy_select_exported_symbols(["-Wl,-E"]) + envoy_select_higress(["-lcrypt"])

def _envoy_stamped_deps():
return select({
Expand Down
6 changes: 3 additions & 3 deletions bazel/envoy_internal.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def envoy_copts(repository, test = False):
_envoy_select_perf_annotation(["-DENVOY_PERF_ANNOTATION"]) + \
_envoy_select_perfetto(["-DENVOY_PERFETTO"]) + \
envoy_select_google_grpc(["-DENVOY_GOOGLE_GRPC"], repository) + \
envoy_select_alimesh(["-DALIMESH"]) + \
envoy_select_higress(["-DHIGRESS"]) + \
envoy_select_signal_trace(["-DENVOY_HANDLE_SIGNALS"], repository) + \
_envoy_select_path_normalization_by_default(["-DENVOY_NORMALIZE_PATH_BY_DEFAULT"], repository)

Expand Down Expand Up @@ -193,9 +193,9 @@ def _envoy_select_perf_annotation(xs):
"//conditions:default": [],
})

def envoy_select_alimesh(xs):
def envoy_select_higress(xs):
return select({
"@envoy//bazel:alimesh": [],
"@envoy//bazel:higress": [],
"//conditions:default": xs,
})

Expand Down
6 changes: 3 additions & 3 deletions bazel/envoy_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def envoy_cc_library(
tags = [],
deps = [],
strip_include_prefix = None,
alimesh_deps = [],
higress_deps = [],
include_prefix = None,
textual_hdrs = None,
alwayslink = None,
Expand All @@ -113,8 +113,8 @@ def envoy_cc_library(
deps += tcmalloc_external_deps(repository)

deps = deps + select({
"@envoy//bazel:alimesh": [],
"//conditions:default": alimesh_deps,
"@envoy//bazel:higress": [],
"//conditions:default": higress_deps,
})

# If alwayslink is not specified, allow turning it off via --define=library_autolink=disabled
Expand Down
16 changes: 8 additions & 8 deletions bazel/envoy_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ load(
"envoy_select_force_libcpp",
"envoy_stdlib_deps",
"tcmalloc_external_dep",
"envoy_select_alimesh",
"envoy_select_higress",
)

# Envoy C++ related test infrastructure (that want gtest, gmock, but may be
Expand Down Expand Up @@ -73,7 +73,7 @@ def _envoy_test_linkopts():
# TODO(mattklein123): It's not great that we universally link against the following libs.
# In particular, -latomic and -lrt are not needed on all platforms. Make this more granular.
"//conditions:default": ["-pthread", "-lrt", "-ldl"],
}) + envoy_select_force_libcpp([], ["-lstdc++fs", "-latomic"]) + envoy_select_alimesh(["-lcrypt"]) + envoy_dbg_linkopts() + envoy_select_exported_symbols(["-Wl,-E"])
}) + envoy_select_force_libcpp([], ["-lstdc++fs", "-latomic"]) + envoy_select_higress(["-lcrypt"]) + envoy_dbg_linkopts() + envoy_select_exported_symbols(["-Wl,-E"])

# Envoy C++ fuzz test targets. These are not included in coverage runs.
def envoy_cc_fuzz_test(
Expand Down Expand Up @@ -152,7 +152,7 @@ def envoy_cc_test(
repository = "",
external_deps = [],
deps = [],
alimesh_deps = [],
higress_deps = [],
tags = [],
args = [],
copts = [],
Expand All @@ -167,8 +167,8 @@ def envoy_cc_test(
coverage_tags = tags + ([] if coverage else ["nocoverage"])

deps = deps + select({
"@envoy//bazel:alimesh": [],
"//conditions:default": alimesh_deps,
"@envoy//bazel:higress": [],
"//conditions:default": higress_deps,
})

native.cc_test(
Expand Down Expand Up @@ -205,7 +205,7 @@ def envoy_cc_test_library(
data = [],
external_deps = [],
deps = [],
alimesh_deps = [],
higress_deps = [],
repository = "",
tags = [],
include_prefix = None,
Expand All @@ -214,8 +214,8 @@ def envoy_cc_test_library(
**kargs):

deps = deps + select({
"@envoy//bazel:alimesh": [],
"//conditions:default": alimesh_deps,
"@envoy//bazel:higress": [],
"//conditions:default": higress_deps,
})

disable_pch = kargs.pop("disable_pch", True)
Expand Down
7 changes: 1 addition & 6 deletions contrib/contrib_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ CONTRIB_EXTENSIONS = {

"envoy.tls.key_providers.cryptomb": "//contrib/cryptomb/private_key_providers/source:config",
"envoy.tls.key_providers.qat": "//contrib/qat/private_key_providers/source:config",
#
# Tracers
#

"envoy.tracers.eagleeye": "//contrib/eagleeye/tracers/source:config",

#
# Custom cluster plugins
Expand All @@ -71,7 +66,7 @@ CONTRIB_EXTENSIONS = {
# Connection Balance extensions
#

# "envoy.network.connection_balance.dlb": "//contrib/network/connection_balance/dlb/source:connection_balancer",
"envoy.network.connection_balance.dlb": "//contrib/network/connection_balance/dlb/source:connection_balancer",

#
# Regex engines
Expand Down
6 changes: 3 additions & 3 deletions envoy/http/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ class StreamDecoderFilterCallbacks : public virtual StreamFilterCallbacks,
* Allows modifying the decoding buffer. May only be called before any data has been continued
* past the calling filter.
*/
#if defined(ALIMESH)
#if defined(HIGRESS)
virtual void modifyDecodingBuffer(std::function<void(Buffer::Instance&)> callback,
bool /* backup_for_replace */) {
return modifyDecodingBuffer(callback);
Expand Down Expand Up @@ -729,7 +729,7 @@ class StreamDecoderFilterCallbacks : public virtual StreamFilterCallbacks,
* @param original_response_headers Headers used for logging in the access logs and for charging
* stats. Ignored if null.
*/
#if defined(ALIMESH)
#if defined(HIGRESS)
virtual bool recreateStream(const ResponseHeaderMap* original_response_headers,
bool /* use_original_request_body */) {
return recreateStream(original_response_headers);
Expand Down Expand Up @@ -764,7 +764,7 @@ class StreamDecoderFilterCallbacks : public virtual StreamFilterCallbacks,
*/
virtual absl::optional<absl::string_view> upstreamOverrideHost() const PURE;

#if defined(ALIMESH)
#if defined(HIGRESS)
virtual bool needBuffering() const { return false; }
virtual void setNeedBuffering(bool) {}
#endif
Expand Down
2 changes: 1 addition & 1 deletion envoy/http/header_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class LowerCaseString {
// Implicit conversion to absl::string_view.
operator absl::string_view() const { return string_; }

#if defined(ALIMESH)
#if defined(HIGRESS)
virtual ~LowerCaseString() = default;

protected:
Expand Down
2 changes: 1 addition & 1 deletion envoy/router/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ envoy_cc_library(
envoy_cc_library(
name = "router_interface",
hdrs = ["router.h"],
alimesh_deps = [
higress_deps = [
"//contrib/envoy/http:active_redirect_policy_interface",
],
external_deps = ["abseil_optional"],
Expand Down
4 changes: 2 additions & 2 deletions envoy/router/router.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include "absl/types/optional.h"

#if defined(ALIMESH)
#if defined(HIGRESS)
#include "contrib/envoy/http/active_redirect_policy.h"
#endif

Expand Down Expand Up @@ -1102,7 +1102,7 @@ class RouteEntry : public ResponseEntry {
*/
virtual const std::string& routeName() const PURE;

#if defined(ALIMESH)
#if defined(HIGRESS)
virtual const InternalActiveRedirectPolicy& internalActiveRedirectPolicy() const PURE;
#endif
/**
Expand Down
4 changes: 2 additions & 2 deletions envoy/router/scopes.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class ScopeKeyBuilder {
public:
virtual ~ScopeKeyBuilder() = default;

#if defined(ALIMESH)
#if defined(HIGRESS)
virtual ScopeKeyPtr computeScopeKey(const Http::HeaderMap& headers,
const StreamInfo::StreamInfo* info,
std::function<ScopeKeyPtr()>& recompute) const PURE;
Expand Down Expand Up @@ -122,7 +122,7 @@ class ScopedConfig : public Envoy::Config::ConfigProvider::Config {
*/
virtual ConfigConstSharedPtr getRouteConfig(const ScopeKeyPtr& scope_key) const PURE;

#if defined(ALIMESH)
#if defined(HIGRESS)
virtual ConfigConstSharedPtr
getRouteConfig(const ScopeKeyBuilder* builder, const Http::HeaderMap& headers,
const StreamInfo::StreamInfo* info = nullptr) const PURE;
Expand Down
2 changes: 1 addition & 1 deletion envoy/stream_info/stream_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ class StreamInfo {
*/
virtual void setDownstreamTransportFailureReason(absl::string_view failure_reason) PURE;

#ifdef ALIMESH
#ifdef HIGRESS
/**
* @param key the filter state key set by wasm filter.
* @param value the filter state value set by wasm filter.
Expand Down
4 changes: 2 additions & 2 deletions envoy/upstream/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ envoy_cc_library(
"@envoy_api//envoy/config/cluster/v3:pkg_cc_proto",
"@envoy_api//envoy/config/core/v3:pkg_cc_proto",
],
alimesh_deps = [
higress_deps = [
"//envoy/redis:async_client_interface",
],
)
Expand Down Expand Up @@ -145,7 +145,7 @@ envoy_cc_library(
"//envoy/http:async_client_interface",
"//envoy/tcp:async_tcp_client_interface",
],
alimesh_deps = [
higress_deps = [
"//envoy/redis:async_client_interface",
],
)
Expand Down
2 changes: 1 addition & 1 deletion envoy/upstream/outlier_detection.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class DetectorHostMonitor {
*/
virtual double successRate(SuccessRateMonitorType type) const PURE;

#if defined(ALIMESH)
#if defined(HIGRESS)
virtual void forceEjectHost() PURE;
#endif
};
Expand Down
2 changes: 1 addition & 1 deletion envoy/upstream/thread_local_cluster.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ThreadLocalCluster {
* owns the client.
*/
virtual Http::AsyncClient& httpAsyncClient() PURE;
#if defined(ALIMESH)
#if defined(HIGRESS)
virtual Redis::AsyncClient& redisAsyncClient() PURE;
#endif

Expand Down
2 changes: 1 addition & 1 deletion source/common/http/async_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const AsyncStreamImpl::RouteEntryImpl::ConnectConfigOptRef
AsyncStreamImpl::RouteEntryImpl::connect_config_nullopt_;
const std::list<LowerCaseString> AsyncStreamImpl::NullCommonConfig::internal_only_headers_;

#if defined(ALIMESH)
#if defined(HIGRESS)
const Router::InternalActiveRedirectPoliciesImpl
AsyncStreamImpl::RouteEntryImpl::internal_active_redirect_policy_;
#endif
Expand Down
4 changes: 2 additions & 2 deletions source/common/http/async_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class AsyncStreamImpl : public virtual AsyncClient::Stream,

const ConnectConfigOptRef connectConfig() const override { return connect_config_nullopt_; }

#if defined(ALIMESH)
#if defined(HIGRESS)
const Router::InternalActiveRedirectPolicy& internalActiveRedirectPolicy() const override {
return internal_active_redirect_policy_;
}
Expand All @@ -349,7 +349,7 @@ class AsyncStreamImpl : public virtual AsyncClient::Stream,
static const std::multimap<std::string, std::string> opaque_config_;
static const NullPathMatchCriterion path_match_criterion_;

#if defined(ALIMESH)
#if defined(HIGRESS)
static const Router::InternalActiveRedirectPoliciesImpl internal_active_redirect_policy_;
#endif

Expand Down
2 changes: 1 addition & 1 deletion source/common/http/conn_manager_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class ConnectionManagerConfig {
*/
virtual bool addProxyProtocolConnectionState() const PURE;

#if defined(ALIMESH)
#if defined(HIGRESS)
/**
* @return the timeout seconds will be set in the "Keep-Alive" response header.
* Zero indicates this behavior is disabled.
Expand Down
12 changes: 6 additions & 6 deletions source/common/http/conn_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void ConnectionManagerImpl::RdsRouteConfigUpdateRequester::requestRouteConfigUpd
const auto& host_header = absl::AsciiStrToLower(parent_.request_headers_->getHostValue());
requestVhdsUpdate(host_header, thread_local_dispatcher, std::move(route_config_updated_cb));
return;
#if defined(ALIMESH)
#if defined(HIGRESS)
Router::ScopeKeyPtr scope_key = parent_.snapped_scoped_routes_config_->computeScopeKey(
scope_key_builder_.ptr(), *parent_.request_headers_, &parent_.connection()->streamInfo());
#else
Expand Down Expand Up @@ -1003,7 +1003,7 @@ void ConnectionManagerImpl::ActiveStream::onStreamMaxDurationReached() {
void ConnectionManagerImpl::ActiveStream::chargeStats(const ResponseHeaderMap& headers) {
uint64_t response_code = Utility::getResponseStatus(headers);

#if defined(ALIMESH)
#if defined(HIGRESS)
if (Grpc::Common::hasGrpcContentType(headers)) {
absl::optional<Grpc::Status::GrpcStatus> grpc_status = Grpc::Common::getGrpcStatus(headers);
if (grpc_status.has_value()) {
Expand Down Expand Up @@ -1516,7 +1516,7 @@ void ConnectionManagerImpl::startDrainSequence() {
}

void ConnectionManagerImpl::ActiveStream::snapScopedRouteConfig() {
#if defined(ALIMESH)
#if defined(HIGRESS)
snapped_route_config_ = snapped_scoped_routes_config_->getRouteConfig(
connection_manager_.config_.scopeKeyBuilder().ptr(), *request_headers_,
&connection()->streamInfo());
Expand Down Expand Up @@ -1796,7 +1796,7 @@ void ConnectionManagerImpl::ActiveStream::encodeHeaders(ResponseHeaderMap& heade
blockRouteCache();
}

#if defined(ALIMESH)
#if defined(HIGRESS)
if (!state_.is_tunneling_ && connection_manager_.codec_->protocol() < Protocol::Http2) {
if (connection_manager_.drain_state_ != DrainState::NotDraining) {
// If the connection manager is draining send "Connection: Close" on HTTP/1.1 connections.
Expand Down Expand Up @@ -2153,7 +2153,7 @@ void ConnectionManagerImpl::ActiveStream::onRequestDataTooLarge() {
connection_manager_.stats_.named_.downstream_rq_too_large_.inc();
}

#if defined(ALIMESH)
#if defined(HIGRESS)
void ConnectionManagerImpl::ActiveStream::recreateStream(
StreamInfo::FilterStateSharedPtr filter_state) {
return recreateStream(filter_state, false);
Expand All @@ -2168,7 +2168,7 @@ void ConnectionManagerImpl::ActiveStream::recreateStream(
response_encoder_ = nullptr;

Buffer::InstancePtr request_data = std::make_unique<Buffer::OwnedImpl>();
#if defined(ALIMESH)
#if defined(HIGRESS)
bool proxy_body = false;
const auto& original_buffered_request_data = filter_manager_.originalBufferedRequestData();
if (use_original_request_body && original_buffered_request_data != nullptr &&
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/conn_manager_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class ConnectionManagerImpl : Logger::Loggable<Logger::Id::http>,
}
void disarmRequestTimeout() override;
void resetIdleTimer() override;
#if defined(ALIMESH)
#if defined(HIGRESS)
void recreateStream(StreamInfo::FilterStateSharedPtr filter_state,
bool backup_for_replace) override;
#endif
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/conn_manager_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ ConnectionManagerUtility::MutateRequestHeadersResult ConnectionManagerUtility::m
cleanInternalHeaders(request_headers, edge_request, route_config.internalOnlyHeaders());
}

#if defined(ALIMESH)
#if defined(HIGRESS)
request_headers.setReferenceKey(Http::CustomHeaders::get().AliExtendedValues.XEnvoyOriginalHost,
request_headers.getHostValue());
#endif
Expand Down
Loading

0 comments on commit 7d44bc8

Please sign in to comment.