-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Sync with main. #9972
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 privac 8000 y statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync with main. #9972
Conversation
…uct with a job_ prefix (#9883)
…ons (#9857) * chore(endpoints): delete region swagger to openapi-v1.yaml * chore(endpoints): delete region swagger to openapi-v2.yaml
* chore(job): delete sample jobs_java_dependencies_beta * chore(job): delete region_tab 'jobs_java_dependencies_beta' and update 'google-api-services-jobs' version
* Implemented compute_disk_regional_replicated sample, created test * Fixed zone * Fixed test * Fixed test * Fixed disk size * Fixed code as requested in the comment
* Implemented compute_disk_start_replication and compute_disk_stop_replication samples, created tests * Fixed test * Deleted not related classes * Fixed lint issue * Increased timeout * Split samples for zonal location * Fixed code * Fixed code * Increased timeout * Increased timeout
* Changed package, added information to CODEOWNERS * Added information to CODEOWNERS * Added timeout * Fixed parameters for test * Fixed DeleteTpuVm and naming * Added comment, created Util class * Fixed naming * Fixed whitespace * Split PR into smaller, deleted redundant code * Implemented tpu_vm_create_spot sample, created test * changed zone * Changed zone * Fixed empty lines and tests, deleted cleanup method * Changed zone * Deleted redundant test class * Increased timeout * Fixed test
* Changed package, added information to CODEOWNERS * Added information to CODEOWNERS * Added timeout * Fixed parameters for test * Fixed DeleteTpuVm and naming * Added comment, created Util class * Fixed naming * Fixed whitespace * Split PR into smaller, deleted redundant code * Implemented tpu_vm_create_startup_script sample, created test * Fixed tests and empty lines * Changed zone * Deleted redundant test classes * Increased timeout * Fixed code
* Changed package, added information to CODEOWNERS * Added information to CODEOWNERS * Added timeout * Fixed parameters for test * Fixed DeleteTpuVm and naming * Added comment, created Util class * Fixed naming * Fixed whitespace * Split PR into smaller, deleted redundant code * Implemented tpu_queued_resources_create, tpu_queued_resources_get, tpu_queued_resources_delete_force and tpu_queued_resources_delete samples, created tests * Fixed test * Fixed tests * Fixed error massage * Fixed typo * Fixed zone * Fixed test * Fixed code * Deleted commented imports * Fixed code as requested in comments
Add a code sample for tpu_queued_resources_create_spot
…Module code samples (Create, Delete, List, Get) (#9743) * sample codes for event threat detection custom modules * addressed comments * addressed comments * addressed comments * addressed comments
… to use mocked client (#9840) * Fixed sample and test to use mocked client * Fixed code as requested in the comments
#9735) * Implemented compute_instance_create_replicated_boot_disk sample, created test * Fixed test * Fixed code as requested in the comments * Fixed Util class * Fixed code
* Implemented compute_consistency_group_create and compute_consistency_group_delete samples, created test * Implemented compute_consistency_group_stop_replication sample * Implemented compute_consistency_group_stop_replication sample * Created test and added needed classes for testing * Fixed test * Moved clean up methods * Added clean up methods for reservations * Fixed clean up method * Fixed clean up method * Added timeout * Reverted not related changes * Reverted not related changes * Reverted not related changes * Reverted not related changes * Fixed code * Split samples for zonal location * Added comments for methods * Fixed comments
* feat(secretmanager): add optional ttl to create secret sample * nit: Update secretmanager/src/main/java/secretmanager/CreateSecret.java Co-authored-by: code-review-assist[bot] <182814678+code-review-assist[bot]@users.noreply.github.com> * fix(secretmanager): fix comment indentation to resolve linting issues --------- Co-authored-by: Jennifer Davis <iennae@gmail.com> Co-authored-by: code-review-assist[bot] <182814678+code-review-assist[bot]@users.noreply.github.com>
* Changed package, added information to CODEOWNERS * Added information to CODEOWNERS * Added timeout * Fixed parameters for test * Fixed DeleteTpuVm and naming * Added comment, created Util class * Fixed naming * Fixed whitespace * Split PR into smaller, deleted redundant code * Implemented tpu_queued_resources_create, tpu_queued_resources_get, tpu_queued_resources_delete_force and tpu_queued_resources_delete samples, created tests * Implemented tpu_queued_resources_list sample, created test * Fixed test * Fixed tests, deleted cleanup method * Fixed test * Fixed imports
* Implemented compute_disk_create_secondary_regional. created test * Fixed test * Fixed test * Fixed test * Fixed zone * Fixed naming * Fixed spaces * Fixed code * Fixed indentations * Fixed variable * Fixed code * Added cleanup methods * Fixed lint issue * Fixed lint issue * Fixed test * Fixed code * Fixed code * Fixed code * Deleted duplicated assertion
* Implemented compute_disk_create_secondary sample, created test * Fixed code * Fixed variable * Fixed code * Merged changes from main * Fixed lint issue
* Implemented compute_snapshot_schedule_attach sample, created test * Implemented compute_snapshot_schedule_remove sample, created test * Fixed code * Fixed code as requested in the comments
* Implemented compute_consistency_group_clone and compute_consistency_group_clone_regional_disk samples, created tests * Fixed naming
…#9730) * Implemented compute_instance_attach_regional_disk_force sample, created test * Added clean up method * Fixed comments and parameters * Test order deleted * Fixed code * Fixed code * Fixed code * Increased timeout * Increased timeout * Increased timeout * Fixed code * Fixed code * Fixed code * Fixed naming
* Implemented compute_disk_create_secondary_custom sample, created test * Fixed code * Fixed variable * Fixed code * Fixed whitespace * Fixed whitespace
…ete samples (#9742) * Implemented compute_snapshot_schedule_delete and compute_snapshot_schedule_create samples, created test * Fixed test * Added compute_snapshot_schedule_get sample, created test * Fixed naming * Implemented compute_snapshot_schedule_edit, created test * Fixed naming * Implemented compute_snapshot_schedule_list sample, created test * Cleaned resources * Cleaned resources * Cleaned resources * Cleaned resources * Fixed test * Added comment * Fixed tests * Fixed code * Fixed code as requested in the comments
* Implemented compute_disk_create_with_snapshot_schedule sample, created test * Fixed code * Fixed code * Fixed test * Fixed code * Fixed code as requested in the comments * Fixed lint issue * Fixed lint issue * Deleted redundant code
* Changed package, added information to CODEOWNERS * Added information to CODEOWNERS * Added timeout * Fixed parameters for test * Fixed DeleteTpuVm and naming * Added comment, created Util class * Fixed naming * Fixed whitespace * Split PR into smaller, deleted redundant code * Implemented tpu_queued_resources_create, tpu_queued_resources_get, tpu_queued_resources_delete_force and tpu_queued_resources_delete samples, created tests * Implemented tpu_queued_resources_time_bound sample, created test * Changed zone for tpu * Cleanup resources * Fixed tests * Fixed test * Fixed code as requested in the comments * Fixed code as requested in the comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request and will post my feedback in a few minutes. In the meantime, I'm providing a summary of the pull request's content to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main," aims to synchronize the java-docs-samples
repository with its main
branch. The changes include:
-
Updating CODEOWNERS: Line 82 of the
.github/CODEOWNERS
file was modified to add@GoogleCloudPlatform/cloud-ml-translate-dev
as a code owner for the/translate
directory. This likely reflects a change in team ownership or responsibility for the Translate samples. -
Removing FlakyBot calls: Sections of code responsible for sending test logs to the FlakyBot were removed from
run_prptst_tests.sh
(lines 93-98) andrun_test_java.sh
(lines 99-104). This suggests a change in the testing or CI/CD pipeline, potentially simplifying the process or addressing issues with FlakyBot integration. -
Adding new Compute Engine samples: Four new Java files were added to the
compute/cloud-client/src/main/java/compute
directory:CreateInstanceWithRegionalDiskFromSnapshot.java
(lines 1-109): Creates a new VM instance with a regional disk from a snapshot.AttachRegionalDiskForce.java
(lines 1-81): Attaches a regional disk to an instance, forcing the attachment.CreateDiskSecondaryRegional.java
(lines 1-103): Creates a secondary regional disk.CreateDiskWithSnapshotSchedule.java
(lines 1-73): Creates a disk with a linked snapshot schedule.CreateReplicatedDisk.java
(lines 1-88): Creates a regionally replicated disk.CreateSecondaryCustomDisk.java
(lines 1-111): Creates a secondary disk with custom parameters.StartRegionalDiskReplication.java
(lines 1-82): Starts asynchronous replication for a regional disk.StartZonalDiskReplication.java
(lines 1-82): Starts asynchronous replication for a zonal disk.StopRegionalDiskReplication.java
(lines 1-67): Stops asynchronous replication for a regional disk.StopZonalDiskReplication.java
(lines 1-67): Stops asynchronous replication for a zonal disk.AddDiskToConsistencyGroup.java
(lines 22, 51-52): Adds a disk to a consistency group.CloneRegionalDisksFromConsistencyGroup.java
(lines 1-73): Clones regional disks from a consistency group.CloneZonalDisksFromConsistencyGroup.java
(lines 1-73): Clones zonal disks from a consistency group.CreateConsistencyGroup.java
(lines 19, 42-43): Creates a consistency group.DeleteConsistencyGroup.java
(lines 18, 40-41): Deletes a consistency group.RemoveDiskFromConsistencyGroup.java
(lines 20, 51-52): Removes a disk from a consistency group.StopRegionalDiskReplicationConsistencyGroup.java
(lines 1-72): Stops replication of a regional consistency group.StopZonalDiskReplicationConsistencyGroup.java
(lines 1-73): Stops replication of a zonal consistency group.CreateSharedReservation.java
(lines 18, 29-30, 44-45): Creates a shared reservation.AttachSnapshotScheduleToDisk.java
(lines 1-77): Attaches a snapshot schedule to a disk.CreateSnapshotSchedule.java
(lines 1-116): Creates a snapshot schedule.DeleteSnapshotSchedule.java
(lines 1-64): Deletes a snapshot schedule.EditSnapshotSchedule.java
(lines 1-113): Edits a snapshot schedule.GetSnapshotSchedule.java
(lines 1-57): Gets a snapshot schedule.ListSnapshotSchedules.java
(lines 1-61): Lists snapshot schedules.RemoveSnapshotScheduleFromDisk.java
(lines 1-81): Removes a snapshot schedule from a disk.
-
Changes in test files: Several test files (
compute/cloud-client/src/test/java/compute
) were updated to reflect the addition of new samples and changes in functionality. There are also changes in thejobs
andsecretmanager
test files.
I will provide a more detailed code review once I've finished my analysis.
Meanwhile, a little verse for your perusal:
Code flows like a river,
Through branches, a steady stream,
Sync keeps it all clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files and updates related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, some minor improvements can be made, especially regarding error handling and consistency in placeholder values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request, and will post my full review in a few minutes. In the meantime, I'm providing a summary of the pull request's content to help everyone quickly get up to speed on the changes and intent.
This pull request, titled "Sync with main," appears to be a straightforward synchronization of the java-docs-samples
repository with its main
branch. I've analyzed the commits and identified the following key changes:
.github/CODEOWNERS
(Lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This suggests a change in ownership or responsibility for the translation-related samples..kokoro/tests/run_prptst_tests.sh
(Lines 90-93): Removed code related to sending test logs to FlakyBot for periodic builds (except for Java 8). This likely simplifies the testing process..kokoro/tests/run_test_java.sh
(Lines 96-99): Similar to the previous change, this removes FlakyBot integration from the Java test execution script, streamlining the testing workflow.compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(Lines 1-109): Added a new Java file,CreateInstanceWithRegionalDiskFromSnapshot.java
, which appears to demonstrate how to create a new Compute Engine instance with a regional disk from a snapshot. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(Lines 1-81): Added a new Java file demonstrating how to forcefully attach a regional disk to a Compute Engine instance, even if other VMs are using it. This is another significant addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(Lines 1-103): Added a new Java file showing how to create a secondary regional disk using asynchronous replication from a primary disk. This adds a new, substantial code example.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(Lines 1-92): Added a new Java file demonstrating the creation of a secondary zonal disk via asynchronous replication. This is another important addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(Lines 1-73): Added a new Java file showing how to create a disk with a linked snapshot schedule. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/CreateReplicatedDisk.java
(Lines 1-88): Added a new Java file demonstrating how to create a regionally replicated disk. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(Lines 1-111): Added a new Java file demonstrating how to create a secondary disk with custom parameters. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(Lines 1-82): Added a new Java file showing how to start asynchronous replication for a regional disk. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(Lines 1-82): Added a new Java file demonstrating how to start asynchronous replication for a zonal disk. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(Lines 1-67): Added a new Java file showing how to stop asynchronous replication for a regional disk. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(Lines 1-67): Added a new Java file demonstrating how to stop asynchronous replication for a zonal disk. This is a substantial addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(Lines 22, 51-54): Modified the return type ofaddDiskToConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(Lines 1-73): Added a new Java file demonstrating cloning regional disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(Lines 1-73): Added a new Java file demonstrating cloning zonal disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(Lines 19, 43-46): Modified the return type ofcreateConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(Lines 18, 41-44): Modified the return type ofdeleteConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(Lines 20, 52-55): Modified the return type ofremoveDiskFromConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(Lines 1-72): Added a new Java file demonstrating stopping replication of a regional consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(Lines 1-73): Added a new Java file demonstrating stopping replication of a zonal consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(Lines 18, 31, 48): Modified the class to use static methods instead of instance methods, removed unnecessary constructor, and modified return type ofcreateSharedReservation
from void toStatus
.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(Lines 1-77): Added a new Java file demonstrating attaching a snapshot schedule to a disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(Lines 1-116): Added a new Java file demonstrating creating a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(Lines 1-64): Added a new Java file demonstrating deleting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(Lines 1-113): Added a new Java file demonstrating editing a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(Lines 1-57): Added a new Java file demonstrating getting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(Lines 1-61): Added a new Java file demonstrating listing snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(Lines 1-81): Added a new Java file demonstrating removing a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(Lines 20, 52, 59, 121, 131, 204, 228): Added several new tests, modified existing tests, and updated cleanup logic for better resource management. AddedcreateDiskSnapshot
method.compute/cloud-client/src/test/java/compute/Util.java
(Lines 30, 217, 266, 291): Added new cleanup methods for regional disks and snapshot schedules.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(Lines 27, 53, 68, 91, 115, 139, 192): Added several new tests for consistency groups.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(Lines 1-151): Added a new test file for disk replication.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(Lines 18, 31, 69, 170, 210, 239, 276, 296): Added several tests and updated cleanup logic.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(Lines 32, 78, 116): Updated tests to useStatus
instead ofOperation.Status
.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(Lines 1-75): Added a new test file for attaching disks to instances.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(Lines 22, 63): Updated tests and cleanup logic.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(Lines 18, 51, 113, 180): Updated tests and cleanup logic.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(Lines 1-228): Added a new test file for snapshot schedules.endpoints/getting-started/k8s/esp_echo_http.yaml
(Lines 38, 56): Added comments to improve clarity and consistency.endpoints/multiple-versions/openapi-v1.yaml
(Lines 12, 15): Removed unnecessary comments.endpoints/multiple-versions/openapi-v2.yaml
(Lines 12, 15): Removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(Lines 46, 61, 83, 99, 124, 150): Updated comments and removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(Lines 73, 93, 132, 149): Updated comments and removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(Lines 48, 80, 114, 145, 181): Updated comments and removed unnecessary comments.jobs/v4/pom.xml
(Lines 40, 49): Updated dependency versions and removed unnecessary comments.secretmanager/src/main/java/secretmanager/CreateSecret.java
(Lines 21, 41): Added TTL configuration tocreateSecret
method.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(Lines 1-99): Added a new Java file demonstrating creating an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(Lines 1-60): Added a new Java file demonstrating deleting an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(Lines 1-62): Added a new Java file demonstrating getting an effective event threat detection custom module.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(Lines 1-62): Added a new Java file demonstrating getting an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(Lines 1-56): Added a new Java file demonstrating listing descendant event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(Lines 1-56): Added a new Java file demonstrating listing effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(Lines 1-55): Added a new Java file demonstrating listing event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(Lines 1-80): Added a new Java file demonstrating updating an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/ValidateEven 629A tThreatDetectionCustomModule.java
(Lines 1-82): Added a new Java file demonstrating validating an event threat detection custom module.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(Lines 1-236): Added a new test file for event threat detection custom modules.tpu/src/main/java/tpu/CreateQueuedResource.java
(Lines 1-98): Added a new Java file demonstrating creating a queued resource.tpu/src/main/java/tpu/CreateSpotQueuedResource.java
(Lines 1-103): Added a new Java file demonstrating creating a spot queued resource.tpu/src/main/java/tpu/CreateSpotTpuVm.java
(Lines 1-80): Added a new Java file demonstrating creating a spot TPU VM.tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
(Lines 1-110): Added a new Java file demonstrating creating a time-bound queued resource.tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
(Lines 1-84): Added a new Java file demonstrating creating a TPU VM with a startup script.tpu/src/main/java/tpu/DeleteForceQueuedResource.java
(Lines 74): Corrected comment formatting.tpu/src/main/java/tpu/DeleteQueuedResource.java
(Lines 1-58): Added a new Java file demonstrating deleting a queued resource.tpu/src/main/java/tpu/GetQueuedResource.java
(Lines 28, 50): Updated zone and corrected comment formatting.tpu/src/main/java/tpu/ListQueuedResources.java
(Lines 1-55): Added a new Java file demonstrating listing queued resources.tpu/src/test/java/tpu/QueuedResourceIT.java
(Lines 16, 28, 50, 94, 113): Updated tests and added test forCreateQueuedResource
andListQueuedResources
.tpu/src/test/java/tpu/TpuVmIT.java
(Lines 210): Added tests forCreateSpotTpuVm
andCreateTpuVmWithStartupScript
.
Let me know if you have any questions!
Roses are red,
Code reviews are blue,
Merge when it's green,
And all will be true!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files and updates related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, some minor improvements can be made, as detailed in the review comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, I'm providing this summary to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main," appears to be a straightforward synchronization of the java-docs-samples
repository with its main
branch. I've analyzed the commits and identified the following key changes:
.github/CODEOWNERS
(Lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This suggests a change in ownership or responsibility for the translation samples..kokoro/tests/run_prptst_tests.sh
(Lines 90-93): Removed code related to sending test logs to FlakyBot for periodic builds (except for Java 8). This likely simplifies the testing process..kokoro/tests/run_test_java.sh
(Lines 96-99): Similar to the previous change, removed FlakyBot integration for periodic builds (excluding Java 8).compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(Lines 1-109): Added a new Java file,CreateInstanceWithRegionalDiskFromSnapshot.java
, which demonstrates creating a Compute Engine instance with a regional disk from a snapshot. This is a significant addition, providing a new code example.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(Lines 1-81): Added a new Java file,AttachRegionalDiskForce.java
, demonstrating how to forcefully attach a regional disk to a Compute Engine instance. This adds another useful code sample.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(Lines 1-103): Added a new Java file,CreateDiskSecondaryRegional.java
, showcasing the creation of a secondary regional disk using asynchronous replication. This expands the disk management examples.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(Lines 1-92): Added a new Java file,CreateDiskSecondaryZonal.java
, demonstrating the creation of a secondary zonal disk via asynchronous replication. This further enhances the disk management examples.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(Lines 1-73): Added a new Java file,CreateDiskWithSnapshotSchedule.java
, showing how to create a disk with a linked snapshot schedule. This adds functionality for automated snapshots.compute/cloud-client/src/main/java/compute/disks/CreateReplicatedDisk.java
(Lines 1-88): Added a new Java file,CreateReplicatedDisk.java
, which demonstrates creating a regionally replicated disk. This provides an example of high availability disk configuration.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(Lines 1-111): Added a new Java file,CreateSecondaryCustomDisk.java
, demonstrating the creation of a secondary disk with custom parameters (guest OS features and labels). This provides a more flexible disk creation example.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(Lines 1-82): Added a new Java file,StartRegionalDiskReplication.java
, which demonstrates starting asynchronous replication for a regional disk. This adds a crucial step in disk replication management.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(Lines 1-82): Added a new Java file,StartZonalDiskReplication.java
, showing how to start asynchronous replication for a zonal disk. This complements the regional replication example.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(Lines 1-67): Added a new Java file,StopRegionalDiskReplication.java
, demonstrating how to stop asynchronous replication for a regional disk.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(Lines 1-67): Added a new Java file,StopZonalDiskReplication.java
, showing how to stop asynchronous replication for a zonal disk.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(Lines 22, 51-52): Modified the return type ofaddDiskToConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(Lines 1-73): Added a new Java file,CloneRegionalDisksFromConsistencyGroup.java
, demonstrating cloning regional disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(Lines 1-73): Added a new Java file,CloneZonalDisksFromConsistencyGroup.java
, demonstrating cloning zonal disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(Lines 19, 43-44): Modified the return type ofcreateConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(Lines 18, 41-42): Modified the return type ofdeleteConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(Lines 20, 52-53): Modified the return type ofremoveDiskFromConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(Lines 1-72): Added a new Java file,StopRegionalDiskReplicationConsistencyGroup.java
, demonstrating stopping replication of a regional consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(Lines 1-73): Added a new Java file,StopZonalDiskReplicationConsistencyGroup.java
, demonstrating stopping replication of a zonal consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(Lines 18, 48-49): Modified the return type ofcreateSharedReservation
from void toStatus
and removed unnecessary constructor.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(Lines 1-77): Added a new Java file,AttachSnapshotScheduleToDisk.java
, demonstrating attaching a snapshot schedule to a disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(Lines 1-116): Added a new Java file,CreateSnapshotSchedule.java
, demonstrating creating a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(Lines 1-64): Added a new Java file,DeleteSnapshotSchedule.java
, demonstrating deleting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(Lines 1-113): Added a new Java file,EditSnapshotSchedule.java
, demonstrating editing a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(Lines 1-57): Added a new Java file,GetSnapshotSchedule.java
, demonstrating getting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(Lines 1-61): Added a new Java file,ListSnapshotSchedules.java
, demonstrating listing snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(Lines 1-81): Added a new Java file,RemoveSnapshotScheduleFromDisk.java
, demonstrating removing a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(Lines 20, 59-60, 121-156): Added tests for creating snapshots and using them to create instances. Added new methods for cleanup.compute/cloud-client/src/test/java/compute/Util.java
(Lines 30, 217-223, 287-337): Added methods for cleaning up regional disks and snapshot schedules. Modified existing cleanup methods.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(Lines 27, 53-54, 91-92, 115-116, 139-140, 192-304): Added tests for consistency group operations (clone, stop replication, etc.). Modified existing tests for consistency.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(Lines 1-151): Added a new test file for disk replication operations.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(Lines 18, 31, 69, 101-112, 170-173, 239-240, 276-277, 296-297, 299-406): Added tests for creating various types of disks and managing snapshot schedules. Added new methods for cleanup.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(Lines 32, 78-79, 116-117): Modified tests for consistency.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(Lines 1-75): Added a new test file for attaching disks to instances.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(Lines 22, 63-64): Added cleanup for reservations and importedUtil
class.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(Lines 18, 51, 113-114, 180-229): Added tests for creating shared reservations. Modified existing tests for consistency.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(Lines 1-228): Added a new test file for snapshot schedule operations.endpoints/getting-started/k8s/esp_echo_http.yaml
(Lines 38-60): Added comments to clarify the purpose of the secret and service configurations.endpoints/multiple-versions/openapi-v1.yaml
(Lines 12-22): Removed unnecessary comments.endpoints/multiple-versions/openapi-v2.yaml
(Lines 12-22): Removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(Lines 46, 61, 83, 102, 124, 153): Updated comments to use consistent naming conventions.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(Lines 73, 93, 132, 152): Updated comments to use consistent naming conventions.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(Lines 48, 80, 114, 145, 181): Updated comments to use consistent naming conventions.jobs/v4/pom.xml
(Lines 40-63): Updated the dependency version forgoogle-api-services-jobs
.secretmanager/src/main/java/secretmanager/CreateSecret.java
(Lines 21, 41-52): Added the ability to set a TTL for secrets.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(Lines 1-99): Added a new file for creating event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(Lines 1-60): Added a new file for deleting event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(Lines 1-62): Added a new file for getting effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(Lines 1-62): Added a new file for getting event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(Lines 1-56): Added a new file for listing descendant event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(Lines 1-56): Added a new file for listing effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(Lines 1-55): Added a new file for listing event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(Lines 1-80): Added a new file for updating event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ValidateEventThreatDetectionCustomModule.java
(Lines 1-82): Added a new file for validating event threat detection custom modules.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(Lines 1-236): Added a new test file for event threat detection custom modules.tpu/src/main/java/tpu/CreateQueuedResource.java
(Lines 1-98): Added a new file for creating queued resources.tpu/src/main/java/tpu/CreateSpotQueuedResource.java
(Lines 1-103): Added a new file for creating spot queued resources.tpu/src/main/java/tpu/CreateSpotTpuVm.java
(Lines 1-80): Added a new file for creating spot TPU VMs.tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
(Lines 1-110): Added a new file for creating time-bound queued resources.tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
(Lines 1-84): Added a new file for creating TPU VMs with startup scripts.tpu/src/main/java/tpu/DeleteForceQueuedResource.java
(Lines 74-75): Modified the end comment.tpu/src/main/java/tpu/DeleteQueuedResource.java
(Lines 1-58): Added a new file for deleting queued resources.tpu/src/main/java/tpu/GetQueuedResource.java
(Lines 28, 50-51): Modified the zone and end comment.tpu/src/main/java/tpu/ListQueuedResources.java
(Lines 1-55): Added a new file for listing queued resources.tpu/src/test/java/tpu/QueuedResourceIT.java
(Lines 16, 28, 50, 94-95, 113-114, 136-137, 192-269): Added tests for queued resource operations. Modified existing tests for consistency. Added new tests for spot and time-bound queued resources.tpu/src/test/java/tpu/TpuVmIT.java
(Lines 210-267): Added tests for creating spot TPU VMs and TPU VMs with startup scripts. Modified existing tests for consistency.
Let me know if you have any questions!
Short poem:
Code flows like a stream,
Reviews check each careful line,
A better world's built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files and updates related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, some minor improvements can be made, especially regarding error handling and consistency in placeholder values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request, and will post my full review in a few minutes. In the meantime, I'm providing this summary to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main", appears to be a straightforward synchronization of the java-docs-samples
repository with its main
branch. I've analyzed the commits and identified the following key changes:
.github/CODEOWNERS
(lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This suggests a change in ownership or responsibility for the translation samples..kokoro/tests/run_prptst_tests.sh
(lines 90-93): Removed code related to sending test logs to FlakyBot for periodic builds (except for Java 8). This likely simplifies the testing process and reduces reliance on external tools..kokoro/tests/run_test_java.sh
(lines 96-99): Similar to the previous change, this removes FlakyBot integration from the Java test execution script, streamlining the testing workflow.compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(lines 1-109): Added a new Java file,CreateInstanceWithRegionalDiskFromSnapshot.java
, which provides a sample for creating a Compute Engine instance with a regional disk from a snapshot. This is a substantial addition, introducing new functionality.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(lines 1-81): Added a new Java file,AttachRegionalDiskForce.java
, demonstrating how to forcefully attach a regional disk to a Compute Engine instance. This adds another useful sample.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(lines 1-103): Added a new Java file,CreateDiskSecondaryRegional.java
, providing a sample for creating a secondary regional disk using asynchronous replication. This is a significant addition.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(lines 1-92): Added a new Java file,CreateDiskSecondaryZonal.java
, offering a sample for creating a secondary zonal disk using asynchronous replication. This is another substantial addition.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(lines 1-73): Added a new Java file,CreateDiskWithSnapshotSchedule.java
, showing how to create a disk with a linked snapshot schedule. This adds a new feature to the samples.compute/cloud-client/src/main/java/compute/disks/CreateReplicatedDisk.java
(lines 1-88): Added a new Java file,CreateReplicatedDisk.java
, providing a sample for creating a regionally replicated disk. This is a valuable addition.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(lines 1-111): Added a new Java file,CreateSecondaryCustomDisk.java
, demonstrating the creation of a secondary disk with custom parameters. This is another significant addition.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(lines 1-82): Added a new Java file,StartRegionalDiskReplication.java
, which shows how to start asynchronous replication for a regional disk.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(lines 1-82): Added a new Java file,StartZonalDiskReplication.java
, showing how to start asynchronous replication for a zonal disk.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(lines 1-67): Added a new Java file,StopRegionalDiskReplication.java
, demonstrating how to stop asynchronous replication for a regional disk.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(lines 1-67): Added a new Java file,StopZonalDiskReplication.java
, showing how to stop asynchronous replication for a zonal disk.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(lines 22, 51-52): Modified theaddDiskToConsistencyGroup
method to returnStatus
instead ofOperation.Status
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file,CloneRegionalDisksFromConsistencyGroup.java
, providing a sample for cloning regional disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file,CloneZonalDisksFromConsistencyGroup.java
, offering a sample for cloning zonal disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(lines 19, 43-44): Modified thecreateConsistencyGroup
method to returnStatus
instead ofOperation.Status
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(lines 18, 41-42): Modified thedeleteConsistencyGroup
method to returnStatus
instead ofOperation.Status
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(lines 20, 52-53): Modified theremoveDiskFromConsistencyGroup
method to returnStatus
instead ofOperation.Status
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(lines 1-72): Added a new Java file,StopRegionalDiskReplicationConsistencyGroup.java
, providing a sample for stopping replication of a regional consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(lines 1-73): Added a new Java file,StopZonalDiskReplicationConsistencyGroup.java
, offering a sample for stopping replication of a zonal consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(lines 18, 31, 48): Modified thecreateSharedReservation
method to returnStatus
instead of void and updated the method signature accordingly.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(lines 1-77): Added a new Java file,AttachSnapshotScheduleToDisk.java
, providing a sample for attaching a snapshot schedule to a disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(lines 1-116): Added a new Java file,CreateSnapshotSchedule.java
, offering a sample for creating a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(lines 1-64): Added a new Java file,DeleteSnapshotSchedule.java
, providing a sample for deleting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(lines 1-113): Added a new Java file,EditSnapshotSchedule.java
, offering a sample for editing a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(lines 1-57): Added a new Java file,GetSnapshotSchedule.java
, providing a sample for getting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(lines 1-61): Added a new Java file,ListSnapshotSchedules.java
, offering a sample for listing snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(lines 1-81): Added a new Java file,RemoveSnapshotScheduleFromDisk.java
, providing a sample for removing a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(lines 20, 52, 59, 121, 131, 228): Added several new test methods and updated existing ones to reflect the added functionality.compute/cloud-client/src/test/java/compute/Util.java
(lines 30, 217, 287, 327): Added several new methods to support cleanup of various resources.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(lines 27, 53, 62, 68, 91, 115, 139, 192): Added several new test methods and updated existing ones to reflect the added functionality.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(lines 1-151): Added a new test file,DiskReplicationIT.java
, containing tests for disk replication operations.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(lines 18, 31, 69, 170, 239, 276, 296): Added several new test methods and updated existing ones to reflect the added functionality.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(lines 32, 78, 116): Updated existing test methods to reflect the added functionality.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(lines 1-75): Added a new test file,InstanceAttachDiskIT.java
, containing tests for attaching disks to instances.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(lines 22, 63): Updated existing test methods to reflect the added functionality.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(lines 18, 51, 113, 180): Added several new test methods and updated existing ones to reflect the added functionality.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(lines 1-228): Added a new test file,SnapshotScheduleIT.java
, containing tests for snapshot schedule operations.endpoints/getting-started/k8s/esp_echo_http.yaml
(lines 38, 56): Updated the Kubernetes deployment file to include comments for secret and service configurations.endpoints/multiple-versions/openapi-v1.yaml
(lines 12, 15): Removed unnecessary comments from the OpenAPI specification files.endpoints/multiple-versions/openapi-v2.yaml
(lines 12, 15): Removed unnecessary comments from the OpenAPI specification files.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(lines 46, 61, 83, 124, 150): Updated the sample code to use more descriptive comments and remove unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(lines 73, 93, 132, 149): Updated the sample code to use more descriptive comments and remove unnecessary comments.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(lines 48, 80, 114, 145, 181): Updated the sample code to use more descriptive comments and remove unnecessary comments.jobs/v4/pom.xml
(lines 40, 49): Updated the pom.xml file to reflect the updated version of the Google Cloud Jobs API client library.secretmanager/src/main/java/secretmanager/CreateSecret.java
(lines 21, 41): Updated the sample code to include an optional TTL for secrets.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(lines 1-99): Added a new sample file for creating an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(lines 1-60): Added a new sample file for deleting an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(lines 1-62): Added a new sample file for getting an effective event threat detection custom module.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(lines 1-62): Added a new sample file for getting an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(lines 1-56): Added a new sample file for listing descendant event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(lines 1-56): Added a new sample file for listing effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(lines 1-55): Added a new sample file for listing event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(lines 1-80): Added a new sample file for updating an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/ValidateEventThreatDetectionCustomModule.java
(lines 1-82): Added a new sample file for validating an event threat detection custom module.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(lines 1-236): Added a new test file for testing event threat detection custom module operations.storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java
(lines 14, 68): Updated comments in the test utility file.tpu/src/main/java/tpu/CreateQueuedResource.java
(lines 1-98): Added a new sample file for creating a TPU queued resource.tpu/src/main/java/tpu/CreateSpotQueuedResource.java
(lines 1-103): Added a new sample file for creating a spot TPU queued resource.tpu/src/main/java/tpu/CreateSpotTpuVm.java
(lines 1-80): Added a new sample file for creating a spot TPU VM.tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
(lines 1-110): Added a new sample file for creating a time-bound TPU queued resource.tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
(lines 1-84): Added a new sample file for creating a TPU VM with a startup script.tpu/src/main/java/tpu/DeleteForceQueuedResource.java
(lines 74): Updated the comment in the sample file.tpu/src/main/java/tpu/DeleteQueuedResource.java
(lines 1-58): Added a new sample file for deleting a TPU queued resource.tpu/src/main/java/tpu/GetQueuedResource.java
(lines 28, 50): Updated the sample file.tpu/src/main/java/tpu/ListQueuedResources.java
(lines 1-55): Added a new sample file for listing TPU queued resources.tpu/src/test/java/tpu/QueuedResourceIT.java
(lines 16, 28, 50, 94): Added several new test methods and updated existing ones to reflect the added functionality.tpu/src/test/java/tpu/TpuVmIT.java
(lines 210): Added several new test methods and updated existing ones to reflect the added functionality.
This PR significantly expands the functionality and documentation of the java-docs-samples
repository. The changes are well-organized and clearly documented. The removal of FlakyBot integration is a positive step towards simplification. The new samples are valuable additions, providing clear examples of various Compute Engine and TPU features.
Small changes, big impact,
Code flows like a river's grant,
Review with a smile!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, some minor improvements can be made, as detailed in the review comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, I'm providing this summary to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main," appears to be focused on synchronizing the java-docs-samples
repository with its main
branch. The changes include:
- Updating CODEOWNERS: Line 82 of the
.github/CODEOWNERS
file was modified to add@GoogleCloudPlatform/cloud-ml-translate-dev
as a code owner for the/translate
directory. This suggests a change in team responsibility or ownership for the translation samples. - Removing FlakyBot calls: Sections of code related to FlakyBot were removed from
.kokoro/tests/run_prptst_tests.sh
(lines 93-98) and.kokoro/tests/run_test_java.sh
(lines 99-104). This implies a simplification of the testing process, potentially due to changes in the FlakyBot infrastructure or a decision to handle flaky tests differently. - Adding new Compute Engine samples: Several new Java files were added to the
compute/cloud-client/src/main/java/compute
andcompute/cloud-client/src/main/java/compute/disks
directories. These files appear to be new Compute Engine samples demonstrating various disk operations, including:- Creating instances with regional disks from snapshots (
CreateInstanceWithRegionalDiskFromSnapshot.java
) - Attaching regional disks forcefully (
AttachRegionalDiskForce.java
) - Creating secondary regional disks (
CreateDiskSecondaryRegional.java
) - Creating secondary zonal disks (
CreateDiskSecondaryZonal.java
) - Creating disks with snapshot schedules (
CreateDiskWithSnapshotSchedule.java
) - Creating replicated disks (
CreateReplicatedDisk.java
) - Creating secondary custom disks (
CreateSecondaryCustomDisk.java
) - Starting and stopping regional and zonal disk replication (
StartRegionalDiskReplication.java
,StartZonalDiskReplication.java
,StopRegionalDiskReplication.java
,StopZonalDiskReplication.java
) - Managing disks within consistency groups (
AddDiskToConsistencyGroup.java
,CloneRegionalDisksFromConsistencyGroup.java
,CloneZonalDisksFromConsistencyGroup.java
,CreateConsistencyGroup.java
,DeleteConsistencyGroup.java
,RemoveDiskFromConsistencyGroup.java
,StopRegionalDiskReplicationConsistencyGroup.java
,StopZonalDiskReplicationConsistencyGroup.java
)
- Creating instances with regional disks from snapshots (
- Updating
compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
: Line 25 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofaddDiskToConsistencyGroup
method was changed toStatus
(line 54). - Updating
compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
: Line 22 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofcreateConsistencyGroup
method was changed toStatus
(line 46). - Updating
compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
: Line 22 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofdeleteConsistencyGroup
method was changed toStatus
(line 46). - Updating
compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
: Line 24 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofremoveDiskFromConsistencyGroup
method was changed toStatus
(line 55). - Updating
compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
: Line 24 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofcreateSharedReservation
method was changed toStatus
(line 55). - Updating
compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
: Line 25 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofattachSnapshotScheduleToDisk
method was changed toStatus
(line 55). - Updating
compute/cloud-client/src/main/java/compu 10000 te/snapshotschedule/CreateSnapshotSchedule.java
: Line 23 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofcreateSnapshotSchedule
method was changed toStatus
(line 65). - Updating
compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
: Line 23 addedimport com.google.cloud.compute.v1.Operation.Status;
and the return type ofdeleteSnapshotSchedule
method was changed toStatus
(line 50).
Please note that without access to the complete codebase, this summary is based on the provided diffs. There might be additional context not captured here.
Short poem:
Code flows like a stream,
Reviews guide its gentle path,
Bugs flee in the night.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files and updates related to asynchronous disk replication, snapshot schedules, and consistency groups. The changes are well-structured and generally follow best practices. However, some minor improvements can be made regarding documentation and flexibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request and will post my feedback in a few minutes. In the meantime, I'm providing a summary of the pull request's content to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main," aims to synchronize the java-docs-samples
repository with its main
branch. The changes include:
- Update to
.github/CODEOWNERS
(lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This likely assigns ownership of the translation samples to an additional team. - Removal of FlakyBot calls in Kokoro test scripts:
.kokoro/tests/run_prptst_tests.sh
(lines 90-98): Removed the section that sends test logs to FlakyBot for periodic builds (except for Java 8)..kokoro/tests/run_test_java.sh
(lines 96-104): Similar removal of FlakyBot calls for periodic builds (excluding Java 8).
- Addition of new Java files in the
compute
directory:compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(lines 1-109): Added a new Java file demonstrating how to create a VM instance with a regional disk from a snapshot, specifying replica zones.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(lines 1-81): Added a new Java file showing how to attach a regional disk to an instance, forcing the attachment even if other VMs are using the disk.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(lines 1-103): Added a new Java file demonstrating the creation of a secondary regional disk.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(lines 1-92): Added a new Java file demonstrating the creation of a secondary zonal disk.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(lines 1-73): Added a new Java file demonstrating how to create a disk with a linked snapshot schedule.compute/cloud-client/src/main/java/compute/disks/CreateReplicatedDisk.java
(lines 1-88): Added a new Java file demonstrating the creation of a replicated disk.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(lines 1-111): Added a new Java file demonstrating the creation of a secondary custom disk.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(lines 1-82): Added a new Java file demonstrating how to start regional disk replication.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(lines 1-82): Added a new Java file demonstrating how to start zonal disk replication.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(lines 1-67): Added a new Java file demonstrating how to stop regional disk replication.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(lines 1-67): Added a new Java file demonstrating how to stop zonal disk replication.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(lines 22, 51-52): Modified the return type ofaddDiskToConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file demonstrating how to clone regional disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file demonstrating how to clone zonal disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(lines 19, 42-43): Modified the return type ofcreateConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(lines 18, 40-41): Modified the return type ofdeleteConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(lines 20, 51-52): Modified the return type ofremoveDiskFromConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(lines 1-72): Added a new Java file demonstrating how to stop regional disk replication for a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(lines 1-73): Added a new Java file demonstrating how to stop zonal disk replication for a consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(lines 18, 29-30): Modified the return type ofcreateSharedReservation
from void toStatus
and removed unnecessary constructor.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(lines 1-77): Added a new Java file demonstrating how to attach a snapshot schedule to a disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(lines 1-116): Added a new Java file demonstrating how to create a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(lines 1-64): Added a new Java file demonstrating how to delete a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(lines 1-113): Added a new Java file demonstrating how to edit a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(lines 1-57): Added a new Java file demonstrating how to get a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(lines 1-61): Added a new Java file demonstrating how to list snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(lines 1-81): Added a new Java file demonstrating how to remove a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(lines 59, 87, 134, 228): Added several tests and updated existing ones.compute/cloud-client/src/test/java/compute/Util.java
(lines 30, 217, 287, 327): Added helper functions for cleanup.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(lines 62, 78, 101, 125, 149, 202): Added tests for consistency groups.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(lines 1-151): Added tests for disk replication.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(lines 18, 33, 69, 170, 239, 276, 296): Added tests for disks.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(lines 32, 78, 116): Added tests for hyperdisks.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(lines 1-75): Added tests for attaching disks to instances.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(lines 22, 63): Added tests for reservation CRUD operations.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(lines 18, 51, 113, 180): Added tests for reservations.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(lines 1-228): Added tests for snapshot schedules.endpoints/getting-started/k8s/esp_echo_http.yaml
(lines 38, 56): Updated Kubernetes YAML file.endpoints/multiple-versions/openapi-v1.yaml
(lines 12): Updated OpenAPI YAML file.endpoints/multiple-versions/openapi-v2.yaml
(lines 12): Updated OpenAPI YAML file.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(lines 46, 61, 83, 103, 124, 150): Updated Java code.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(lines 73, 93, 132, 150): Updated Java code.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(lines 48, 80, 114, 145, 181, 214): Updated Java code.jobs/v4/pom.xml
(lines 40): Updated pom.xml file.secretmanager/src/main/java/secretmanager/CreateSecret.java
(lines 21, 41): Updated Java code.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(lines 1-99): Added a new Java file demonstrating how to create an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(lines 1-60): Added a new Java file demonstrating how to delete an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(lines 1-62): Added a new Java file demonstrating how to get an effective event threat detection custom module.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(lines 1-62): Added a new Java file demonstrating how to get an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(lines 1-56): Added a new Java file demonstrating how to list descendant event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(lines 1-56): Added a new Java file demonstrating how to list effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(lines 1-55): Added a new Java file demonstrating how to list event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(lines 1-80): Added a new Java file demonstrating how to update an event threat detection custom module.security-command-center/snippets/src/main/java/management/api/ValidateEventThreatDetectionCustomModule.java
(lines 1-82): Added a new Java file demonstrating how to validate an event threat detection custom module.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(lines 1-236): Added tests for event threat detection custom modules.storage-transfer/src/test/java/com/google/cloud/storage/storagetransfer/samples/test/util/TransferJobUtils.java
(lines 14, 68): Updated Java code.tpu/src/main/java/tpu/CreateQueuedResource.java
(lines 1-98): Added a new Java file demonstrating how to create a queued resource.tpu/src/main/java/tpu/CreateSpotQueuedResource.java
(lines 1-103): Added a new Java file demonstrating how to create a spot queued resource.tpu/src/main/java/tpu/CreateSpotTpuVm.java
(lines 1-80): Added a new Java file demonstrating how to create a spot TPU VM.tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
(lines 1-110): Added a new Java file demonstrating how to create a time-bound queued resource.tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
(lines 1-84): Added a new Java file demonstrating how to create a TPU VM with a startup script.tpu/src/main/java/tpu/DeleteForceQueuedResource.java
(lines 74): Updated Java code.tpu/src/main/java/tpu/DeleteQueuedResource.java
(lines 1-58): Added a new Java file demonstrating how to delete a queued resource.tpu/src/main/java/tpu/GetQueuedResource.java
(lines 28, 50): Updated Java code.tpu/src/main/java/tpu/ListQueuedResources.java
(lines 1-55): Added a new Java file demonstrating how to list queued resources.tpu/src/test/java/tpu/QueuedResourceIT.java
(lines 16, 28, 50, 94): Added tests for queued resources.tpu/src/test/java/tpu/TpuVmIT.java
(lines 210): Added tests for TPU VMs.
This is a substantial update affecting various parts of the repository. Please review each change carefully. The removal of FlakyBot calls might require additional investigation to ensure that flaky tests are still properly identified and addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes FlakyBot integration, and introduces several new files and updates related to asynchronous disk replication and snapshot schedules. The changes are generally well-structured and adhere to best practices. A few minor improvements and suggestions are outlined in the review comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request and will post my feedback in a few minutes. In the meantime, I'm providing a summary of the pull request's content to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main," appears to be a straightforward synchronization of the java-docs-samples
repository with its main
branch. I've analyzed the changes and found the following:
.github/CODEOWNERS
(lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This suggests a change in ownership or responsibility for the translation samples..kokoro/tests/run_prptst_tests.sh
(lines 90-93): Removed code related to flaky test reporting using FlakyBot. This might indicate a change in the testing infrastructure or a decision to handle flaky tests differently..kokoro/tests/run_test_java.sh
(lines 96-99): Similar to the previous change, this removes FlakyBot integration from another test script. This reinforces the change in flaky test handling.compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(lines 1-109): Added a new Java file. This file contains code for creating a Compute Engine instance with a regional disk from a snapshot. It includes comprehensive comments and error handling.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(lines 1-81): Added a new Java file. This file demonstrates how to forcefully attach a regional disk to a Compute Engine instance, even if the disk is in use by other VMs.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(lines 1-103): Added a new Java file. This file shows how to create a secondary regional disk using asynchronous replication from a primary disk in a different project.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(lines 1-92): Added a new Java file. This file provides code for creating a secondary zonal disk using asynchronous replication from a primary disk in a different project.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(lines 1-73): Added a new Java file. This file demonstrates creating a disk with a linked snapshot schedule for automated backups.compute/cloud-client/src/main/java/compute/disks/CreateReplicatedDisk.java
(lines 1-88): Added a new Java file. This file shows how to create a replicated regional disk in Compute Engine.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(lines 1-111): Added a new Java file. This file demonstrates creating a secondary disk with custom parameters, including guest OS features and labels.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(lines 1-82): Added a new Java file. This file shows how to start asynchronous replication for a regional disk.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(lines 1-82): Added a new Java file. This file shows how to start asynchronous replication for a zonal disk.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(lines 1-67): Added a new Java file. This file shows how to stop asynchronous replication for a regional disk.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(lines 1-67): Added a new Java file. This file shows how to stop asynchronous replication for a zonal disk.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(lines 22, 51-52): Modified an existing Java file. The changes are related to the return type of theaddDiskToConsistencyGroup
method, changing it fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file. This file demonstrates cloning regional disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file. This file demonstrates cloning zonal disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(lines 19, 42-43): Modified an existing Java file. The changes are related to the return type of thecreateConsistencyGroup
method, changing it fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(lines 18, 40-41): Modified an existing Java file. The changes are related to the return type of thedeleteConsistencyGroup
method, changing it fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(lines 20, 51-52): Modified an existing Java file. The changes are related to the return type of theremoveDiskFromConsistencyGroup
method, changing it fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(lines 1-72): Added a new Java file. This file demonstrates stopping replication of a regional consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(lines 1-73): Added a new Java file. This file demonstrates stopping replication of a zonal consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(lines 18, 29-31, 44-48): Modified an existing Java file. Changes include removing a constructor and updating the method signature to return aStatus
instead of void. The code now uses a try-with-resources block for the client.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(lines 1-77): Added a new Java file. This file demonstrates attaching a snapshot schedule to a disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(lines 1-116): Added a new Java file. This file demonstrates creating a snapshot schedule policy.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(lines 1-64): Added a new Java file. This file demonstrates deleting a snapshot schedule policy.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(lines 1-113): Added a new Java file. This file demonstrates editing a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(lines 1-57): Added a new Java file. This file demonstrates getting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(lines 1-61): Added a new Java file. This file demonstrates listing snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(lines 1-81): Added a new Java file. This file demonstrates removing a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(lines 20, 52-59, 72-87, 121-133): Modified an existing Java file. Added several new tests and updated existing ones to reflect the new files added to the project. Added a method to create a snapshot from a disk.compute/cloud-client/src/test/java/compute/Util.java
(lines 30, 217-223, 266-291): Modified an existing Java file. Added methods for cleaning up regional disks and snapshot schedules.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(lines 27-38, 53-62, 68-70, 91-93, 115-117, 139-141, 192-204): Modified an existing Java file. Added several new tests and updated existing ones to reflect the new files added to the project.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(lines 1-151): Added a new Java file. This file contains integration tests for disk replication functionality.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(lines 18, 31-47, 69-101, 170-173, 239-253, 276-296): Modified an existing Java file. Updated existing tests and added new tests for the new disk functionality.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(lines 32, 78-80, 116-118): Modified an existing Java file. Updated existing tests to reflect the new changes.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(lines 1-75): Added a new Java file. This file contains integration tests for attaching disks to instances.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(lines 22, 63-64): Modified an existing Java file. Added cleanup for existing reservations.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(lines 18-35, 51-57, 113-115, 180-229): Modified an existing Java file. Updated existing tests and added new tests for the new reservation functionality.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(lines 1-228): Added a new Java file. This file contains integration tests for snapshot schedule functionality.endpoints/getting-started/k8s/esp_echo_http.yaml
(lines 38-66): Modified an existing YAML file. Added comments to the file to explain the different sections of the file.endpoints/multiple-versions/openapi-v1.yaml
(lines 12-22): Modified an existing YAML file. Removed unnecessary comments.endpoints/multiple-versions/openapi-v2.yaml
(lines 12-22): Modified an existing YAML file. Removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(lines 46, 61, 83, 124, 153): Modified an existing Java file. Updated comments to reflect the new changes.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(lines 73, 93, 132, 152): Modified an existing Java file. Updated comments to reflect the new changes.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(lines 48, 80, 114, 145, 181): Modified an existing Java file. Updated comments to reflect the new changes.jobs/v4/pom.xml
(lines 40-63): Modified an existing XML file. Updated the version of the google-api-services-jobs dependency.secretmanager/src/main/java/secretmanager/CreateSecret.java
(lines 21, 41-51): Modified an existing Java file. Added the ability to set a TTL for the secret.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(lines 1-99): Added a new Java file. This file demonstrates creating an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(lines 1-60): Added a new Java file. This file demonstrates deleting an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(lines 1-62): Added a new Java file. This file demonstrates getting an effective Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(lines 1-62): Added a new Java file. This file demonstrates getting an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(lines 1-56): Added a new Java file. This file demonstrates listing descendant Event Threat Detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(lines 1-56): Added a new Java file. This file demonstrates listing effective Event Threat Detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(lines 1-55): Added a new Java file. This file demonstrates listing Event Threat Detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(lines 1-80): Added a new Java file. This file demonstrates updating an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/ValidateEventThreatDetectionCustomModule.java
(lines 1-82): Added a new Java file. This file demonstrates validating an Event Threat Detection custom module.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(lines 1-236): Added a new Java file. This file contains integration tests for Event Threat Detection custom module functionality.
Please let me know if you have any questions.
Small changes made,
Code now flows so smoothly,
A better program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, some minor improvements can be made, especially regarding error handling and consistency in placeholder values. Additionally, the update to the CODEOWNERS file should be explained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request, and will post my full review in a few minutes. In the meantime, I'm providing this summary to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main", appears to be a synchronization effort to bring the java-docs-samples
repository up-to-date with its main
branch. I've analyzed the changes and found the following:
.github/CODEOWNERS
(lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This suggests a change in ownership or responsibility for the translation samples..kokoro/tests/run_prptst_tests.sh
(lines 90-93): Removed code related to FlakyBot reporting for periodic builds (except for Java 8). This likely simplifies the testing infrastructure..kokoro/tests/run_test_java.sh
(lines 96-99): Similar to the previous change, this removes FlakyBot reporting for periodic builds (excluding Java 8) from this test script.compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(lines 1-109): Added a new Java file containing a sample for creating a Compute Engine instance with a regional disk from a snapshot. This adds new functionality to the samples.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(lines 1-81): Added a new Java file demonstrating how to forcefully attach a regional disk to a Compute Engine instance. This is another addition to the Compute Engine samples.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(lines 1-103): Added a new Java file showing how to create a secondary regional disk using asynchronous replication. This enhances the disk management samples.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(lines 1-92): Added a new Java file demonstrating the creation of a secondary zonal disk via asynchronous replication. This is another addition to the disk management samples.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(lines 1-73): Added a new Java file showing how to create a disk with a linked snapshot schedule. This adds functionality for automated snapshots.compute/cloud-client/src/main/java/compute/disks/CreateReplicatedDisk.java
(lines 1-88): Added a new Java file demonstrating the creation of a regional replicated disk. This adds another disk creation sample.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(lines 1-111): Added a new Java file showing how to create a secondary disk with custom parameters (guest OS features and labels). This provides more customization options for disk creation.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(lines 1-82): Added a new Java file demonstrating how to start asynchronous replication for a regional disk. This adds functionality for disk replication.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(lines 1-82): Added a new Java file for starting asynchronous replication for a zonal disk. This complements the regional replication sample.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(lines 1-67): Added a new Java file demonstrating how to stop asynchronous replication for a regional disk.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(lines 1-67): Added a new Java file for stopping asynchronous replication for a zonal disk. This complements the regional stop replication sample.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(lines 22, 51-52): Modified the return type ofaddDiskToConsistencyGroup
fromOperation.Status
toStatus
. This is a minor change for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file for cloning regional disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file for cloning zonal disks from a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(lines 19, 42-43): Modified the return type ofcreateConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(lines 18, 40-41): Modified the return type ofdeleteConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(lines 20, 51-52): Modified the return type ofremoveDiskFromConsistencyGroup
fromOperation.Status
toStatus
.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(lines 1-72): Added a new Java file for stopping regional disk replication within a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(lines 1-73): Added a new Java file for stopping zonal disk replication within a consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(lines 18, 28-29, 43-44): Modified the return type ofcreateSharedReservation
fromvoid
toStatus
and removed unnecessary constructor.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(lines 1-77): Added a new Java file for attaching a snapshot schedule to a disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(lines 1-116): Added a new Java file for creating a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(lines 1-64): Added a new Java file for deleting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(lines 1-113): Added a new Java file for editing a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(lines 1-57): Added a new Java file for getting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(lines 1-61): Added a new Java file for listing snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(lines 1-81): Added a new Java file for removing a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(lines 20, 52-59, 87-97, 121-132): Added tests for new functionality and modified existing tests for consistency.compute/cloud-client/src/test/java/compute/Util.java
(lines 30, 217-223, 266-267, 291-292): Added helper functions for cleanup and modified existing functions for consistency.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(lines 27, 53-62, 68-79, 91-102, 115-126, 139-150, 192-304): Added tests for new functionality and modified existing tests for consistency.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(lines 1-151): Added a new file with tests for disk replication.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(lines 18, 31-49, 69-88, 101-169, 170-206, 239-283, 296-326): Added tests for new functionality and modified existing tests for consistency.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(lines 32, 78-80, 116-118): Modified existing tests for consistency.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(lines 1-75): Added a new file with tests for attaching disks to instances.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(lines 22, 63-64): Modified existing tests for consistency.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(lines 18, 51-60, 113-120, 180-212): Added tests for new functionality and modified existing tests for consistency.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(lines 1-228): Added a new file with tests for snapshot schedules.endpoints/getting-started/k8s/esp_echo_http.yaml
(lines 38-60): Added comments to improve clarity.endpoints/multiple-versions/openapi-v1.yaml
(lines 12-22): Removed unnecessary comments.endpoints/multiple-versions/openapi-v2.yaml
(lines 12-22): Removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(lines 46, 61, 83, 102, 124, 150): Updated comments for consistency.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(lines 73, 93, 132, 152): Updated comments for consistency.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(lines 48, 80, 114, 145, 181): Updated comments for consistency.jobs/v4/pom.xml
(lines 40-60): Updated dependency versions and removed unnecessary comments.secretmanager/src/main/java/secretmanager/CreateSecret.java
(lines 21, 41-52): Added functionality for setting a TTL for secrets.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(lines 1-99): Added a new file for creating event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(lines 1-60): Added a new file for deleting event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(lines 1-62): Added a new file for getting effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(lines 1-62): Added a new file for getting event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(lines 1-56): Added a new file for listing descendant event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(lines 1-56): Added a new file for listing effective event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(lines 1-55): Added a new file for listing event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(lines 1-80): Added a new file for updating event threat detection custom modules.security-command-center/snippets/src/main/java/management/api/ValidateEventThreatDetectionCustomModule.java
(lines 1-82): Added a new file for validating event threat detection custom modules.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(lines 1-236): Added a new file with tests for event threat detection custom modules.tpu/src/main/java/tpu/CreateQueuedResource.java
(lines 1-98): Added a new file for creating queued resources.tpu/src/main/java/tpu/CreateSpotQueuedResource.java
(lines 1-103): Added a new file for creating spot queued resources.tpu/src/main/java/tpu/CreateSpotTpuVm.java
(lines 1-80): Added a new file for creating spot TPU VMs.tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
(lines 1-110): Added a new file for creating time-bound queued resources.tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
(lines 1-84): Added a new file for creating TPU VMs with startup scripts.tpu/src/main/java/tpu/DeleteForceQueuedResource.java
(lines 74): Modified comment for consistency.tpu/src/main/java/tpu/DeleteQueuedResource.java
(lines 1-58): Added a new file for deleting queued resources.tpu/src/main/java/tpu/GetQueuedResource.java
(lines 28, 50): Modified existing code for consistency.tpu/src/main/java/tpu/ListQueuedResources.java
(lines 1-55): Added a new file for listing queued resources.tpu/src/test/java/tpu/QueuedResourceIT.java
(lines 16, 28-49, 50-57, 94-114, 136-156): Added tests for new functionality and modified existing tests for consistency.tpu/src/test/java/tpu/TpuVmIT.java
(lines 210-267): Added tests for new functionality and modified existing tests for consistency.
Let me know if you have any questions!
Code review haiku
Clean code's gentle flow,
Bugs like shadows disappear,
Joyful, swift release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration, and introduces several new files related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, there are a few minor suggestions for improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ludoch, reviewers, and future viewers,
I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, I'm providing this summary to help everyone quickly understand the changes and intent.
This pull request, titled "Sync with main," appears to be a straightforward synchronization effort. I've analyzed the commits and identified the following key changes:
.github/CODEOWNERS
(lines 79-85): Added@GoogleCloudPlatform/cloud-ml-translate-dev
to the CODEOWNERS file for the/translate
directory. This suggests a change in ownership or responsibility for the translation-related code..kokoro/tests/run_prptst_tests.sh
(lines 90-93): Removed code related to sending test logs to FlakyBot for periodic builds (except Java 8). This likely streamlines the testing process..kokoro/tests/run_test_java.sh
(lines 96-99): Similar to the previous change, this removes FlakyBot integration from the Java test execution script, simplifying the build process.compute/cloud-client/src/main/java/compute/CreateInstanceWithRegionalDiskFromSnapshot.java
(lines 1-109): Added a new Java file containing code to create a Compute Engine instance with a regional disk from a snapshot. This is a substantial addition, providing a new functionality.compute/cloud-client/src/main/java/compute/disks/AttachRegionalDiskForce.java
(lines 1-81): Added a new Java file demonstrating how to forcefully attach a regional disk to a Compute Engine instance. This provides additional flexibility in disk management.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryRegional.java
(lines 1-103): Added a new Java file showcasing the creation of a secondary regional disk using asynchronous replication. This enhances the capabilities for disaster recovery and data redundancy.compute/cloud-client/src/main/java/compute/disks/CreateDiskSecondaryZonal.java
(lines 1-92): Added a new Java file for creating a secondary zonal disk via asynchronous replication. Similar to the regional version, this improves resilience and data availability.compute/cloud-client/src/main/java/compute/disks/CreateDiskWithSnapshotSchedule.java
(lines 1-73): Added a new Java file demonstrating the creation of a disk with a linked snapshot schedule. This automates the snapshot creation process.compute/cloud-client/src/main/java/compute/disks/Create 10481 ReplicatedDisk.java
(lines 1-88): Added a new Java file illustrating the creation of a replicated regional disk. This is another significant addition focusing on high availability and data protection.compute/cloud-client/src/main/java/compute/disks/CreateSecondaryCustomDisk.java
(lines 1-111): Added a new Java file showing how to create a secondary disk with custom parameters (guest OS features and labels). This allows for more tailored disk configurations.compute/cloud-client/src/main/java/compute/disks/StartRegionalDiskReplication.java
(lines 1-82): Added a new Java file to start asynchronous replication for a regional disk. This is crucial for asynchronous replication setup.compute/cloud-client/src/main/java/compute/disks/StartZonalDiskReplication.java
(lines 1-82): Added a new Java file to start asynchronous replication for a zonal disk. Complements the regional replication functionality.compute/cloud-client/src/main/java/compute/disks/StopRegionalDiskReplication.java
(lines 1-67): Added a new Java file to stop asynchronous replication for a regional disk. This provides control over the replication process.compute/cloud-client/src/main/java/compute/disks/StopZonalDiskReplication.java
(lines 1-67): Added a new Java file to stop asynchronous replication for a zonal disk. Provides the counterpart for zonal disk replication control.compute/cloud-client/src/main/java/compute/disks/consistencygroup/AddDiskToConsistencyGroup.java
(lines 22, 51-57): Modified the return type ofaddDiskToConsistencyGroup
fromOperation.Status
toStatus
. This is a minor change for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneRegionalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file for cloning regional disks from a consistency group. This simplifies the process of creating multiple disks from a source.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CloneZonalDisksFromConsistencyGroup.java
(lines 1-73): Added a new Java file for cloning zonal disks from a consistency group. Similar to the regional version, but for zonal disks.compute/cloud-client/src/main/java/compute/disks/consistencygroup/CreateConsistencyGroup.java
(lines 19, 43-49): Modified the return type ofcreateConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/DeleteConsistencyGroup.java
(lines 18, 41-47): Modified the return type ofdeleteConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/RemoveDiskFromConsistencyGroup.java
(lines 20, 52-58): Modified the return type ofremoveDiskFromConsistencyGroup
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopRegionalDiskReplicationConsistencyGroup.java
(lines 1-72): Added a new Java file for stopping regional disk replication within a consistency group.compute/cloud-client/src/main/java/compute/disks/consistencygroup/StopZonalDiskReplicationConsistencyGroup.java
(lines 1-73): Added a new Java file for stopping zonal disk replication within a consistency group.compute/cloud-client/src/main/java/compute/reservation/CreateSharedReservation.java
(lines 18, 31, 48-54): Modified the class to use static methods instead of instance methods and updated the return type ofcreateSharedReservation
from void toStatus
.compute/cloud-client/src/main/java/compute/snapshotschedule/AttachSnapshotScheduleToDisk.java
(lines 1-77): Added a new Java file for attaching a snapshot schedule to a disk. This automates the snapshot creation process for a specific disk.compute/cloud-client/src/main/java/compute/snapshotschedule/CreateSnapshotSchedule.java
(lines 1-116): Added a new Java file for creating a snapshot schedule. This allows for automated snapshot creation based on a defined schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/DeleteSnapshotSchedule.java
(lines 1-64): Added a new Java file for deleting a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/EditSnapshotSchedule.java
(lines 1-113): Added a new Java file for editing an existing snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/GetSnapshotSchedule.java
(lines 1-57): Added a new Java file for retrieving a snapshot schedule.compute/cloud-client/src/main/java/compute/snapshotschedule/ListSnapshotSchedules.java
(lines 1-61): Added a new Java file for listing snapshot schedules.compute/cloud-client/src/main/java/compute/snapshotschedule/RemoveSnapshotScheduleFromDisk.java
(lines 1-81): Added a new Java file for removing a snapshot schedule from a disk.compute/cloud-client/src/test/java/compute/InstanceOperationsIT.java
(lines 20, 59, 134-156): Added several new methods and updated existing ones to use the new disk and snapshot functionality. Added a test forCreateInstanceWithRegionalDiskFromSnapshot
.compute/cloud-client/src/test/java/compute/Util.java
(lines 30, 222-239, 287-303, 327-334): Added new methods for cleaning up regional disks and snapshot schedules. Updated thecontainPrefixToDeleteAndZone
method to handleResourcePolicy
objects.compute/cloud-client/src/test/java/compute/disks/ConsistencyGroupIT.java
(lines 27, 62, 78, 101, 125, 149, 202-304): Added tests for new consistency group methods, including cloning and stopping replication. Updated existing tests to use the newStatus
return type.compute/cloud-client/src/test/java/compute/disks/DiskReplicationIT.java
(lines 1-151): Added a new test file for testing disk replication methods.compute/cloud-client/src/test/java/compute/disks/DisksIT.java
(lines 18, 33, 69, 113-131, 170, 239, 276, 296, 325-406): Added tests for new disk creation methods and updated existing tests to use the newStatus
return type. Added tests for creating replicated disks and secondary disks with various configurations.compute/cloud-client/src/test/java/compute/disks/HyperdiskIT.java
(lines 32, 78, 116): Updated the return type ofcreateHyperdiskStoragePool
fromOperation.Status
toStatus
for consistency.compute/cloud-client/src/test/java/compute/disks/InstanceAttachDiskIT.java
(lines 1-75): Added a new test file for testing theAttachRegionalDiskForce
method.compute/cloud-client/src/test/java/compute/reservation/CrudOperationsReservationIT.java
(lines 22, 63): Added cleanup of existing reservations and updated the test to use the newStatus
return type.compute/cloud-client/src/test/java/compute/reservation/ReservationIT.java
(lines 18, 51, 113, 180-229): Updated the test for creating shared reservations to use mocked static methods and updated the assertions to check for the newStatus
return type.compute/cloud-client/src/test/java/compute/snapshotschedule/SnapshotScheduleIT.java
(lines 1-228): Added a new test file for testing snapshot schedule methods.endpoints/getting-started/k8s/esp_echo_http.yaml
(lines 38-60): Added comments to delineate sections of the YAML file related to secrets and services.endpoints/multiple-versions/openapi-v1.yaml
(lines 12-22): Removed unnecessary comments.endpoints/multiple-versions/openapi-v2.yaml
(lines 12-22): Removed unnecessary comments.jobs/v3/src/main/java/com/google/samples/BasicCompanySample.java
(lines 46, 59, 80, 96, 121, 147, 159): Updated comments to use consistent naming and removed redundant comments.jobs/v3/src/main/java/com/google/samples/BasicJobSample.java
(lines 73, 92, 130, 146): Updated comments to use consistent naming and removed redundant comments.jobs/v3/src/main/java/com/google/samples/LocationSearchSample.java
(lines 48, 81, 117, 150, 188, 223): Updated comments to use consistent naming and removed redundant comments.jobs/v4/pom.xml
(lines 40-56): Updated the version ofgoogle-api-services-jobs
dependency and removed redundant comments.secretmanager/src/main/java/secretmanager/CreateSecret.java
(lines 21, 42-59): Added the option to set a TTL for the secret and updated the comments.security-command-center/snippets/src/main/java/management/api/CreateEventThreatDetectionCustomModule.java
(lines 1-99): Added a new Java file for creating an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/DeleteEventThreatDetectionCustomModule.java
(lines 1-60): Added a new Java file for deleting an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/GetEffectiveEventThreatDetectionCustomModule.java
(lines 1-62): Added a new Java file for getting an effective Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/GetEventThreatDetectionCustomModule.java
(lines 1-62): Added a new Java file for getting an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/ListDescendantEventThreatDetectionCustomModules.java
(lines 1-56): Added a new Java file for listing descendant Event Threat Detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEffectiveEventThreatDetectionCustomModules.java
(lines 1-56): Added a new Java file for listing effective Event Threat Detection custom modules.security-command-center/snippets/src/main/java/management/api/ListEventThreatDetectionCustomModules.java
(lines 1-55): Added a new Java file for listing Event Threat Detection custom modules.security-command-center/snippets/src/main/java/management/api/UpdateEventThreatDetectionCustomModule.java
(lines 1-80): Added a new Java file for updating an Event Threat Detection custom module.security-command-center/snippets/src/main/java/management/api/ValidateEventThreatDetectionCustomModule.java
(lines 1-82): Added a new Java file for validating an Event Threat Detection custom module.security-command-center/snippets/src/test/java/management/api/EventThreatDetectionCustomModuleTest.java
(lines 1-236): Added a new test file for testing Event Threat Detection custom module methods.tpu/src/main/java/tpu/CreateQueuedResource.java
(lines 1-98): Added a new Java file for creating a queued resource.tpu/src/main/java/tpu/CreateSpotQueuedResource.java
(lines 1-103): Added a new Java file for creating a spot queued resource.tpu/src/main/java/tpu/CreateSpotTpuVm.java
(lines 1-80): Added a new Java file for creating a spot TPU VM.tpu/src/main/java/tpu/CreateTimeBoundQueuedResource.java
(lines 1-110): Added a new Java file for creating a time-bound queued resource.tpu/src/main/java/tpu/CreateTpuVmWithStartupScript.java
(lines 1-84): Added a new Java file for creating a TPU VM with a startup script.tpu/src/main/java/tpu/DeleteForceQueuedResource.java
(lines 74): Updated the end comment.tpu/src/main/java/tpu/DeleteQueuedResource.java
(lines 1-58): Added a new Java file for deleting a queued resource.tpu/src/main/java/tpu/GetQueuedResource.java
(lines 28, 50): Updated the zone and end comment.tpu/src/main/java/tpu/ListQueuedResources.java
(lines 1-55): Added a new Java file for listing queued resources.tpu/src/test/java/tpu/QueuedResourceIT.java
(lines 16, 30, 50, 58-84, 94, 126-155, 172-269): Added several new tests for creating and deleting queued resources with different configurations, and for listing queued resources. Updated the timeout value.tpu/src/test/java/tpu/TpuVmIT.java
(lines 210-267): Added tests for creating spot TPU VMs and TPU VMs with startup scripts. Updated the timeout value.
Let me know if you have any questions!
Roses are red,
Code is quite blue,
Reviews are green,
Let's ship something new!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request synchronizes the branch with the main branch, removes the FlakyBot integration for Java versions other than 1.8, and introduces several new files related to asynchronous disk replication and snapshot schedules. The changes are well-structured and generally follow best practices. However, some minor improvements can be made.
No description provided.