Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bigquerycontrol): generate library #14450

Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ breaking changes in the upcoming 3.x release. This release is scheduled for
these distros are EOL or in some form of "security only" support period.
Note that we used CentOS 7 as a proxy for testing RedHat Enterprise Linux 7.

### New Libraries

The following experimental libraries are now available:

- [Cloud BigQuery Control API](/google/cloud/bigquerycontrol/README.md) -
This library provides support for the Dataset, Job, Model, Project, Routine,
RowAccessPolicy, and Table REST resources.

### [OpenTelemetry](/google/cloud/opentelemetry/README.md)

#### Bazel
Expand Down
1 change: 0 additions & 1 deletion ci/cloudbuild/builds/cmake-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ expected_dirs+=(
# no RPC services in google/cloud/bigquery/logging
./include/google/cloud/bigquery/logging
./include/google/cloud/bigquery/logging/v1
./include/google/cloud/bigquery/v2
./include/google/cloud/bigquery/v2/minimal
./include/google/cloud/bigquery/v2/minimal/internal
./include/google/cloud/bigquery/v2/minimal/mocks
Expand Down
7 changes: 7 additions & 0 deletions ci/etc/expected_install_directories
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@
./include/google/cloud/bigquery/storage/v1
./include/google/cloud/bigquery/storage/v1/internal
./include/google/cloud/bigquery/storage/v1/mocks
./include/google/cloud/bigquery/v2
./include/google/cloud/bigquerycontrol
./include/google/cloud/bigquerycontrol/v2
./include/google/cloud/bigquerycontrol/v2/internal
./include/google/cloud/bigquerycontrol/v2/mocks
./include/google/cloud/bigtable
./include/google/cloud/bigtable/admin
./include/google/cloud/bigtable/admin/internal
Expand Down Expand Up @@ -1272,6 +1277,8 @@
./lib64/cmake/google_cloud_cpp_beyondcorp_mocks
./lib64/cmake/google_cloud_cpp_bigquery
./lib64/cmake/google_cloud_cpp_bigquery_mocks
./lib64/cmake/google_cloud_cpp_bigquerycontrol
./lib64/cmake/google_cloud_cpp_bigquerycontrol_mocks
./lib64/cmake/google_cloud_cpp_bigtable
./lib64/cmake/google_cloud_cpp_bigtable_mocks
./lib64/cmake/google_cloud_cpp_billing
Expand Down
2 changes: 2 additions & 0 deletions cmake/GoogleCloudCppFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set(GOOGLE_CLOUD_CPP_NO_GRPC_FEATURES

set(GOOGLE_CLOUD_CPP_EXPERIMENTAL_LIBRARIES
# cmake-format: sort
"bigquerycontrol" # Some proto RPC comments indicate experimental methods.
"pubsublite" # This is WIP, it needs a number of hand-crafted APIs.
)

Expand Down Expand Up @@ -369,6 +370,7 @@ macro (google_cloud_cpp_enable_cleanup)
set(compute_features ${GOOGLE_CLOUD_CPP_ENABLE})
list(FILTER compute_features INCLUDE REGEX "^compute_.*")
if ((storage IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
OR (bigquerycontrol IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
OR (compute IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
OR (compute_features)
OR (experimental-bigquery_rest IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
Expand Down
6 changes: 6 additions & 0 deletions external/googleapis/protodeps/bigquerycontrol.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@com_google_googleapis//google/api:annotations_proto
@com_google_googleapis//google/api:client_proto
@com_google_googleapis//google/api:field_behavior_proto
@com_google_googleapis//google/api:http_proto
@com_google_googleapis//google/api:launch_stage_proto
@com_google_googleapis//google/api:resource_proto
44 changes: 44 additions & 0 deletions external/googleapis/protolists/bigquerycontrol.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@com_google_googleapis//google/cloud/bigquery/v2:biglake_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:clustering.proto
@com_google_googleapis//google/cloud/bigquery/v2:data_format_options.proto
@com_google_googleapis//google/cloud/bigquery/v2:dataset.proto
@com_google_googleapis//google/cloud/bigquery/v2:dataset_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:decimal_target_types.proto
@com_google_googleapis//google/cloud/bigquery/v2:encryption_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:error.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_dataset_options.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_table_options.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_data_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:external_dataset_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:file_set_specification_type.proto
@com_google_googleapis//google/cloud/bigquery/v2:hive_partitioning.proto
@com_google_googleapis//google/cloud/bigquery/v2:job.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_creation_reason.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:job_stats.proto
@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:map_target_type.proto
@com_google_googleapis//google/cloud/bigquery/v2:model.proto
@com_google_googleapis//google/cloud/bigquery/v2:model_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:partitioning_definition.proto
@com_google_googleapis//google/cloud/bigquery/v2:privacy_policy.proto
@com_google_googleapis//google/cloud/bigquery/v2:project.proto
@com_google_googleapis//google/cloud/bigquery/v2:query_parameter.proto
@com_google_googleapis//google/cloud/bigquery/v2:range_partitioning.proto
@com_google_googleapis//google/cloud/bigquery/v2:restriction_config.proto
@com_google_googleapis//google/cloud/bigquery/v2:routine.proto
@com_google_googleapis//google/cloud/bigquery/v2:routine_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy.proto
@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:session_info.proto
@com_google_googleapis//google/cloud/bigquery/v2:standard_sql.proto
@com_google_googleapis//google/cloud/bigquery/v2:system_variable.proto
@com_google_googleapis//google/cloud/bigquery/v2:table.proto
@com_google_googleapis//google/cloud/bigquery/v2:table_constraints.proto
@com_google_googleapis//google/cloud/bigquery/v2:table_reference.proto
@com_google_googleapis//google/cloud/bigquery/v2:table_schema.proto
@com_google_googleapis//google/cloud/bigquery/v2:time_partitioning.proto
@com_google_googleapis//google/cloud/bigquery/v2:udf_resource.proto
1 change: 1 addition & 0 deletions external/googleapis/update_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ declare -A -r LIBRARIES=(
"@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc" \
"@com_google_googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc"
)"
["bigquerycontrol"]="@com_google_googleapis//google/cloud/bigquery/v2:bigquery_cc_proto"
["bigtable"]="$(
printf ",%s" \
"@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc" \
Expand Down
65 changes: 65 additions & 0 deletions generator/generator_config.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,71 @@ service {
retryable_status_codes: ["kUnavailable"]
}


# BigQueryControl
service {
service_proto_path: "google/cloud/bigquery/v2/dataset.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

service {
service_proto_path: "google/cloud/bigquery/v2/job.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

service {
service_proto_path: "google/cloud/bigquery/v2/model.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

service {
service_proto_path: "google/cloud/bigquery/v2/project.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

service {
service_proto_path: "google/cloud/bigquery/v2/routine.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

service {
service_proto_path: "google/cloud/bigquery/v2/row_access_policy.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

service {
service_proto_path: "google/cloud/bigquery/v2/table.proto"
product_path: "google/cloud/bigquerycontrol/v2"
initial_copyright_year: "2024"
retryable_status_codes: ["kUnavailable"]
generate_rest_transport: true
generate_grpc_transport: false
}

# Bigtable
service {
service_proto_path: "google/bigtable/v2/bigtable.proto"
Expand Down
90 changes: 90 additions & 0 deletions google/cloud/bigquerycontrol/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

package(default_visibility = ["//visibility:private"])

licenses(["notice"]) # Apache 2.0

service_dirs = [
"v2/",
]

code_glob = [d + i + f for d in service_dirs for i in [
"",
"internal/",
] for f in [
"*.h",
"*.cc",
]]

sources_glob = [d + "internal/*_sources.cc" for d in service_dirs]

filegroup(
name = "srcs",
srcs = glob(sources_glob),
)

filegroup(
name = "hdrs",
srcs = glob(
include = code_glob,
exclude = sources_glob,
),
)

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

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

cc_library(
name = "google_cloud_cpp_bigquerycontrol",
srcs = [":srcs"],
hdrs = [":hdrs"],
visibility = ["//:__pkg__"],
deps = [
"//:common",
"//:grpc_utils",
"//google/cloud:google_cloud_cpp_rest_internal",
"//google/cloud:google_cloud_cpp_rest_protobuf_internal",
"@com_google_googleapis//google/cloud/bigquery/v2:bigquery_cc_proto",
],
)

cc_library(
name = "google_cloud_cpp_bigquerycontrol_mocks",
hdrs = [":mocks"],
visibility = ["//:__pkg__"],
deps = [
":google_cloud_cpp_bigquerycontrol",
"@com_google_googletest//:gtest",
],
)

[cc_test(
name = sample.replace("/", "_").replace(".cc", ""),
srcs = [sample],
tags = ["integration-test"],
deps = [
"//:experimental-bigquerycontrol",
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
],
) for sample in glob([d + "samples/*.cc" for d in service_dirs])]
Loading
Loading