diff --git a/synthtool/gcp/templates/python_library/.kokoro/trampoline_v2.sh b/synthtool/gcp/templates/python_library/.kokoro/trampoline_v2.sh index 35fa52923..d03f92dfc 100755 --- a/synthtool/gcp/templates/python_library/.kokoro/trampoline_v2.sh +++ b/synthtool/gcp/templates/python_library/.kokoro/trampoline_v2.sh @@ -26,8 +26,8 @@ # To run this script, first download few files from gcs to /dev/shm. # (/dev/shm is passed into the container as KOKORO_GFILE_DIR). # -# gsutil cp gs://cloud-devrel-kokoro-resources/python-docs-samples/secrets_viewer_service_account.json /dev/shm -# gsutil cp gs://cloud-devrel-kokoro-resources/python-docs-samples/automl_secrets.txt /dev/shm +# gcloud storage cp gs://cloud-devrel-kokoro-resources/python-docs-samples/secrets_viewer_service_account.json /dev/shm +# gcloud storage cp gs://cloud-devrel-kokoro-resources/python-docs-samples/automl_secrets.txt /dev/shm # # Then run the script. # .kokoro/trampoline_v2.sh diff --git a/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/execute_changed_notebooks_helper.py b/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/execute_changed_notebooks_helper.py index f454205f7..da637d6e5 100644 --- a/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/execute_changed_notebooks_helper.py +++ b/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/execute_changed_notebooks_helper.py @@ -172,7 +172,7 @@ def process_and_execute_notebook( # Use gcloud to get tail try: result.error_message = subprocess.check_output( - ["gsutil", "cat", "-r", "-1000", log_file_uri], encoding="UTF-8" + ["gcloud", "storage", "cat", "--range=-1000", log_file_uri], encoding="UTF-8" ) except Exception as error: result.error_message = str(error) diff --git a/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/utils/utils.py b/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/utils/utils.py index b4978e8b4..c9bf366ef 100644 --- a/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/utils/utils.py +++ b/synthtool/gcp/templates/python_notebooks_testing_pipeline/.cloud-build/utils/utils.py @@ -25,7 +25,7 @@ def download_file(bucket_name: str, blob_name: str, destination_file: str) -> st remote_file_path = "".join(["gs://", "/".join([bucket_name, blob_name])]) subprocess.check_output( - ["gsutil", "cp", remote_file_path, destination_file], encoding="UTF-8" + ["gcloud", "storage", "cp", remote_file_path, destination_file], encoding="UTF-8" ) return destination_file @@ -37,7 +37,7 @@ def upload_file( ) -> str: """Copies a local file to a GCS path""" subprocess.check_output( - ["gsutil", "cp", local_file_path, remote_file_path], encoding="UTF-8" + ["gcloud", "storage", "cp", local_file_path, remote_file_path], encoding="UTF-8" ) return remote_file_path diff --git a/tests/fixtures/php/php_asset/expected/Asset/src/V1/GcsDestination.php b/tests/fixtures/php/php_asset/expected/Asset/src/V1/GcsDestination.php index f48742351..5fc1bbcba 100644 --- a/tests/fixtures/php/php_asset/expected/Asset/src/V1/GcsDestination.php +++ b/tests/fixtures/php/php_asset/expected/Asset/src/V1/GcsDestination.php @@ -25,7 +25,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message * * @type string $uri * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -51,7 +51,7 @@ public function __construct($data = NULL) { /** * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -74,7 +74,7 @@ public function hasUri() /** * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -150,4 +150,3 @@ public function getObjectUri() } } - diff --git a/tests/fixtures/php/php_asset/expected/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php b/tests/fixtures/php/php_asset/expected/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php index c013ba5c7..483ea0273 100644 --- a/tests/fixtures/php/php_asset/expected/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php +++ b/tests/fixtures/php/php_asset/expected/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php @@ -17,7 +17,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message { /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -37,7 +37,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message * * @type string $uri * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -53,7 +53,7 @@ public function __construct($data = NULL) { /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -71,7 +71,7 @@ public function getUri() /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -95,4 +95,3 @@ public function setUri($var) // Adding a class alias for backwards compatibility with the previous class name. class_alias(GcsDestination::class, \Google\Cloud\Asset\V1\IamPolicyAnalysisOutputConfig_GcsDestination::class); - diff --git a/tests/fixtures/php/php_asset/src/Asset/src/V1/GcsDestination.php b/tests/fixtures/php/php_asset/src/Asset/src/V1/GcsDestination.php index f48742351..5fc1bbcba 100644 --- a/tests/fixtures/php/php_asset/src/Asset/src/V1/GcsDestination.php +++ b/tests/fixtures/php/php_asset/src/Asset/src/V1/GcsDestination.php @@ -25,7 +25,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message * * @type string $uri * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -51,7 +51,7 @@ public function __construct($data = NULL) { /** * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -74,7 +74,7 @@ public function hasUri() /** * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -150,4 +150,3 @@ public function getObjectUri() } } - diff --git a/tests/fixtures/php/php_asset/src/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php b/tests/fixtures/php/php_asset/src/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php index c013ba5c7..483ea0273 100644 --- a/tests/fixtures/php/php_asset/src/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php +++ b/tests/fixtures/php/php_asset/src/Asset/src/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php @@ -17,7 +17,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message { /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -37,7 +37,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message * * @type string $uri * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -53,7 +53,7 @@ public function __construct($data = NULL) { /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -71,7 +71,7 @@ public function getUri() /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -95,4 +95,3 @@ public function setUri($var) // Adding a class alias for backwards compatibility with the previous class name. class_alias(GcsDestination::class, \Google\Cloud\Asset\V1\IamPolicyAnalysisOutputConfig_GcsDestination::class); - diff --git a/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/GcsDestination.php b/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/GcsDestination.php index f48742351..5fc1bbcba 100644 --- a/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/GcsDestination.php +++ b/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/GcsDestination.php @@ -25,7 +25,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message * * @type string $uri * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -51,7 +51,7 @@ public function __construct($data = NULL) { /** * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -74,7 +74,7 @@ public function hasUri() /** * The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -150,4 +150,3 @@ public function getObjectUri() } } - diff --git a/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php b/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php index 27ff47f3c..b3f4db7e1 100644 --- a/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php +++ b/tests/fixtures/php/php_asset/src/owl-bot-staging/Asset/V1/proto/src/Google/Cloud/Asset/V1/IamPolicyAnalysisOutputConfig/GcsDestination.php @@ -17,7 +17,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message { /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -37,7 +37,7 @@ class GcsDestination extends \Google\Protobuf\Internal\Message * * @type string $uri * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -53,7 +53,7 @@ public function __construct($data = NULL) { /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. @@ -71,7 +71,7 @@ public function getUri() /** * Required. The uri of the Cloud Storage object. It's the same uri that is used by - * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + * gcloud storage. Example: "gs://bucket_name/object_name". See [Viewing and * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information.