Skip to content

Commit

Permalink
Update Envoy to v1.25.4 (#809)
Browse files Browse the repository at this point in the history
  • Loading branch information
TAOXUY authored Apr 6, 2023
1 parent 7d13063 commit 3d7c8f8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
2 changes: 0 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ build:sanitizer --test_tag_filters=-no_san

# Common flags for Clang
build:clang --action_env=BAZEL_COMPILER=clang
build:clang --linkopt=-fuse-ld=lld-14

# Compile with the Scudo allocator
# https://llvm.org/docs/ScudoHardenedAllocator.html
Expand Down Expand Up @@ -76,7 +75,6 @@ build:asan --test_env=ASAN_SYMBOLIZER_PATH

build:clang-asan --config=asan
build:clang-asan --action_env=ENVOY_UBSAN_VPTR=1
build:clang-asan --linkopt -fuse-ld=lld-14
build:clang-asan --copt -fno-sanitize=vptr,function
build:clang-asan --linkopt -fno-sanitize=vptr,function
build:clang-asan --copt -fno-optimize-sibling-calls
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.1
6.1.0
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# 3) Check if envoy_build_config/extensions_build_config.bzl is up-to-date.
# Try to match it with the one in source/extensions and comment out unneeded extensions.

ENVOY_SHA1 = "b80c0bccd8428d06f5d1a3b9e09531a6a65ea948" # Top of tree at 2022-11-30: > v1.24.0
ENVOY_SHA1 = "13667370008884b39712b9d83ddb1d1626dbad32" # v1.25.4, 2023.04.05

ENVOY_SHA256 = "c4a7e83d70217ead328d78cb8a809565c94415301baa4e90724088d6458affb1"
ENVOY_SHA256 = "872237bc9117bb5f18afcea3d91a6512b34d214cefad7cbdd3b31b2e7097c48b"

http_archive(
name = "envoy",
Expand Down
54 changes: 30 additions & 24 deletions src/envoy/http/grpc_metadata_scrubber/filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ TEST_F(GrpcMetadataScrubberFilterTest, ContentLengthRemoved) {
EXPECT_EQ(Envoy::Http::FilterHeadersStatus::Continue,
filter_->encodeHeaders(headers, false));

EXPECT_EQ(Envoy::TestUtility::findCounter(mock_factory_context_.scope_,
"grpc_metadata_scrubber.all")
->value(),
1L);
EXPECT_EQ(Envoy::TestUtility::findCounter(mock_factory_context_.scope_,
"grpc_metadata_scrubber.removed")
->value(),
1L);
EXPECT_EQ(
Envoy::TestUtility::findCounter(mock_factory_context_.scope_.store(),
"grpc_metadata_scrubber.all")
->value(),
1L);
EXPECT_EQ(
Envoy::TestUtility::findCounter(mock_factory_context_.scope_.store(),
"grpc_metadata_scrubber.removed")
->value(),
1L);
// Content-Length is removed
EXPECT_TRUE(headers.ContentLength() == nullptr);
}
Expand All @@ -69,14 +71,16 @@ TEST_F(GrpcMetadataScrubberFilterTest, WrongContentType) {
EXPECT_EQ(Envoy::Http::FilterHeadersStatus::Continue,
filter_->encodeHeaders(headers, false));

EXPECT_EQ(Envoy::TestUtility::findCounter(mock_factory_context_.scope_,
"grpc_metadata_scrubber.all")
->value(),
1L);
EXPECT_EQ(Envoy::TestUtility::findCounter(mock_factory_context_.scope_,
"grpc_metadata_scrubber.removed")
->value(),
0L);
EXPECT_EQ(
Envoy::TestUtility::findCounter(mock_factory_context_.scope_.store(),
"grpc_metadata_scrubber.all")
->value(),
1L);
EXPECT_EQ(
Envoy::TestUtility::findCounter(mock_factory_context_.scope_.store(),
"grpc_metadata_scrubber.removed")
->value(),
0L);
// Content-Length is not removed
EXPECT_TRUE(headers.ContentLength() != nullptr);
}
Expand All @@ -87,14 +91,16 @@ TEST_F(GrpcMetadataScrubberFilterTest, NotContentLength) {
EXPECT_EQ(Envoy::Http::FilterHeadersStatus::Continue,
filter_->encodeHeaders(headers, false));

EXPECT_EQ(Envoy::TestUtility::findCounter(mock_factory_context_.scope_,
"grpc_metadata_scrubber.all")
->value(),
1L);
EXPECT_EQ(Envoy::TestUtility::findCounter(mock_factory_context_.scope_,
"grpc_metadata_scrubber.removed")
->value(),
0L);
EXPECT_EQ(
Envoy::TestUtility::findCounter(mock_factory_context_.scope_.store(),
"grpc_metadata_scrubber.all")
->value(),
1L);
EXPECT_EQ(
Envoy::TestUtility::findCounter(mock_factory_context_.scope_.store(),
"grpc_metadata_scrubber.removed")
->value(),
0L);
}

} // namespace
Expand Down

0 comments on commit 3d7c8f8

Please sign in to comment.