Skip to content

Commit 3b53173

Browse files
ddelgrosso1coryan
andauthored
feat(storage): promote gRPC plugin to GA (#14712)
* feat(storage): promote gRPC plugin to GA Move the gRPC plugin functions out of the `google::cloud::storage_experimental` namespace and remove the `experimental-` prefix from the CMake and Bazel targets. I left shims in place for backwards compatibility. The `AsyncClient` remains in the `storage_experimental` namespace, it is fully functional, but we may change some APIs. * continue from Carlos previous work * remove duplicate entry in readme * fix typo in cmake-split-install.sh * remove storage_control from transitional * remove more references to experimental-storage_grpc * fix naming in storage_grpc.cmake * more grpc build fixes * update store_grpc abi dump * change naming in quickstart build, remove more experimental references * checkers * fix quickstart * update customer facing references to direct path * feedback * checkers * remove inline from header and implement in .cc * add todo to storage/quickstart/build.bazel * checkers * namesapce * remove newline * fix namespace to exeperimental * update libraries.bzl * checkers --------- Co-authored-by: Carlos O'Ryan <[email protected]>
1 parent 762c5ac commit 3b53173

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+180
-158
lines changed

BUILD.bazel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,23 @@ bool_flag(
153153
visibility = ["//:__subpackages__"],
154154
)
155155

156+
cc_library(
157+
name = "storage_grpc",
158+
hdrs = ["//google/cloud/storage:public_grpc_hdrs"],
159+
deps = [
160+
"//google/cloud/storage:google_cloud_cpp_storage_grpc",
161+
],
162+
)
163+
164+
cc_library(
165+
name = "storage_grpc_mocks",
166+
testonly = True,
167+
hdrs = ["//google/cloud/storage:grpc_mocks_hdrs"],
168+
deps = [
169+
"//google/cloud/storage:google_cloud_cpp_storage_grpc_mocks",
170+
],
171+
)
172+
156173
cc_library(
157174
name = "experimental-storage_grpc",
158175
hdrs = ["//google/cloud/storage:public_grpc_hdrs"],

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ breaking changes in the upcoming 3.x release. This release is scheduled for
2020
using this API, and therefore we do not consider this a breaking change.
2121
([#14726](https://github.com/googleapis/google-cloud-cpp/pull/14726))
2222

23+
### [Google Cloud Storage](/google/cloud/storage/README.md)
24+
25+
- The gRPC plugin is now GA. The [Using the gRPC plugin][storage-grpc]
26+
guide describes this feature in more detail. When using GCS from Google
27+
Compute Engine (GCE) this plugin can enable higher total throughput.
28+
2329
## v2.29.0 - 2024-09
2430

2531
### New Libraries
@@ -1810,3 +1816,4 @@ case it elicits some feedback that requires changes.
18101816
[product-launch-stages]: https://cloud.google.com/products/#product-launch-stages
18111817
[resource-manager-tags]: https://cloud.google.com/resource-manager/docs/tags/tags-overview
18121818
[speech-model-adaptation]: https://cloud.google.com/speech-to-text/docs/adaptation-model
1819+
[storage-grpc]: https://cloud.google.com/cpp/docs/reference/storage/latest/storage-grpc

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,9 @@ int main(int argc, char* argv[]) {
3939
}
4040
std::string const bucket_name = argv[1];
4141

42-
// Create aliases to make the code easier to read.
43-
namespace gcs = ::google::cloud::storage;
44-
4542
// Create a client to communicate with Google Cloud Storage. This client
4643
// uses the default configuration for authentication and project id.
47-
auto client = gcs::Client();
44+
auto client = google::cloud::storage::Client();
4845

4946
auto writer = client.WriteObject(bucket_name, "quickstart.txt");
5047
writer << "Hello World!";
Binary file not shown.

ci/cloudbuild/builds/checkers.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ time {
211211

212212
mapfile -t libraries < <(features::libraries)
213213
for library in "${libraries[@]}" opentelemetry; do
214+
if [[ "${library}" == "storage_grpc" ]]; then
215+
continue
216+
fi
214217
ci/generate-markdown/update-library-readme.sh "${library}"
215218
done
216219
}

ci/cloudbuild/builds/cmake-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ cmake -G Ninja \
228228
-S "${PROJECT_ROOT}/ci/verify_quickstart" \
229229
-B "${PROJECT_ROOT}/cmake-out/quickstart" \
230230
"-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX}" \
231-
"-DFEATURES=experimental-storage_grpc"
231+
"-DFEATURES=storage_grpc"
232232
cmake --build "${PROJECT_ROOT}/cmake-out/quickstart"
233233

234234
io::log_h2 "Delete installed artifacts and run compiled quickstarts"

ci/cloudbuild/builds/cmake-split-install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ io::log_h2 "Building and installing popular libraries"
5050
mapfile -t core_cmake_args < <(cmake::common_args cmake-out/popular-libraries)
5151
io::run cmake "${core_cmake_args[@]}" "${install_args[@]}" \
5252
-DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
53-
-DGOOGLE_CLOUD_CPP_ENABLE="bigtable,pubsub,spanner,storage,iam,policytroubleshooter" \
53+
-DGOOGLE_CLOUD_CPP_ENABLE="bigtable,pubsub,spanner,storage,storage_grpc,iam,policytroubleshooter" \
5454
-DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON
5555
io::run cmake --build cmake-out/popular-libraries
5656
io::run cmake --install cmake-out/popular-libraries --prefix "${INSTALL_PREFIX}"
@@ -71,13 +71,13 @@ mapfile -t feature_cmake_args < <(cmake::common_args cmake-out/features)
7171
io::run cmake "${feature_cmake_args[@]}" "${install_args[@]}" \
7272
-DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \
7373
-DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON \
74-
-DGOOGLE_CLOUD_CPP_ENABLE="__ga_libraries__,-bigtable,-pubsub,-storage,-spanner,-iam,-policytroubleshooter,-compute"
74+
-DGOOGLE_CLOUD_CPP_ENABLE="__ga_libraries__,-bigtable,-pubsub,-storage,-storage_grpc,-spanner,-iam,-policytroubleshooter,-compute"
7575
io::run cmake --build cmake-out/features
7676
io::run cmake --install cmake-out/features --prefix "${INSTALL_PREFIX}"
7777

7878
# Tests the installed artifacts by building all the quickstarts.
7979
# shellcheck disable=SC2046
80-
mapfile -t feature_list < <(cmake -P cmake/print-ga-features.cmake 2>&1)
80+
mapfile -t feature_list < <(cmake -P cmake/print-ga-features.cmake 2>&1 | grep -v storage_grpc)
8181
FEATURES=$(printf ";%s" "${feature_list[@]}")
8282
FEATURES="${FEATURES:1}"
8383
io::run cmake -G Ninja \

ci/cloudbuild/builds/lib/features.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function features::always_build() {
4141
# library instrumentation, and the GCP exporters.
4242
opentelemetry
4343
# Enable storage_grpc in most builds.
44-
experimental-storage_grpc
44+
storage_grpc
4545
)
4646
printf "%s\n" "${list[@]}" | sort -u
4747
}
@@ -62,7 +62,6 @@ function features::libraries() {
6262
function features::_internal_extra() {
6363
local list=(
6464
experimental-bigquery_rest
65-
experimental-storage_grpc
6665
opentelemetry
6766
)
6867
printf "%s\n" "${list[@]}"

ci/cloudbuild/builds/lib/quickstart.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ function quickstart::run_gcs_grpc_quickstart() {
101101
io::log_h2 "Running quickstart for GCS+gRPC"
102102

103103
io::log "[ CMake ]"
104-
local cmake_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/cmake-storage"
104+
local cmake_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/cmake-storage_grpc"
105105
"${cmake_bin_dir}/quickstart_grpc" "${run_args[@]}"
106106

107107
echo
108108
io::log "[ Make ]"
109-
local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-storage"
109+
local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-storage_grpc"
110110
LD_LIBRARY_PATH="${prefix}/lib64:${prefix}/lib:${LD_LIBRARY_PATH:-}" \
111111
"${makefile_bin_dir}/quickstart_grpc" "${run_args[@]}"
112112
}

ci/etc/cloudcxxrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
ALWAYS_RESET_CMAKE_CACHE=NO
1919

2020
# By default compile most features.
21-
ENABLED_FEATURES=__ga_libraries__,__experimental_libraries__,opentelemetry,experimental-storage_grpc
21+
ENABLED_FEATURES=__ga_libraries__,__experimental_libraries__,opentelemetry
2222

2323
# By default compile all the code.
2424
BAZEL_TARGETS=("...")

0 commit comments

Comments
 (0)