From 41aeb3c7ed43d46fb282321e40fc20c98e52b453 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 22 Mar 2024 16:54:21 -0700 Subject: [PATCH] Update to ads v16. Google ads api v13 is sunsetted. PiperOrigin-RevId: 618321878 --- WORKSPACE | 6 +++--- benchmarks/BUILD.googleapis | 2 +- benchmarks/benchmark.cc | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index e4ae60df0fe1c..b4c7ac68ceddc 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -153,9 +153,9 @@ http_archive( http_archive( name = "com_google_googleapis", - urls = ["https://github.com/googleapis/googleapis/archive/30ed2662a85403cbdeb9ea38df1e414a2a276b83.zip"], - strip_prefix = "googleapis-30ed2662a85403cbdeb9ea38df1e414a2a276b83", - sha256 = "4dfc28101127d22abd6f0f6308d915d490c4594c0cfcf7643769c446d6763a46", + urls = ["https://github.com/googleapis/googleapis/archive/d81d0b9e6993d6ab425dff4d7c3d05fb2e59fa57.zip"], + strip_prefix = "googleapis-d81d0b9e6993d6ab425dff4d7c3d05fb2e59fa57", + sha256 = "d986023c3d8d2e1b161e9361366669cac9fb97c2a07e656c2548aca389248bb4", build_file = "//benchmarks:BUILD.googleapis", patch_cmds = ["find google -type f -name BUILD.bazel -delete"], ) diff --git a/benchmarks/BUILD.googleapis b/benchmarks/BUILD.googleapis index 446967898c2a0..0587de74db25d 100644 --- a/benchmarks/BUILD.googleapis +++ b/benchmarks/BUILD.googleapis @@ -36,7 +36,7 @@ load( proto_library( name = "ads_proto", srcs = glob([ - "google/ads/googleads/v13/**/*.proto", + "google/ads/googleads/v16/**/*.proto", "google/api/**/*.proto", "google/rpc/**/*.proto", "google/longrunning/**/*.proto", diff --git a/benchmarks/benchmark.cc b/benchmarks/benchmark.cc index 47efbcd8b7e1b..e499b29ead9ae 100644 --- a/benchmarks/benchmark.cc +++ b/benchmarks/benchmark.cc @@ -14,7 +14,7 @@ #include #include -#include "google/ads/googleads/v13/services/google_ads_service.upbdefs.h" +#include "google/ads/googleads/v16/services/google_ads_service.upbdefs.h" #include "google/protobuf/descriptor.pb.h" #include "absl/container/flat_hash_set.h" #include "absl/log/absl_check.h" @@ -181,14 +181,14 @@ static void BM_LoadAdsDescriptor_Upb(benchmark::State& state) { for (auto _ : state) { upb::DefPool defpool; if (Mode == NoLayout) { - google_ads_googleads_v13_services_SearchGoogleAdsRequest_getmsgdef( + google_ads_googleads_v16_services_SearchGoogleAdsRequest_getmsgdef( defpool.ptr()); bytes_per_iter = _upb_DefPool_BytesLoaded(defpool.ptr()); } else { bytes_per_iter = 0; LoadDefInit_BuildLayout( defpool.ptr(), - &google_ads_googleads_v13_services_google_ads_service_proto_upbdefinit, + &google_ads_googleads_v16_services_google_ads_service_proto_upbdefinit, &bytes_per_iter); } } @@ -200,11 +200,11 @@ BENCHMARK_TEMPLATE(BM_LoadAdsDescriptor_Upb, WithLayout); template static void BM_LoadAdsDescriptor_Proto2(benchmark::State& state) { extern _upb_DefPool_Init - google_ads_googleads_v13_services_google_ads_service_proto_upbdefinit; + google_ads_googleads_v16_services_google_ads_service_proto_upbdefinit; std::vector serialized_files; absl::flat_hash_set seen_files; CollectFileDescriptors( - &google_ads_googleads_v13_services_google_ads_service_proto_upbdefinit, + &google_ads_googleads_v16_services_google_ads_service_proto_upbdefinit, serialized_files, seen_files); size_t bytes_per_iter = 0; for (auto _ : state) { @@ -227,7 +227,7 @@ static void BM_LoadAdsDescriptor_Proto2(benchmark::State& state) { if (Mode == WithLayout) { protobuf::DynamicMessageFactory factory; const protobuf::Descriptor* d = pool.FindMessageTypeByName( - "google.ads.googleads.v13.services.SearchGoogleAdsResponse"); + "google.ads.googleads.v16.services.SearchGoogleAdsResponse"); if (!d) { printf("Failed to find descriptor.\n"); exit(1);