Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 0 additions & 1 deletion .github/workflows/macos-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ jobs:
rapidmigrationassessment
recaptchaenterprise
recommender
resourcesettings
scheduler
secretmanager
securesourcemanager
Expand Down
10 changes: 5 additions & 5 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ module(

bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "abseil-cpp", version = "20250127.1", repo_name = "abseil-cpp")
bazel_dep(name = "protobuf", version = "30.0", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "30.2", repo_name = "com_google_protobuf")
bazel_dep(name = "boringssl", version = "0.0.0-20230215-5c22014")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "com_github_nlohmann_json")
bazel_dep(name = "curl", version = "8.8.0.bcr.2", repo_name = "com_github_curl_curl")
Expand Down Expand Up @@ -55,12 +55,12 @@ bazel_dep(name = "grpc", version = "1.71.0", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "googleapis", version = "0.0.0", repo_name = "com_google_googleapis")
archive_override(
module_name = "googleapis",
integrity = "sha256-WpRQzxrRGHyCorXN/1Pk1YS21FKStfcbUECDrLA619A=",
integrity = "sha256-KnunCHPK1T8u8SUxAAU122G6qmfxADIfA4ZU+fNWXjY=",
patch_strip = 1,
patches = ["//bazel:googleapis.modules.patch"],
strip_prefix = "googleapis-280725e991516d4a0f136268faf5aa6d32d21b54",
strip_prefix = "googleapis-53ca65d540dd1a7cb4746687daa87208dc9ea437",
urls = [
"https://github.com/googleapis/googleapis/archive/280725e991516d4a0f136268faf5aa6d32d21b54.tar.gz",
"https://github.com/googleapis/googleapis/archive/53ca65d540dd1a7cb4746687daa87208dc9ea437.tar.gz",
],
)

Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,6 @@ See each library's `README.md` file for more information about:
- [Cloud Resource Manager API](google/cloud/resourcemanager/README.md)
[[quickstart]](google/cloud/resourcemanager/quickstart/README.md)
[[reference]](https://cloud.google.com/cpp/docs/reference/resourcemanager/latest)
- [Resource Settings API](google/cloud/resourcesettings/README.md)
[[quickstart]](google/cloud/resourcesettings/quickstart/README.md)
[[reference]](https://cloud.google.com/cpp/docs/reference/resourcesettings/latest)
- [Retail API](google/cloud/retail/README.md)
[[quickstart]](google/cloud/retail/quickstart/README.md)
[[reference]](https://cloud.google.com/cpp/docs/reference/retail/latest)
Expand Down
10 changes: 5 additions & 5 deletions bazel/gapic.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d

native.filegroup(
name = "srcs",
srcs = native.glob(sources_glob),
srcs = native.glob(sources_glob, allow_empty = True),
)

native.filegroup(
name = "hdrs",
srcs = native.glob(include = code_glob, exclude = sources_glob),
srcs = native.glob(include = code_glob, exclude = sources_glob, allow_empty = True),
)

native.filegroup(
name = "public_hdrs",
srcs = native.glob([d + "*.h" for d in service_dirs]),
srcs = native.glob([d + "*.h" for d in service_dirs], allow_empty = True),
visibility = ["//:__pkg__"],
)

native.filegroup(
name = "mocks",
srcs = native.glob([d + "mocks/*.h" for d in service_dirs]),
srcs = native.glob([d + "mocks/*.h" for d in service_dirs], allow_empty = True),
visibility = ["//:__pkg__"],
)

Expand Down Expand Up @@ -84,4 +84,4 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d
"//:" + name,
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
],
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs])]
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs], allow_empty = True)]
26 changes: 21 additions & 5 deletions bazel/googleapis.modules.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
diff --git a/BUILD.bazel b/BUILD.bazel
index 95e4c12e5..a901fd573 100644
index 026553f5c7..f3c6b6925c 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -1,3 +1,7 @@
@@ -1,11 +1,13 @@
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"]) # Apache 2.0
+
genrule(
name = "build_gen",
outs = ["build_gen.sh"],
@@ -16,3 +20,15 @@ EOD
- name = "build_gen",
- srcs = glob(
- ["run_build_gen.sh"],
- allow_empty = True,
- ),
- outs = ["build_gen.sh"],
- cmd = """
+ name = "build_gen",
+ outs = ["build_gen.sh"],
+ executable = True,
+ srcs = glob(["run_build_gen.sh"], allow_empty=True),
+ cmd = """
if test -z \"$(SRCS)\"; then
cat <<EOD > $@
#!/bin/sh
@@ -17,5 +19,17 @@ EOD
cp $(SRCS) $@
fi
""",
- executable = True,
)
+
+# This build file overlays on top of the BUILD files for the googleapis repo,
Expand All @@ -26,6 +41,7 @@ index 95e4c12e5..a901fd573 100644
+ ".",
+ ],
+)
+
diff --git a/MODULE.bazel b/MODULE.bazel
new file mode 100644
index 000000000..169133e43
Expand Down
13 changes: 13 additions & 0 deletions bazel/googleapis.workspace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/BUILD.bazel b/BUILD.bazel
index 95e4c12e5..83838d3f0 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -2,7 +2,7 @@ genrule(
name = "build_gen",
outs = ["build_gen.sh"],
executable = True,
- srcs = glob(["run_build_gen.sh"]),
+ srcs = glob(["run_build_gen.sh"], allow_empty=True),
cmd = """
if test -z \"$(SRCS)\"; then
cat <<EOD > $@
20 changes: 10 additions & 10 deletions bazel/workspace0.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ def gl_cpp_workspace0(name = None):
http_archive,
name = "rules_cc",
urls = [
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz",
"https://github.com/bazelbuild/rules_cc/releases/download/0.1.1/rules_cc-0.1.1.tar.gz",
],
sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1",
strip_prefix = "rules_cc-0.0.17",
sha256 = "712d77868b3152dd618c4d64faaddefcc5965f90f5de6e6dd1d5ddcd0be82d42",
strip_prefix = "rules_cc-0.1.1",
)

