Skip to content

Commit f57b76c

Browse files
authored
Merge branch 'main' into feat/open-range
2 parents 53b0ad6 + a20125d commit f57b76c

63 files changed

Lines changed: 5031 additions & 27 deletions

File tree

Some content is hidden

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

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ for details on updating existing applications using v1.x.y or v2.x.y.
99

1010
## v3.9.0 - TBD
1111

12+
### New Libraries
13+
14+
We are happy to announce the following GA libraries. Unless specifically noted,
15+
the APIs in these libraries are stable, and are ready for production use.
16+
17+
- [Workload Identity API](/google/cloud/workloadidentity/README.md)
18+
1219
## v3.8.0 - 2026-08
1320

1421
### Removed Libraries

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,9 @@ See each library's `README.md` file for more information about:
575575
- [Workflow Executions API](google/cloud/workflows/README.md)
576576
[[quickstart]](google/cloud/workflows/quickstart/README.md)
577577
[[reference]](https://cloud.google.com/cpp/docs/reference/workflows/latest)
578+
- [Workload Identity API](google/cloud/workloadidentity/README.md)
579+
[[quickstart]](google/cloud/workloadidentity/quickstart/README.md)
580+
[[reference]](https://cloud.google.com/cpp/docs/reference/workloadidentity/latest)
578581
- [Workload Manager API](google/cloud/workloadmanager/README.md)
579582
[[quickstart]](google/cloud/workloadmanager/quickstart/README.md)
580583
[[reference]](https://cloud.google.com/cpp/docs/reference/workloadmanager/latest)
Binary file not shown.

ci/etc/expected_install_directories

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,10 @@
12321232
./include/google/cloud/workflows/v1
12331233
./include/google/cloud/workflows/v1/internal
12341234
./include/google/cloud/workflows/v1/mocks
1235+
./include/google/cloud/workloadidentity
1236+
./include/google/cloud/workloadidentity/v1
1237+
./include/google/cloud/workloadidentity/v1/internal
1238+
./include/google/cloud/workloadidentity/v1/mocks
12351239
./include/google/cloud/workloadmanager
12361240
./include/google/cloud/workloadmanager/v1
12371241
./include/google/cloud/workloadmanager/v1/internal
@@ -1612,6 +1616,8 @@
16121616
./lib64/cmake/google_cloud_cpp_websecurityscanner_mocks
16131617
./lib64/cmake/google_cloud_cpp_workflows
16141618
./lib64/cmake/google_cloud_cpp_workflows_mocks
1619+
./lib64/cmake/google_cloud_cpp_workloadidentity
1620+
./lib64/cmake/google_cloud_cpp_workloadidentity_mocks
16151621
./lib64/cmake/google_cloud_cpp_workloadmanager
16161622
./lib64/cmake/google_cloud_cpp_workloadmanager_mocks
16171623
./lib64/cmake/google_cloud_cpp_workstations

cmake/GoogleCloudCppFeatures.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ set(GOOGLE_CLOUD_CPP_GA_LIBRARIES
198198
"webrisk"
199199
"websecurityscanner"
200200
"workflows"
201+
"workloadidentity"
201202
"workloadmanager"
202203
"workstations")
203204

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@googleapis//google/api:annotations_proto
2+
@googleapis//google/api:client_proto
3+
@googleapis//google/api:field_behavior_proto
4+
@googleapis//google/api:http_proto
5+
@googleapis//google/api:launch_stage_proto
6+
@googleapis//google/api:resource_proto
7+
@googleapis//google/longrunning:operations_proto
8+
@googleapis//google/rpc:status_proto
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@googleapis//google/cloud/workloadidentity/v1:service.proto

external/googleapis/update_libraries.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ declare -A -r LIBRARIES=(
355355
"@googleapis//google/cloud/workflows/type:type_cc_grpc" \
356356
"@googleapis//google/cloud/workflows/executions/v1:executions_cc_grpc"
357357
)"
358+
["workloadidentity"]="@googleapis//google/cloud/workloadidentity/v1:workloadidentity_cc_grpc"
358359
["workloadmanager"]="@googleapis//google/cloud/workloadmanager/v1:workloadmanager_cc_grpc"
359360
["workstations"]="$(
360361
printf ",%s" \

generator/generator_config.textproto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4294,6 +4294,14 @@ service {
42944294
retryable_status_codes: ["kUnavailable"]
42954295
}
42964296
4297+
# Workload Identity
4298+
service {
4299+
service_proto_path: "google/cloud/workloadidentity/v1/service.proto"
4300+
product_path: "google/cloud/workloadidentity/v1"
4301+
initial_copyright_year: "2026"
4302+
retryable_status_codes: ["kUnavailable"]
4303+
}
4304+
42974305
# Workload Manager
42984306
service {
42994307
service_proto_path: "google/cloud/workloadmanager/v1/service.proto"

generator/internal/codegen_utils.cc

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -331,26 +331,55 @@ std::string FormatCommentBlock(std::string const& comment,
331331
if (offset >= line_length) GCP_LOG(FATAL) << "line_length is too small";
332332
auto comment_width = line_length - offset;
333333

334-
std::vector<std::string> lines;
335-
std::size_t start_pos = 0;
336-
while (start_pos != std::string::npos) {
337-
std::size_t boundary = start_pos + comment_width;
338-
std::size_t end_pos = boundary;
339-
if (boundary < comment.length()) {
340-
// Look backward from the boundary for the last word
341-
end_pos = comment.rfind(' ', boundary);
342-
// If there is only one word, find and use its boundary
343-
if (end_pos == std::string::npos || end_pos < start_pos) {
344-
end_pos = comment.find(' ', boundary);
334+
bool const has_trailing_newline = comment.back() == '\n';
335+
std::string_view comment_sv = comment;
336+
if (has_trailing_newline) {
337+
comment_sv.remove_suffix(1);
338+
}
339+
340+
std::vector<std::string_view> lines;
341+
std::vector<std::string_view> paragraphs = absl::StrSplit(comment_sv, '\n');
342+
for (auto const& paragraph : paragraphs) {
343+
if (paragraph.empty()) {
344+
lines.emplace_back();
345+
continue;
346+
}
347+
std::size_t start_pos = 0;
348+
while (start_pos != std::string_view::npos) {
349+
std::size_t boundary = start_pos + comment_width;
350+
std::size_t end_pos = boundary;
351+
if (boundary < paragraph.length()) {
352+
// Look backward from the boundary for the last word
353+
end_pos = paragraph.rfind(' ', boundary);
354+
// If there is only one word, find and use its boundary
355+
if (end_pos == std::string_view::npos || end_pos < start_pos) {
356+
end_pos = paragraph.find(' ', boundary);
357+
}
345358
}
359+
lines.push_back(paragraph.substr(start_pos, end_pos - start_pos));
360+
start_pos = paragraph.find_first_not_of(' ', end_pos);
346361
}
347-
lines.push_back(comment.substr(start_pos, end_pos - start_pos));
348-
start_pos = comment.find_first_not_of(' ', end_pos);
349362
}
350363

351364
std::string indent(indent_level * indent_width, ' ');
352-
std::string joiner = absl::StrCat("\n", indent, comment_introducer);
353-
return absl::StrCat(indent, comment_introducer, absl::StrJoin(lines, joiner));
365+
std::string trimmed_introducer = comment_introducer;
366+
while (!trimmed_introducer.empty() && trimmed_introducer.back() == ' ') {
367+
trimmed_introducer.pop_back();
368+
}
369+
370+
std::string result;
371+
for (std::size_t i = 0; i < lines.size(); ++i) {
372+
if (i > 0) result += "\n";
373+
if (lines[i].empty()) {
374+
result += absl::StrCat(indent, trimmed_introducer);
375+
continue;
376+
}
377+
result += absl::StrCat(indent, comment_introducer, lines[i]);
378+
}
379+
if (has_trailing_newline) {
380+
result += "\n";
381+
}
382+
return result;
354383
}
355384

356385
std::string FormatCommentKeyValueList(

0 commit comments

Comments
 (0)