Skip to content

Commit 6b9c4da

Browse files
committed
chore(compute): generate updated compute services from discovery doc
1 parent 99c0862 commit 6b9c4da

871 files changed

Lines changed: 55881 additions & 34745 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.

ci/cloudbuild/notifiers/logs/function/function.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ void UpdateLogsIndex(gcs::Client client, nlohmann::json const& contents,
257257
// We skip any events with these status as such builds do not have a final
258258
// log, and cannot affect the output of the index.html file.
259259
static auto const kSkippedStatus = std::unordered_set<std::string>{
260-
"STATUS_UNKNOWN", "QUEUED", "WORKING",
260+
"STATUS_UNKNOWN",
261+
"QUEUED",
262+
"WORKING",
261263
"", // empty status indicates an invalid message
262264
};
263265

ci/etc/expected_install_directories

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@
231231
./include/google/cloud/compute/addresses/v1
232232
./include/google/cloud/compute/addresses/v1/internal
233233
./include/google/cloud/compute/addresses/v1/mocks
234+
./include/google/cloud/compute/advice
235+
./include/google/cloud/compute/advice/v1
236+
./include/google/cloud/compute/advice/v1/internal
237+
./include/google/cloud/compute/advice/v1/mocks
234238
./include/google/cloud/compute/autoscalers
235239
./include/google/cloud/compute/autoscalers/v1
236240
./include/google/cloud/compute/autoscalers/v1/internal
@@ -243,6 +247,10 @@
243247
./include/google/cloud/compute/backend_services/v1
244248
./include/google/cloud/compute/backend_services/v1/internal
245249
./include/google/cloud/compute/backend_services/v1/mocks
250+
./include/google/cloud/compute/cross_site_networks
251+
./include/google/cloud/compute/cross_site_networks/v1
252+
./include/google/cloud/compute/cross_site_networks/v1/internal
253+
./include/google/cloud/compute/cross_site_networks/v1/mocks
246254
./include/google/cloud/compute/disk_types
247255
./include/google/cloud/compute/disk_types/v1
248256
./include/google/cloud/compute/disk_types/v1/internal
@@ -291,10 +299,18 @@
291299
./include/google/cloud/compute/global_public_delegated_prefixes/v1
292300
./include/google/cloud/compute/global_public_delegated_prefixes/v1/internal
293301
./include/google/cloud/compute/global_public_delegated_prefixes/v1/mocks
302+
./include/google/cloud/compute/global_vm_extension_policies
303+
./include/google/cloud/compute/global_vm_extension_policies/v1
304+
./include/google/cloud/compute/global_vm_extension_policies/v1/internal
305+
./include/google/cloud/compute/global_vm_extension_policies/v1/mocks
294306
./include/google/cloud/compute/health_checks
295307
./include/google/cloud/compute/health_checks/v1
296308
./include/google/cloud/compute/health_checks/v1/internal
297309
./include/google/cloud/compute/health_checks/v1/mocks
310+
./include/google/cloud/compute/hosts
311+
./include/google/cloud/compute/hosts/v1
312+
./include/google/cloud/compute/hosts/v1/internal
313+
./include/google/cloud/compute/hosts/v1/mocks
298314
./include/google/cloud/compute/http_health_checks
299315
./include/google/cloud/compute/http_health_checks/v1
300316
./include/google/cloud/compute/http_health_checks/v1/internal
@@ -335,6 +351,10 @@
335351
./include/google/cloud/compute/instances/v1
336352
./include/google/cloud/compute/instances/v1/internal
337353
./include/google/cloud/compute/instances/v1/mocks
354+
./include/google/cloud/compute/instant_snapshot_groups
355+
./include/google/cloud/compute/instant_snapshot_groups/v1
356+
./include/google/cloud/compute/instant_snapshot_groups/v1/internal
357+
./include/google/cloud/compute/instant_snapshot_groups/v1/mocks
338358
./include/google/cloud/compute/instant_snapshots
339359
./include/google/cloud/compute/instant_snapshots/v1
340360
./include/google/cloud/compute/instant_snapshots/v1/internal
@@ -415,10 +435,18 @@
415435
./include/google/cloud/compute/node_types/v1
416436
./include/google/cloud/compute/node_types/v1/internal
417437
./include/google/cloud/compute/node_types/v1/mocks
438+
./include/google/cloud/compute/organization_security_policies
439+
./include/google/cloud/compute/organization_security_policies/v1
440+
./include/google/cloud/compute/organization_security_policies/v1/internal
441+
./include/google/cloud/compute/organization_security_policies/v1/mocks
418442
./include/google/cloud/compute/packet_mirrorings
419443
./include/google/cloud/compute/packet_mirrorings/v1
420444
./include/google/cloud/compute/packet_mirrorings/v1/internal
421445
./include/google/cloud/compute/packet_mirrorings/v1/mocks
446+
./include/google/cloud/compute/preview_features
447+
./include/google/cloud/compute/preview_features/v1
448+
./include/google/cloud/compute/preview_features/v1/internal
449+
./include/google/cloud/compute/preview_features/v1/mocks
422450
./include/google/cloud/compute/projects
423451
./include/google/cloud/compute/projects/v1
424452
./include/google/cloud/compute/projects/v1/internal
@@ -435,6 +463,10 @@
435463
./include/google/cloud/compute/region_autoscalers/v1
436464
./include/google/cloud/compute/region_autoscalers/v1/internal
437465
./include/google/cloud/compute/region_autoscalers/v1/mocks
466+
./include/google/cloud/compute/region_backend_buckets
467+
./include/google/cloud/compute/region_backend_buckets/v1
468+
./include/google/cloud/compute/region_backend_buckets/v1/internal
469+
./include/google/cloud/compute/region_backend_buckets/v1/mocks
438470
./include/google/cloud/compute/region_backend_services
439471
./include/google/cloud/compute/region_backend_services/v1
440472
./include/google/cloud/compute/region_backend_services/v1/internal
@@ -443,6 +475,10 @@
443475
./include/google/cloud/compute/region_commitments/v1
444476
./include/google/cloud/compute/region_commitments/v1/internal
445477
./include/google/cloud/compute/region_commitments/v1/mocks
478+
./include/google/cloud/compute/region_composite_health_checks
479+
./include/google/cloud/compute/region_composite_health_checks/v1
480+
./include/google/cloud/compute/region_composite_health_checks/v1/internal
481+
./include/google/cloud/compute/region_composite_health_checks/v1/mocks
446482
./include/google/cloud/compute/region_disk_types
447483
./include/google/cloud/compute/region_disk_types/v1
448484
./include/google/cloud/compute/region_disk_types/v1/internal
@@ -451,6 +487,10 @@
451487
./include/google/cloud/compute/region_disks/v1
452488
./include/google/cloud/compute/region_disks/v1/internal
453489
./include/google/cloud/compute/region_disks/v1/mocks
490+
./include/google/cloud/compute/region_health_aggregation_policies
491+
./include/google/cloud/compute/region_health_aggregation_policies/v1
492+
./include/google/cloud/compute/region_health_aggregation_policies/v1/internal
493+
./include/google/cloud/compute/region_health_aggregation_policies/v1/mocks
454494
./include/google/cloud/compute/region_health_check_services
455495
./include/google/cloud/compute/region_health_check_services/v1
456496
./include/google/cloud/compute/region_health_check_services/v1/internal
@@ -459,6 +499,14 @@
459499
./include/google/cloud/compute/region_health_checks/v1
460500
./include/google/cloud/compute/region_health_checks/v1/internal
461501
./include/google/cloud/compute/region_health_checks/v1/mocks
502+
./include/google/cloud/compute/region_health_sources
503+
./include/google/cloud/compute/region_health_sources/v1
504+
./include/google/cloud/compute/region_health_sources/v1/internal
505+
./include/google/cloud/compute/region_health_sources/v1/mocks
506+
./include/google/cloud/compute/region_instance_group_manager_resize_requests
507+
./include/google/cloud/compute/region_instance_group_manager_resize_requests/v1
508+
./include/google/cloud/compute/region_instance_group_manager_resize_requests/v1/internal
509+
./include/google/cloud/compute/region_instance_group_manager_resize_requests/v1/mocks
462510
./include/google/cloud/compute/region_instance_group_managers
463511
./include/google/cloud/compute/region_instance_group_managers/v1
464512
./include/google/cloud/compute/region_instance_group_managers/v1/internal
@@ -475,6 +523,10 @@
475523
./include/google/cloud/compute/region_instances/v1
476524
./include/google/cloud/compute/region_instances/v1/internal
477525
./include/google/cloud/compute/region_instances/v1/mocks
526+
./include/google/cloud/compute/region_instant_snapshot_groups
527+
./include/google/cloud/compute/region_instant_snapshot_groups/v1
528+
./include/google/cloud/compute/region_instant_snapshot_groups/v1/internal
529+
./include/google/cloud/compute/region_instant_snapshot_groups/v1/mocks
478530
./include/google/cloud/compute/region_instant_snapshots
479531
./include/google/cloud/compute/region_instant_snapshots/v1
480532
./include/google/cloud/compute/region_instant_snapshots/v1/internal
@@ -499,6 +551,14 @@
499551
./include/google/cloud/compute/region_security_policies/v1
500552
./include/google/cloud/compute/region_security_policies/v1/internal
501553
./include/google/cloud/compute/region_security_policies/v1/mocks
554+
./include/google/cloud/compute/region_snapshot_settings
555+
./include/google/cloud/compute/region_snapshot_settings/v1
556+
./include/google/cloud/compute/region_snapshot_settings/v1/internal
557+
./include/google/cloud/compute/region_snapshot_settings/v1/mocks
558+
./include/google/cloud/compute/region_snapshots
559+
./include/google/cloud/compute/region_snapshots/v1
560+
./include/google/cloud/compute/region_snapshots/v1/internal
561+
./include/google/cloud/compute/region_snapshots/v1/mocks
502562
./include/google/cloud/compute/region_ssl_certificates
503563
./include/google/cloud/compute/region_ssl_certificates/v1
504564
./include/google/cloud/compute/region_ssl_certificates/v1/internal
@@ -531,10 +591,18 @@
531591
./include/google/cloud/compute/regions/v1
532592
./include/google/cloud/compute/regions/v1/internal
533593
./include/google/cloud/compute/regions/v1/mocks
594+
./include/google/cloud/compute/reliability_risks
595+
./include/google/cloud/compute/reliability_risks/v1
596+
./include/google/cloud/compute/reliability_risks/v1/internal
597+
./include/google/cloud/compute/reliability_risks/v1/mocks
534598
./include/google/cloud/compute/reservation_blocks
535599
./include/google/cloud/compute/reservation_blocks/v1
536600
./include/google/cloud/compute/reservation_blocks/v1/internal
537601
./include/google/cloud/compute/reservation_blocks/v1/mocks
602+
./include/google/cloud/compute/reservation_slots
603+
./include/google/cloud/compute/reservation_slots/v1
604+
./include/google/cloud/compute/reservation_slots/v1/internal
605+
./include/google/cloud/compute/reservation_slots/v1/mocks
538606
./include/google/cloud/compute/reservation_sub_blocks
539607
./include/google/cloud/compute/reservation_sub_blocks/v1
540608
./include/google/cloud/compute/reservation_sub_blocks/v1/internal
@@ -547,6 +615,14 @@
547615
./include/google/cloud/compute/resource_policies/v1
548616
./include/google/cloud/compute/resource_policies/v1/internal
549617
./include/google/cloud/compute/resource_policies/v1/mocks
618+
./include/google/cloud/compute/rollout_plans
619+
./include/google/cloud/compute/rollout_plans/v1
620+
./include/google/cloud/compute/rollout_plans/v1/internal
621+
./include/google/cloud/compute/rollout_plans/v1/mocks
622+
./include/google/cloud/compute/rollouts
623+
./include/google/cloud/compute/rollouts/v1
624+
./include/google/cloud/compute/rollouts/v1/internal
625+
./include/google/cloud/compute/rollouts/v1/mocks
550626
./include/google/cloud/compute/routers
551627
./include/google/cloud/compute/routers/v1
552628
./include/google/cloud/compute/routers/v1/internal
@@ -635,10 +711,18 @@
635711
./include/google/cloud/compute/vpn_tunnels/v1
636712
./include/google/cloud/compute/vpn_tunnels/v1/internal
637713
./include/google/cloud/compute/vpn_tunnels/v1/mocks
714+
./include/google/cloud/compute/wire_groups
715+
./include/google/cloud/compute/wire_groups/v1
716+
./include/google/cloud/compute/wire_groups/v1/internal
717+
./include/google/cloud/compute/wire_groups/v1/mocks
638718
./include/google/cloud/compute/zone_operations
639719
./include/google/cloud/compute/zone_operations/v1
640720
./include/google/cloud/compute/zone_operations/v1/internal
641721
./include/google/cloud/compute/zone_operations/v1/mocks
722+
./include/google/cloud/compute/zone_vm_extension_policies
723+
./include/google/cloud/compute/zone_vm_extension_policies/v1
724+
./include/google/cloud/compute/zone_vm_extension_policies/v1/internal
725+
./include/google/cloud/compute/zone_vm_extension_policies/v1/mocks
642726
./include/google/cloud/compute/zones
643727
./include/google/cloud/compute/zones/v1
644728
./include/google/cloud/compute/zones/v1/internal

generator/discovery/compute_public_google_rest_v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113769,4 +113769,4 @@
113769113769
"serviceVersion": "v1",
113770113770
"title": "Compute Engine API",
113771113771
"version": "v1"
113772-
}
113772+
}