maybe(
Expand Down Expand Up @@ -135,18 +135,18 @@ def gl_cpp_workspace0(name = None):
http_archive,
name = "com_google_googleapis",
urls = [
"https://github.com/googleapis/googleapis/archive/280725e991516d4a0f136268faf5aa6d32d21b54.tar.gz",
"https://github.com/googleapis/googleapis/archive/53ca65d540dd1a7cb4746687daa87208dc9ea437.tar.gz",
],
sha256 = "5a9450cf1ad1187c82a2b5cdff53e4d584b6d45292b5f71b504083acb03ad7d0",
strip_prefix = "googleapis-280725e991516d4a0f136268faf5aa6d32d21b54",
sha256 = "2a7ba70873cad53f2ef12531000535db61baaa67f100321f038654f9f3565e36",
strip_prefix = "googleapis-53ca65d540dd1a7cb4746687daa87208dc9ea437",
build_file = Label("//bazel:googleapis.BUILD"),
# Scaffolding for patching googleapis after download. For example:
# patches = ["googleapis.patch"]
# NOTE: This should only be used while developing with a new
# protobuf message. No changes to `patches` should ever be
# committed to the main branch.
patch_tool = "patch",
patch_args = ["-p1"],
patch_args = ["-p1", "-l", "-n"],
patches = [],
)

Expand All @@ -155,10 +155,10 @@ def gl_cpp_workspace0(name = None):
http_archive,
name = "com_google_protobuf",
urls = [
"https://github.com/protocolbuffers/protobuf/archive/v30.0.tar.gz",
"https://github.com/protocolbuffers/protobuf/archive/v30.2.tar.gz",
],
sha256 = "9df0e9e8ebe39f4fbbb9cf7db3d811287fe3616b2f191eb2bf5eaa12539c881f",
strip_prefix = "protobuf-30.0",
sha256 = "07a43d88fe5a38e434c7f94129cad56a4c43a51f99336074d0799c2f7d4e44c5",
strip_prefix = "protobuf-30.2",
)

