From 65f81b2c12445c7558f3275aa14d055807beb883 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Wed, 9 Jul 2025 22:44:41 +0000 Subject: [PATCH 01/12] Update envoy to v1.34.1 --- WORKSPACE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 4189aa289..ff97a6aff 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -39,8 +39,8 @@ 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 = "349011c2ebd40f070510e34f4605bff1da64fb0e" # v1.30.7 -ENVOY_SHA256 = "fee4d8c1005cac9a241e29d51a903b1b369515a8a77e5b7fe320520ae7c7b855" +ENVOY_SHA1 = "c435eeccd4201f8d6a200922b166f5dcee08272b" # v1.34.1 +ENVOY_SHA256 = "2e2068a7f27d72edb82a27f0dc7f7502274d2dae11c4422bb1b5edecf7acde6a" http_archive( name = "envoy", From 8163b25e07cd46762f30f7a987877e8f3fa53292 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Wed, 9 Jul 2025 22:44:41 +0000 Subject: [PATCH 02/12] Update envoy to v1.34.1 --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index dfda3e0b4..f22d756da 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.1.0 +6.5.0 From 51291d9f82ef48c671f17dc4e42b5e0198c7447c Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Wed, 9 Jul 2025 23:29:36 +0000 Subject: [PATCH 03/12] Update to v1.32.7 --- WORKSPACE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index ff97a6aff..4e4fa760c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -39,8 +39,8 @@ 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 = "c435eeccd4201f8d6a200922b166f5dcee08272b" # v1.34.1 -ENVOY_SHA256 = "2e2068a7f27d72edb82a27f0dc7f7502274d2dae11c4422bb1b5edecf7acde6a" +ENVOY_SHA1 = "3d1aad79eb07f3eb19fd33583649f8b1d0792783" # v1.32.7 +ENVOY_SHA256 = "8d76b2a2a1c52e741f2b9ed50b745987724e8edc8e1a070ee85137af7ed2ef4e" http_archive( name = "envoy", From da3e58793b5089382d1ee7b673d53661b68b2518 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 01:10:12 +0000 Subject: [PATCH 04/12] Update to v1.31.9 --- WORKSPACE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 4e4fa760c..17d9c97cc 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -39,8 +39,8 @@ 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 = "3d1aad79eb07f3eb19fd33583649f8b1d0792783" # v1.32.7 -ENVOY_SHA256 = "8d76b2a2a1c52e741f2b9ed50b745987724e8edc8e1a070ee85137af7ed2ef4e" +ENVOY_SHA1 = "b71fd3b8bbdb1c1734db630febd4427aabefddec" # v1.31.9 +ENVOY_SHA256 = "c39180a4144a033ba76705b39d04c71a43697f4dd14fd713eb1bd279d4157285" http_archive( name = "envoy", From 79c0c38fb8915243feee5897e1f52adc08b83487 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 03:08:16 +0000 Subject: [PATCH 05/12] Fix build error --- src/envoy/token/token_subscriber.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/envoy/token/token_subscriber.cc b/src/envoy/token/token_subscriber.cc index fd1d396a6..06fdc24b3 100644 --- a/src/envoy/token/token_subscriber.cc +++ b/src/envoy/token/token_subscriber.cc @@ -120,7 +120,7 @@ void TokenSubscriber::refresh() { return; } - const struct Envoy::Http::AsyncClient::RequestOptions options = + const Envoy::Http::AsyncClient::RequestOptions options = Envoy::Http::AsyncClient::RequestOptions() .setTimeout(std::chrono::duration_cast( fetch_timeout_)) From c513cae1eda0968ad5b12d204625978764246c20 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 04:00:39 +0000 Subject: [PATCH 06/12] Fix getTraceId build error --- src/envoy/http/service_control/handler_impl.cc | 2 +- src/envoy/http/service_control/handler_impl_test.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/envoy/http/service_control/handler_impl.cc b/src/envoy/http/service_control/handler_impl.cc index 864566faa..3922358a7 100644 --- a/src/envoy/http/service_control/handler_impl.cc +++ b/src/envoy/http/service_control/handler_impl.cc @@ -376,7 +376,7 @@ void ServiceControlHandlerImpl::callReport( info.response_code_detail = stream_info_.responseCodeDetails().value_or(""); if (!require_ctx_->service_ctx().config().tracing_disabled()) { - info.trace_id = parent_span.getTraceIdAsHex(); + info.trace_id = parent_span.getTraceId(); } require_ctx_->service_ctx().call().callReport(info); diff --git a/src/envoy/http/service_control/handler_impl_test.cc b/src/envoy/http/service_control/handler_impl_test.cc index 789e3595a..1c1f25d94 100644 --- a/src/envoy/http/service_control/handler_impl_test.cc +++ b/src/envoy/http/service_control/handler_impl_test.cc @@ -1153,7 +1153,7 @@ TEST_F(HandlerTest, HandlerCancelFuncNotCalledOnDestroyForSyncOnDone) { TEST_F(HandlerTest, HandlerReportWithoutCheck) { // Test: Test that report fills in the trace id. - EXPECT_CALL(mock_span_, getTraceIdAsHex()).WillOnce(Return("test-trace-id")); + EXPECT_CALL(mock_span_, getTraceId()).WillOnce(Return("test-trace-id")); setPerRouteOperation("get_header_key"); TestRequestHeaderMapImpl headers{ @@ -1177,8 +1177,8 @@ TEST_F(HandlerTest, HandlerReportWithoutCheck) { } TEST_F(HandlerTest, HandlerReportWithoutTraceId) { - // Test getTraceIdAsHex is not called since trace is disabled. - EXPECT_CALL(mock_span_, getTraceIdAsHex()).Times(0); + // Test getTraceId is not called since trace is disabled. + EXPECT_CALL(mock_span_, getTraceId()).Times(0); proto_config_.mutable_services(0)->set_tracing_disabled(true); setPerRouteOperation("get_header_key"); From b50529657af14f576752d5e10bceef4f2527d63b Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 17:13:16 +0000 Subject: [PATCH 07/12] Fix presubmit build failure --- tests/endpoints/grpc_echo/client-test-lib.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/endpoints/grpc_echo/client-test-lib.cc b/tests/endpoints/grpc_echo/client-test-lib.cc index 0a0756308..9463a364c 100644 --- a/tests/endpoints/grpc_echo/client-test-lib.cc +++ b/tests/endpoints/grpc_echo/client-test-lib.cc @@ -111,7 +111,7 @@ absl::Status ProtoToJson( json_options.add_whitespace = true; } if (options & JsonOptions::OUTPUT_DEFAULTS) { - json_options.always_print_primitive_fields = true; + json_options.always_print_fields_with_no_presence = true; } // TODO: Skip going to bytes and use ProtoObjectSource directly. std::string binary = message.SerializeAsString(); From 75f1b44c5bf5b70a3956620c30f6de7fe153c612 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 16:27:34 -0700 Subject: [PATCH 08/12] Try envoy v1.32.7 --- WORKSPACE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 17d9c97cc..ddeb1fa30 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -39,8 +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 = "b71fd3b8bbdb1c1734db630febd4427aabefddec" # v1.31.9 -ENVOY_SHA256 = "c39180a4144a033ba76705b39d04c71a43697f4dd14fd713eb1bd279d4157285" +ENVOY_SHA1 = "3d1aad79eb07f3eb19fd33583649f8b1d0792783" # v1.32.7 + +ENVOY_SHA256 = "8d76b2a2a1c52e741f2b9ed50b745987724e8edc8e1a070ee85137af7ed2ef4e" http_archive( name = "envoy", From f5449a9ac6772b14945955d6cb055243be87495e Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 16:29:14 -0700 Subject: [PATCH 09/12] Revert bazel upgrade --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index f22d756da..dfda3e0b4 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.5.0 +6.1.0 From bd1b02e3e85bb940434f0b5e933511efed519b61 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Thu, 10 Jul 2025 16:58:59 -0700 Subject: [PATCH 10/12] Update bazel for build failure --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index dfda3e0b4..f22d756da 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.1.0 +6.5.0 From fed6a4b4b12363e01690fd71cda036fa0dbbad1d Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Mon, 14 Jul 2025 13:43:30 -0700 Subject: [PATCH 11/12] Fix presubmit build failure --- src/envoy/http/service_control/filter_fuzz_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/envoy/http/service_control/filter_fuzz_test.cc b/src/envoy/http/service_control/filter_fuzz_test.cc index 90842d860..6a13e1703 100644 --- a/src/envoy/http/service_control/filter_fuzz_test.cc +++ b/src/envoy/http/service_control/filter_fuzz_test.cc @@ -155,7 +155,7 @@ DEFINE_PROTO_FUZZER( stream_info->route_ = mock_route; EXPECT_CALL(*mock_route, mostSpecificPerFilterConfig(kFilterName)) .WillRepeatedly( - Invoke([per_route](const std::string&) + Invoke([per_route](std::string_view) -> const Envoy::Router::RouteSpecificFilterConfig* { return per_route.get(); })); From 4be984854798e916e14459591a21b58406748646 Mon Sep 17 00:00:00 2001 From: Yilin Guo Date: Wed, 16 Jul 2025 00:04:38 +0000 Subject: [PATCH 12/12] Update envoy to v1.30.11 --- .gitignore | 1 + DEVELOPER.md | 4 ++-- WORKSPACE | 4 ++-- .../service_control/request_builder.cc | 5 +++-- .../service_control/request_builder_test.cc | 3 +-- .../http/service_control/handler_impl.cc | 2 +- .../http/service_control/handler_impl_test.cc | 6 +++--- tests/endpoints/grpc_echo/client-test-lib.cc | 2 +- .../grpc_echo/proto/api_descriptor.pb | Bin 32813 -> 34819 bytes 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 9d3080155..8a88bf985 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ src/go/proto/ .clwb/ .ijwb/ .idea/ +.vscode/ # C++ coverage generated/ diff --git a/DEVELOPER.md b/DEVELOPER.md index 22feec953..85b684207 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -59,7 +59,7 @@ For example: ***gcr.io/cloudesf-testing/gcpproxy-prow:v20240727-v2.46.0-27-g6c21 Run the following command by replacing the **latest_image_link** with the link found above. ``` -docker run -ti --privileged -v /var/run/docker.sock:/var/run/docker.sock -v ~/esp-v2:/esp-v2 ${latest_image_link} /bin/bash +docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/esp-v2:/esp-v2 ${latest_image_link} /bin/bash ``` #### Change Directory to `esp-v2` @@ -191,7 +191,7 @@ make test-envoy To run integration tests: ``` -make integration-test-run-parallel +make integration-test ``` #### Enable IDE Integration diff --git a/WORKSPACE b/WORKSPACE index ddeb1fa30..52877d452 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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 = "3d1aad79eb07f3eb19fd33583649f8b1d0792783" # v1.32.7 +ENVOY_SHA1 = "63c6a8f4f1e12389ffd94f1ace83cd714ac8e9c3" # v1.30.11 -ENVOY_SHA256 = "8d76b2a2a1c52e741f2b9ed50b745987724e8edc8e1a070ee85137af7ed2ef4e" +ENVOY_SHA256 = "20e4dd8049aef9e89b8dbba721686d3ee7e56a983e8767416b648f0ea63ff4d9" http_archive( name = "envoy", diff --git a/src/api_proxy/service_control/request_builder.cc b/src/api_proxy/service_control/request_builder.cc index 4ce5ecf5a..eba46f119 100644 --- a/src/api_proxy/service_control/request_builder.cc +++ b/src/api_proxy/service_control/request_builder.cc @@ -387,8 +387,9 @@ Status set_credential_id(const SupportedLabel& l, const ReportRequestInfo& info, if (info.check_response_info.error.is_network_error) { (*labels)[l.name] = absl::StrCat(kApiKeyPrefix, "UNKNOWN"); } else { - (*labels)[l.name] = info.check_response_info.api_key_uid.empty() ? absl::StrCat(kApiKeyPrefix, info.api_key) - : info.check_response_info.api_key_uid; + (*labels)[l.name] = info.check_response_info.api_key_uid.empty() + ? absl::StrCat(kApiKeyPrefix, info.api_key) + : info.check_response_info.api_key_uid; } } else { (*labels)[l.name] = absl::StrCat(kApiKeyPrefix, info.api_key); diff --git a/src/api_proxy/service_control/request_builder_test.cc b/src/api_proxy/service_control/request_builder_test.cc index 669af9841..b013b5cc4 100644 --- a/src/api_proxy/service_control/request_builder_test.cc +++ b/src/api_proxy/service_control/request_builder_test.cc @@ -460,7 +460,7 @@ TEST_F(RequestBuilderTest, ReportApiKeyVerifiedWithApiKeyUIDUnknownTest) { info.check_response_info.api_key_uid = "fake_api_key_uid"; info.enable_api_key_uid_reporting = true; info.check_response_info.error = {"UNREACHABLE", true, - ScResponseErrorType::CONSUMER_QUOTA}; + ScResponseErrorType::CONSUMER_QUOTA}; gasv1::ReportRequest request; ASSERT_TRUE(scp_.FillReportRequest(info, &request).ok()); @@ -506,7 +506,6 @@ TEST_F(RequestBuilderTest, ReportApiKeyVerifiedNotReportApiKeyUIDTest) { ASSERT_EQ(fields.at("api_key").string_value(), "api_key_x"); } - TEST_F(RequestBuilderTest, ReportApiKeyNotVerifiedTest) { ReportRequestInfo info; FillOperationInfo(&info); diff --git a/src/envoy/http/service_control/handler_impl.cc b/src/envoy/http/service_control/handler_impl.cc index 3922358a7..864566faa 100644 --- a/src/envoy/http/service_control/handler_impl.cc +++ b/src/envoy/http/service_control/handler_impl.cc @@ -376,7 +376,7 @@ void ServiceControlHandlerImpl::callReport( info.response_code_detail = stream_info_.responseCodeDetails().value_or(""); if (!require_ctx_->service_ctx().config().tracing_disabled()) { - info.trace_id = parent_span.getTraceId(); + info.trace_id = parent_span.getTraceIdAsHex(); } require_ctx_->service_ctx().call().callReport(info); diff --git a/src/envoy/http/service_control/handler_impl_test.cc b/src/envoy/http/service_control/handler_impl_test.cc index 1c1f25d94..789e3595a 100644 --- a/src/envoy/http/service_control/handler_impl_test.cc +++ b/src/envoy/http/service_control/handler_impl_test.cc @@ -1153,7 +1153,7 @@ TEST_F(HandlerTest, HandlerCancelFuncNotCalledOnDestroyForSyncOnDone) { TEST_F(HandlerTest, HandlerReportWithoutCheck) { // Test: Test that report fills in the trace id. - EXPECT_CALL(mock_span_, getTraceId()).WillOnce(Return("test-trace-id")); + EXPECT_CALL(mock_span_, getTraceIdAsHex()).WillOnce(Return("test-trace-id")); setPerRouteOperation("get_header_key"); TestRequestHeaderMapImpl headers{ @@ -1177,8 +1177,8 @@ TEST_F(HandlerTest, HandlerReportWithoutCheck) { } TEST_F(HandlerTest, HandlerReportWithoutTraceId) { - // Test getTraceId is not called since trace is disabled. - EXPECT_CALL(mock_span_, getTraceId()).Times(0); + // Test getTraceIdAsHex is not called since trace is disabled. + EXPECT_CALL(mock_span_, getTraceIdAsHex()).Times(0); proto_config_.mutable_services(0)->set_tracing_disabled(true); setPerRouteOperation("get_header_key"); diff --git a/tests/endpoints/grpc_echo/client-test-lib.cc b/tests/endpoints/grpc_echo/client-test-lib.cc index 9463a364c..0a0756308 100644 --- a/tests/endpoints/grpc_echo/client-test-lib.cc +++ b/tests/endpoints/grpc_echo/client-test-lib.cc @@ -111,7 +111,7 @@ absl::Status ProtoToJson( json_options.add_whitespace = true; } if (options & JsonOptions::OUTPUT_DEFAULTS) { - json_options.always_print_fields_with_no_presence = true; + json_options.always_print_primitive_fields = true; } // TODO: Skip going to bytes and use ProtoObjectSource directly. std::string binary = message.SerializeAsString(); diff --git a/tests/endpoints/grpc_echo/proto/api_descriptor.pb b/tests/endpoints/grpc_echo/proto/api_descriptor.pb index 91bf058a4bc76c77fbabebbcae79b99ec46a5314..29f4d32770d9b733e3f35a1974ec2408c35be447 100644 GIT binary patch delta 2283 zcmbVNTWBLy7~V5Ub2&-d*%Q-_y``JNvT6yt*~&_vHkV18HkrgpdR3TCo0AYXO=4!U zT6~Bi!b(vVk4OcDW#1IVEraZnpt2zN;N?NVCl>^D#Wyc6zIf)6ThX=kDKq*1|NFoH zJKy=|{pXn%uQRu9F}5F8AXz_qhTM)J?MKGz0H2ZHTwgqP3A&0{R+|m1aN%ii&J!LF zm1?z81&8X5np)d#7DEX$A%|75lT1E#UjeU^S-4K#ftMUhc9)$U(C)%loZxeqF~WughV4kDCwnd036EU#?|r;{wEQF z$L~yD4!p{|X(JC#zuPCm%<&-z6~Ml-Vs!VL&Y+#6r?)6RJgi>IY8d> zaciAh6iVpftQCz;Tm#?$*be}>30PR5M4Tio`YTjaI}Hzlo~EbCTq&LRw!3X z#$gPFFWhGxghZ>fWlY3dmC>=DiH5Asj%*~h%*RE4yIo%ix<-j8YJ>K*Xk3*m<$|nR zowMs>-j~RBC}-3fn5&)2=wuI((-skTIwHg)`HZ+B`pu3niRv_$h0M!IDj+W|1oc+hG)5J{ynYa-N<%}f-B-iG{))Yb$GtSv~lNZY%}4^Q*LN?OWqWP31M$OR1tQ$PqEu~a5UE1BRb^tYYZ@2VLX z5cw=0$@6i^BuYtU;z?nlhbTody=l^`z?GoC&sVLsB@qSA64HVcsg?q4j*w6nt)uI&*dTuymXXoi^^(9*JmpVO*_T; zR5G2UgHk;fA?(@&jY8j2juJ~`#B?Oz!_N&(t5ARuh^zyN^0~akCulNd`mn?Gvy;8& zq`&u^>@RNpVP9ac3);xcqJw#DO51wqPY6CGYje-ep)mBzO|>S~YxQQOyHOOnNo@4f z=F@}OcFZ^^Mf-9t@reCf1Ro`r=O@X2nbU+V6)?o1-I31&@FDqQ`;BQd1wC@TEM38S bQnOs(2IxI;i*EYYGTvJ$7qtDIn-hNnF)+fp delta 352 zcmZpkz_hl3X~PC4=7(-vlW*xNP7d`G+Wd@(hmCRVx50}N}UtGQHj1xC^2)$vR{6IQ#GMl&` z)|%V zDzG!nW1O6(U^V%+Vk*}hMlQbK)S|M?txz)x^n`N62m+54KWZBJc(t8-0 XKC^DF$~0hPoH}`R*0jxu*^6WV8H9MF