generator/discovery/update_discovery_doc.sh

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,32 @@ EOT
5858
EOT
5959
}
6060

61-
if (($# > 0)); then
62-
cat 1>&2 <<EOM
63-
Usage: $(basename "$0")
61+
CREATE_BRANCH=true
62+
while (($# > 0)); do
63+
case "$1" in
64+
--create-branch=true)
65+
CREATE_BRANCH=true
66+
shift
67+
;;
68+
--create-branch=false | --no-create-branch)
69+
CREATE_BRANCH=false
70+
shift
71+
;;
72+
*)
73+
cat 1>&2 <<EOM
74+
Usage: $(basename "$0") [--create-branch=true|false]
6475
6576
Updates the Compute Discovery Document and runs the generator on the updated
6677
JSON.
78+
79+
--create-branch=true|false (default: true)
80+
Whether to create and check out a new git branch update_compute_discovery_circa_<REVISION>.
6781
EOM
68-
exit 1
69-
fi
82+
exit 1
83+
;;
84+
esac
85+
done
86+
readonly CREATE_BRANCH
7087

7188
readonly COMPUTE_DISCOVERY_DOCUMENT_URL="https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/compute.v1.json"
7289
readonly COMPUTE_DISCOVERY_JSON_RELATIVE_PATH="generator/discovery/compute_public_google_rest_v1.json"
@@ -77,10 +94,11 @@ readonly COMPUTE_SERVICE_DIRS_BZL_RELATIVE_PATH="google/cloud/compute/service_di
7794
io::log_h2 "Fetching discovery document from ${COMPUTE_DISCOVERY_DOCUMENT_URL}"
7895
curl "${COMPUTE_DISCOVERY_DOCUMENT_URL}" >"${PROJECT_ROOT}/${COMPUTE_DISCOVERY_JSON_RELATIVE_PATH}"
7996

80-
# TODO(#14028): Make branch creation optional.
8197
REVISION=$(sed -En 's/ \"revision\": \"([[:digit:]]+)\",/\1/p' "${PROJECT_ROOT}/${COMPUTE_DISCOVERY_JSON_RELATIVE_PATH}")
8298
readonly REVISION
83-
io::run git checkout -B update_compute_discovery_circa_"${REVISION}"
99+
if [[ "${CREATE_BRANCH}" == "true" ]]; then
100+
io::run git checkout -B update_compute_discovery_circa_"${REVISION}"
101+
fi
84102

85103
io::log_h2 "Adding updated Discovery JSON ${COMPUTE_DISCOVERY_JSON_RELATIVE_PATH}"
86104
git commit -m"chore(compute): update discovery doc circa ${REVISION}" \
@@ -148,4 +166,4 @@ with open("google/cloud/compute/service_dirs.bzl", "w") as f:
148166
"${PROJECT_ROOT}/${COMPUTE_SERVICE_DIRS_BZL_RELATIVE_PATH}"
149167
fi
150168

151-
git commit -m"Update generated code" .
169+
git add -A . && git commit -m"Update generated code"

0 commit comments

Comments
 (0)