# Load BoringSSL. This could be automatically loaded by gRPC. But as of
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions ci/cloudbuild/builds/bazel-oldest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ mapfile -t args < <(bazel::common_args)
args+=(
# Test without bzlmod as WORKSPACE is still supported in bazel 7 LTS.
--noenable_bzlmod
--enable_workspace
# Only run the unit tests, no need to waste time running everything.
--test_tag_filters=-integration-test
)
Expand Down
17 changes: 11 additions & 6 deletions ci/cloudbuild/builds/generate-libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ source module ci/cloudbuild/builds/lib/git.sh

bazel_output_base="$(bazel info output_base)"

# As we support both WORKSPACE and MODULE modes for bazel, we need to determine
# the path to these dependencies dynamically.
read -r protobuf_proto_path < <(find "${bazel_output_base}/external" -name "empty.proto" | sed -nE 's/(.+\/src)\/google\/protobuf\/empty.proto/\1/p')
read -r googleapis_proto_path < <(find "${bazel_output_base}/external" -name "api-index-v1.json" | sed -nE 's/(.+)\/api-index-v1.json/\1/p')

if [ -z "${UPDATED_DISCOVERY_DOCUMENT}" ]; then
io::log_h2 "Removing previously generated golden files"
git grep -l "Generated by the Codegen C++ plugin" generator/integration_tests/golden | xargs rm
Expand All @@ -34,8 +39,8 @@ fi
io::log_h2 "Running the generator to update the golden files"
bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \
//generator:google-cloud-cpp-codegen -- \
--protobuf_proto_path="${bazel_output_base}/external/protobuf~/src" \
--googleapis_proto_path="${bazel_output_base}/external/googleapis~" \
--protobuf_proto_path="${protobuf_proto_path}" \
--googleapis_proto_path="${googleapis_proto_path}" \
--golden_proto_path="${PWD}" \
--output_path="${PWD}" \
--update_ci=false \
Expand All @@ -47,8 +52,8 @@ if [ -z "${GENERATE_GOLDEN_ONLY}" ]; then
io::log_h2 "Running the generator to emit protos from discovery docs"
bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \
//generator:google-cloud-cpp-codegen -- \
--protobuf_proto_path="${bazel_output_base}"/external/protobuf~/src \
--googleapis_proto_path="${bazel_output_base}"/external/googleapis~ \
--protobuf_proto_path="${protobuf_proto_path}" \
--googleapis_proto_path="${googleapis_proto_path}" \
--discovery_proto_path="${PWD}/protos" \
--output_path="${PROJECT_ROOT}/protos" \
--export_output_path="${PROJECT_ROOT}" \
Expand Down Expand Up @@ -79,8 +84,8 @@ if [ -z "${GENERATE_GOLDEN_ONLY}" ]; then
io::log_h2 "Running the generator to update the generated libraries"
bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \
//generator:google-cloud-cpp-codegen -- \
--protobuf_proto_path="${bazel_output_base}"/external/protobuf~/src \
--googleapis_proto_path="${bazel_output_base}"/external/googleapis~ \
--protobuf_proto_path="${protobuf_proto_path}" \
--googleapis_proto_path="${googleapis_proto_path}" \
--discovery_proto_path="${PWD}/protos" \
--output_path="${PROJECT_ROOT}" \
--check_comment_substitutions=true \
Expand Down
10 changes: 8 additions & 2 deletions ci/cloudbuild/builds/lib/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,16 @@ function integration::bazel_with_emulators() {
else
io::log_h2 "Running generator integration test"
bazel_output_base="$(bazel info output_base)"

# As we support both WORKSPACE and MODULE modes for bazel, we need to determine
# the path to these dependencies dynamically.
read -r protobuf_proto_path < <(find "${bazel_output_base}/external" -name "empty.proto" | sed -nE 's/(.+\/src)\/google\/protobuf\/empty.proto/\1/p')
read -r googleapis_proto_path < <(find "${bazel_output_base}/external" -name "api-index-v1.json" | sed -nE 's/(.+)\/api-index-v1.json/\1/p')

bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \
//generator:google-cloud-cpp-codegen -- \
--protobuf_proto_path="${bazel_output_base}/external/protobuf~/src" \
--googleapis_proto_path="${bazel_output_base}/external/googleapis~" \
--protobuf_proto_path="${protobuf_proto_path}" \
--googleapis_proto_path="${googleapis_proto_path}" \
--golden_proto_path="${PWD}" \
--output_path="${PWD}" \
--update_ci=false \
Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/builds/quickstart-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ export CXX=g++
mapfile -t args < <(bazel::common_args)
for lib in $(quickstart::libraries); do
io::log_h2 "Running Bazel quickstart for ${lib}"
env -C "${PROJECT_ROOT}/google/cloud/${lib}/quickstart" \
io::run env -C "${PROJECT_ROOT}/google/cloud/${lib}/quickstart" \
bazel build "${args[@]}" :quickstart
done
2 changes: 2 additions & 0 deletions ci/cloudbuild/builds/quickstart-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ readonly SED_ARGS=(
-e '/^rpc$/d'
# TODO:(#14896) Skip gkeconnect as it transitions from grpc to REST transport.
-e '/^gkeconnect/d'
# TODO:(#15015) Remove the next line when resourcesettings is removed from vcpkg
-e '/^resourcesettings/d'
)
mapfile -t features < <(
env -C "${vcpkg_dir}" ./vcpkg search google-cloud-cpp |
Expand Down
7 changes: 0 additions & 7 deletions ci/etc/expected_install_directories
Original file line number Diff line number Diff line change
Expand Up @@ -996,11 +996,6 @@
./include/google/cloud/resourcemanager/v3
./include/google/cloud/resourcemanager/v3/internal
./include/google/cloud/resourcemanager/v3/mocks
./include/google/cloud/resourcesettings
./include/google/cloud/resourcesettings/mocks
./include/google/cloud/resourcesettings/v1
./include/google/cloud/resourcesettings/v1/internal
./include/google/cloud/resourcesettings/v1/mocks
./include/google/cloud/retail
./include/google/cloud/retail/mocks
./include/google/cloud/retail/v2
Expand Down Expand Up @@ -1471,8 +1466,6 @@
./lib64/cmake/google_cloud_cpp_redis_mocks
./lib64/cmake/google_cloud_cpp_resourcemanager
./lib64/cmake/google_cloud_cpp_resourcemanager_mocks
./lib64/cmake/google_cloud_cpp_resourcesettings
./lib64/cmake/google_cloud_cpp_resourcesettings_mocks
./lib64/cmake/google_cloud_cpp_retail
./lib64/cmake/google_cloud_cpp_retail_mocks
./lib64/cmake/google_cloud_cpp_run
Expand Down
1 change: 1 addition & 0 deletions ci/gha/builds/lib/bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function bazel::msvc_args() {
'--per_file_copt=.*\.upbdefs\.c@-wd4090'
# TODO(#14462) - gRPC is not compatible with (at least) MSVC 2019 + bzlmod.
'--noenable_bzlmod'
'--enable_workspace'
)
printf "%s\n" "${args[@]}"
}
Expand Down
1 change: 1 addition & 0 deletions ci/verify_current_targets/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build --experimental_convenience_symlinks=ignore

# TODO(#11485) - enable bzlmod once it works
common --noenable_bzlmod
common --enable_workspace

# TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using
# `apple_rules`.
Expand Down
2 changes: 1 addition & 1 deletion ci/verify_current_targets/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 1 addition & 0 deletions ci/verify_deprecated_targets/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build --experimental_convenience_symlinks=ignore

# TODO(#11485) - enable bzlmod once it works
common --noenable_bzlmod
common --enable_workspace

# TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using
# `apple_rules`.
Expand Down
2 changes: 1 addition & 1 deletion ci/verify_deprecated_targets/.bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.5.0
8.1.1
1 change: 0 additions & 1 deletion cmake/GoogleCloudCppFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ set(GOOGLE_CLOUD_CPP_GA_LIBRARIES
"recommender"
"redis"
"resourcemanager"
"resourcesettings"
"retail"
"run"
"scheduler"
Expand Down
4 changes: 2 additions & 2 deletions cmake/GoogleapisConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256
mark_as_advanced(GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256)

set(_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA
"280725e991516d4a0f136268faf5aa6d32d21b54")
"53ca65d540dd1a7cb4746687daa87208dc9ea437")
set(_GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256
"5a9450cf1ad1187c82a2b5cdff53e4d584b6d45292b5f71b504083acb03ad7d0")
"2a7ba70873cad53f2ef12531000535db61baaa67f100321f038654f9f3565e36")

set(DOXYGEN_ALIASES
"googleapis_link{2}=\"[\\1](https://github.com/googleapis/googleapis/blob/${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}/\\2)\""
Expand Down
1 change: 1 addition & 0 deletions external/googleapis/protodeps/networkconnectivity.deps
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
@com_google_googleapis//google/api:launch_stage_proto
@com_google_googleapis//google/api:resource_proto
@com_google_googleapis//google/longrunning:operations_proto
@com_google_googleapis//google/rpc:error_details_proto
@com_google_googleapis//google/rpc:status_proto
1 change: 1 addition & 0 deletions external/googleapis/protodeps/parallelstore.deps
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
@com_google_googleapis//google/api:launch_stage_proto
@com_google_googleapis//google/api:resource_proto
@com_google_googleapis//google/longrunning:operations_proto
@com_google_googleapis//google/rpc:code_proto
@com_google_googleapis//google/rpc:status_proto
6 changes: 0 additions & 6 deletions external/googleapis/protodeps/resourcesettings.deps

This file was deleted.

1 change: 1 addition & 0 deletions external/googleapis/protolists/aiplatform.list
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
@com_google_googleapis//google/cloud/aiplatform/v1:notebook_runtime.proto
@com_google_googleapis//google/cloud/aiplatform/v1:notebook_runtime_template_ref.proto
@com_google_googleapis//google/cloud/aiplatform/v1:notebook_service.proto
@com_google_googleapis//google/cloud/aiplatform/v1:notebook_software_config.proto
@com_google_googleapis//google/cloud/aiplatform/v1:openapi.proto
@com_google_googleapis//google/cloud/aiplatform/v1:operation.proto
@com_google_googleapis//google/cloud/aiplatform/v1:persistent_resource.proto
Expand Down
1 change: 1 addition & 0 deletions external/googleapis/protolists/bigquerycontrol.list
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@com_google_googleapis//google/cloud/bigquery/v2:job_status.proto
@com_google_googleapis//google/cloud/bigquery/v2:json_extension.proto
@com_google_googleapis//google/cloud/bigquery/v2:location_metadata.proto
@com_google_googleapis//google/cloud/bigquery/v2:managed_table_type.proto
@com_google_googleapis//google/cloud/bigquery/v2:map_target_type.proto
@com_google_googleapis//google/cloud/bigquery/v2:model.proto
@com_google_googleapis//google/cloud/bigquery/v2:model_reference.proto
Expand Down
1 change: 1 addition & 0 deletions external/googleapis/protolists/managedkafka.list
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@com_google_googleapis//google/cloud/managedkafka/v1:managed_kafka.proto
@com_google_googleapis//google/cloud/managedkafka/v1:managed_kafka_connect.proto
@com_google_googleapis//google/cloud/managedkafka/v1:resources.proto
Loading