From 20d6622427c76d506fbba39ad7470fb9e016d622 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 8 Jan 2020 05:32:46 -0800 Subject: [PATCH] [CHANGE ME] Re-generated tasks to pick up changes in the API or client library generator. --- tasks/google/cloud/tasks_v2/__init__.py | 11 +++++ .../tasks_v2/gapic/cloud_tasks_client.py | 42 ++++------------- .../gapic/cloud_tasks_client_config.py | 38 +++++++-------- .../google/cloud/tasks_v2/proto/target.proto | 6 +-- .../google/cloud/tasks_v2/proto/target_pb2.py | 10 ++-- tasks/google/cloud/tasks_v2beta2/__init__.py | 11 +++++ .../tasks_v2beta2/gapic/cloud_tasks_client.py | 42 ++++------------- .../gapic/cloud_tasks_client_config.py | 46 +++++++++---------- tasks/google/cloud/tasks_v2beta3/__init__.py | 11 +++++ .../tasks_v2beta3/gapic/cloud_tasks_client.py | 42 ++++------------- .../gapic/cloud_tasks_client_config.py | 38 +++++++-------- .../cloud/tasks_v2beta3/proto/target.proto | 6 +-- .../cloud/tasks_v2beta3/proto/target_pb2.py | 10 ++-- tasks/noxfile.py | 2 +- tasks/synth.metadata | 10 ++-- .../gapic/v2/test_cloud_tasks_client_v2.py | 12 ++--- .../test_cloud_tasks_client_v2beta2.py | 12 ++--- .../test_cloud_tasks_client_v2beta3.py | 12 ++--- 18 files changed, 161 insertions(+), 200 deletions(-) diff --git a/tasks/google/cloud/tasks_v2/__init__.py b/tasks/google/cloud/tasks_v2/__init__.py index 1debd208992a..9006a8389a47 100644 --- a/tasks/google/cloud/tasks_v2/__init__.py +++ b/tasks/google/cloud/tasks_v2/__init__.py @@ -16,12 +16,23 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.tasks_v2 import types from google.cloud.tasks_v2.gapic import cloud_tasks_client from google.cloud.tasks_v2.gapic import enums +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class CloudTasksClient(cloud_tasks_client.CloudTasksClient): __doc__ = cloud_tasks_client.CloudTasksClient.__doc__ enums = enums diff --git a/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client.py b/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client.py index 259f5839defd..f11f3d7f980c 100644 --- a/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client.py +++ b/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client.py @@ -83,38 +83,16 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def location_path(cls, project, location): - """DEPRECATED. Return a fully-qualified location string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, location=location, ) - @classmethod - def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) - return google.api_core.path_template.expand( - "projects/{project}", project=project - ) - @classmethod def queue_path(cls, project, location, queue): - """DEPRECATED. Return a fully-qualified queue string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified queue string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/queues/{queue}", project=project, @@ -124,12 +102,7 @@ def queue_path(cls, project, location, queue): @classmethod def task_path(cls, project, location, queue, task): - """DEPRECATED. Return a fully-qualified task string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified task string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}", project=project, @@ -961,7 +934,8 @@ def get_iam_policy( >>> >>> client = tasks_v2.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> response = client.get_iam_policy(resource) @@ -1049,7 +1023,8 @@ def set_iam_policy( >>> >>> client = tasks_v2.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `policy`: >>> policy = {} @@ -1136,7 +1111,8 @@ def test_iam_permissions( >>> >>> client = tasks_v2.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `permissions`: >>> permissions = [] diff --git a/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py b/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py index 5c059c9429b0..aff1d52d86fb 100644 --- a/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py +++ b/tasks/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py @@ -23,77 +23,77 @@ "retry_params_name": "default", }, "GetQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "UpdateQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteQueue": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PurgeQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PauseQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ResumeQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetIamPolicy": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "SetIamPolicy": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "TestIamPermissions": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListTasks": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "GetTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteTask": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "RunTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/tasks/google/cloud/tasks_v2/proto/target.proto b/tasks/google/cloud/tasks_v2/proto/target.proto index 04a88ce9ded0..558ca4afc5e4 100644 --- a/tasks/google/cloud/tasks_v2/proto/target.proto +++ b/tasks/google/cloud/tasks_v2/proto/target.proto @@ -29,7 +29,7 @@ option java_package = "com.google.cloud.tasks.v2"; // // The task will be pushed to the worker as an HTTP request. If the worker // or the redirected worker acknowledges the task by returning a successful HTTP -// response code ([`200` - `299`]), the task will removed from the queue. If +// response code ([`200` - `299`]), the task will be removed from the queue. If // any other HTTP response code is returned or no response is received, the // task will be retried according to the following: // @@ -48,7 +48,7 @@ option java_package = "com.google.cloud.tasks.v2"; // errors is high, Cloud Tasks will use a higher backoff rate. The retry // specified in the `Retry-After` HTTP response header is considered. // -// * To prevent traffic spikes and to smooth sudden large traffic spikes, +// * To prevent traffic spikes and to smooth sudden increases in traffic, // dispatches ramp up slowly when the queue is newly created or idle and // if large numbers of tasks suddenly become available to dispatch (due to // spikes in create task rates, the queue being unpaused, or many tasks @@ -256,7 +256,7 @@ message AppEngineHttpRequest { // In addition, Cloud Tasks sets some headers when the task is dispatched, // such as headers containing information about the task; see // [request - // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). // These headers are set only when the task is dispatched, so they are not // visible when the task is returned in a Cloud Tasks response. // diff --git a/tasks/google/cloud/tasks_v2/proto/target_pb2.py b/tasks/google/cloud/tasks_v2/proto/target_pb2.py index 2f894cc62d2f..3706fe656038 100644 --- a/tasks/google/cloud/tasks_v2/proto/target_pb2.py +++ b/tasks/google/cloud/tasks_v2/proto/target_pb2.py @@ -707,8 +707,8 @@ The task will be pushed to the worker as an HTTP request. If the worker or the redirected worker acknowledges the task by returning a successful - HTTP response code ([``200`` - ``299``]), the task will removed from the - queue. If any other HTTP response code is returned or no response is + HTTP response code ([``200`` - ``299``]), the task will be removed from + the queue. If any other HTTP response code is returned or no response is received, the task will be retried according to the following: - User-specified throttling: [retry @@ -729,7 +729,7 @@ will use a higher backoff rate. The retry specified in the ``Retry-After`` HTTP response header is considered. - - To prevent traffic spikes and to smooth sudden large traffic spikes, + - To prevent traffic spikes and to smooth sudden increases in traffic, dispatches ramp up slowly when the queue is newly created or idle and if large numbers of tasks suddenly become available to dispatch (due to spikes in create task rates, the queue being unpaused, or many @@ -929,8 +929,8 @@ overridden: - ``Host`` - ``X-Google-*`` - ``X-AppEngine-*`` In addition, Cloud Tasks sets some headers when the task is dispatched, such as headers containing - information about the task; see `request headers `_. These headers are set only when the task is dispatched, so they are not visible when the task is returned in a Cloud Tasks response. Although diff --git a/tasks/google/cloud/tasks_v2beta2/__init__.py b/tasks/google/cloud/tasks_v2beta2/__init__.py index 0581eef84df5..f48eb484936f 100644 --- a/tasks/google/cloud/tasks_v2beta2/__init__.py +++ b/tasks/google/cloud/tasks_v2beta2/__init__.py @@ -16,12 +16,23 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.tasks_v2beta2 import types from google.cloud.tasks_v2beta2.gapic import cloud_tasks_client from google.cloud.tasks_v2beta2.gapic import enums +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class CloudTasksClient(cloud_tasks_client.CloudTasksClient): __doc__ = cloud_tasks_client.CloudTasksClient.__doc__ enums = enums diff --git a/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py b/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py index ca9fb4971da1..32e558d27879 100644 --- a/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py +++ b/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py @@ -85,38 +85,16 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def location_path(cls, project, location): - """DEPRECATED. Return a fully-qualified location string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, location=location, ) - @classmethod - def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) - return google.api_core.path_template.expand( - "projects/{project}", project=project - ) - @classmethod def queue_path(cls, project, location, queue): - """DEPRECATED. Return a fully-qualified queue string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified queue string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/queues/{queue}", project=project, @@ -126,12 +104,7 @@ def queue_path(cls, project, location, queue): @classmethod def task_path(cls, project, location, queue, task): - """DEPRECATED. Return a fully-qualified task string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified task string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}", project=project, @@ -963,7 +936,8 @@ def get_iam_policy( >>> >>> client = tasks_v2beta2.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> response = client.get_iam_policy(resource) @@ -1051,7 +1025,8 @@ def set_iam_policy( >>> >>> client = tasks_v2beta2.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `policy`: >>> policy = {} @@ -1138,7 +1113,8 @@ def test_iam_permissions( >>> >>> client = tasks_v2beta2.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `permissions`: >>> permissions = [] diff --git a/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client_config.py b/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client_config.py index a04987764427..3abc4ab4d929 100644 --- a/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client_config.py +++ b/tasks/google/cloud/tasks_v2beta2/gapic/cloud_tasks_client_config.py @@ -23,97 +23,97 @@ "retry_params_name": "default", }, "GetQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "UpdateQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteQueue": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PurgeQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PauseQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ResumeQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetIamPolicy": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "SetIamPolicy": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "TestIamPermissions": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListTasks": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "GetTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteTask": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "LeaseTasks": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "AcknowledgeTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "RenewLease": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "CancelLease": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "RunTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/tasks/google/cloud/tasks_v2beta3/__init__.py b/tasks/google/cloud/tasks_v2beta3/__init__.py index b9adad4606ac..8d16f4a816f8 100644 --- a/tasks/google/cloud/tasks_v2beta3/__init__.py +++ b/tasks/google/cloud/tasks_v2beta3/__init__.py @@ -16,12 +16,23 @@ from __future__ import absolute_import +import sys +import warnings from google.cloud.tasks_v2beta3 import types from google.cloud.tasks_v2beta3.gapic import cloud_tasks_client from google.cloud.tasks_v2beta3.gapic import enums +if sys.version_info[:2] == (2, 7): + message = ( + "A future version of this library will drop support for Python 2.7." + "More details about Python 2 support for Google Cloud Client Libraries" + "can be found at https://cloud.google.com/python/docs/python2-sunset/" + ) + warnings.warn(message, DeprecationWarning) + + class CloudTasksClient(cloud_tasks_client.CloudTasksClient): __doc__ = cloud_tasks_client.CloudTasksClient.__doc__ enums = enums diff --git a/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py b/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py index eb7d82ac5af5..841fbd8c359d 100644 --- a/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py +++ b/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py @@ -83,38 +83,16 @@ def from_service_account_file(cls, filename, *args, **kwargs): @classmethod def location_path(cls, project, location): - """DEPRECATED. Return a fully-qualified location string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified location string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}", project=project, location=location, ) - @classmethod - def project_path(cls, project): - """DEPRECATED. Return a fully-qualified project string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) - return google.api_core.path_template.expand( - "projects/{project}", project=project - ) - @classmethod def queue_path(cls, project, location, queue): - """DEPRECATED. Return a fully-qualified queue string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified queue string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/queues/{queue}", project=project, @@ -124,12 +102,7 @@ def queue_path(cls, project, location, queue): @classmethod def task_path(cls, project, location, queue, task): - """DEPRECATED. Return a fully-qualified task string.""" - warnings.warn( - "Resource name helper functions are deprecated.", - PendingDeprecationWarning, - stacklevel=1, - ) + """Return a fully-qualified task string.""" return google.api_core.path_template.expand( "projects/{project}/locations/{location}/queues/{queue}/tasks/{task}", project=project, @@ -979,7 +952,8 @@ def get_iam_policy( >>> >>> client = tasks_v2beta3.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> response = client.get_iam_policy(resource) @@ -1067,7 +1041,8 @@ def set_iam_policy( >>> >>> client = tasks_v2beta3.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `policy`: >>> policy = {} @@ -1154,7 +1129,8 @@ def test_iam_permissions( >>> >>> client = tasks_v2beta3.CloudTasksClient() >>> - >>> resource = client.queue_path('[PROJECT]', '[LOCATION]', '[QUEUE]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `permissions`: >>> permissions = [] diff --git a/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client_config.py b/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client_config.py index 7773a64356c0..a3129fb765f5 100644 --- a/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client_config.py +++ b/tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client_config.py @@ -23,77 +23,77 @@ "retry_params_name": "default", }, "GetQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "UpdateQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteQueue": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PurgeQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "PauseQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ResumeQueue": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "GetIamPolicy": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "SetIamPolicy": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "TestIamPermissions": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "ListTasks": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "GetTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "idempotent", "retry_params_name": "default", }, "CreateTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "DeleteTask": { - "timeout_millis": 10000, - "retry_codes_name": "idempotent", + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, "RunTask": { - "timeout_millis": 10000, + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, diff --git a/tasks/google/cloud/tasks_v2beta3/proto/target.proto b/tasks/google/cloud/tasks_v2beta3/proto/target.proto index f3ef089f40c6..60eccf35087c 100644 --- a/tasks/google/cloud/tasks_v2beta3/proto/target.proto +++ b/tasks/google/cloud/tasks_v2beta3/proto/target.proto @@ -28,7 +28,7 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // // The task will be pushed to the worker as an HTTP request. If the worker // or the redirected worker acknowledges the task by returning a successful HTTP -// response code ([`200` - `299`]), the task will removed from the queue. If +// response code ([`200` - `299`]), the task will be removed from the queue. If // any other HTTP response code is returned or no response is received, the // task will be retried according to the following: // @@ -47,7 +47,7 @@ option java_package = "com.google.cloud.tasks.v2beta3"; // errors is high, Cloud Tasks will use a higher backoff rate. The retry // specified in the `Retry-After` HTTP response header is considered. // -// * To prevent traffic spikes and to smooth sudden large traffic spikes, +// * To prevent traffic spikes and to smooth sudden increases in traffic, // dispatches ramp up slowly when the queue is newly created or idle and // if large numbers of tasks suddenly become available to dispatch (due to // spikes in create task rates, the queue being unpaused, or many tasks @@ -279,7 +279,7 @@ message AppEngineHttpRequest { // In addition, Cloud Tasks sets some headers when the task is dispatched, // such as headers containing information about the task; see // [request - // headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // headers](https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers). // These headers are set only when the task is dispatched, so they are not // visible when the task is returned in a Cloud Tasks response. // diff --git a/tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py b/tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py index 100e2dbcd347..31da5ae662c6 100644 --- a/tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py +++ b/tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py @@ -746,8 +746,8 @@ The task will be pushed to the worker as an HTTP request. If the worker or the redirected worker acknowledges the task by returning a successful - HTTP response code ([``200`` - ``299``]), the task will removed from the - queue. If any other HTTP response code is returned or no response is + HTTP response code ([``200`` - ``299``]), the task will be removed from + the queue. If any other HTTP response code is returned or no response is received, the task will be retried according to the following: - User-specified throttling: [retry @@ -768,7 +768,7 @@ Tasks will use a higher backoff rate. The retry specified in the ``Retry-After`` HTTP response header is considered. - - To prevent traffic spikes and to smooth sudden large traffic spikes, + - To prevent traffic spikes and to smooth sudden increases in traffic, dispatches ramp up slowly when the queue is newly created or idle and if large numbers of tasks suddenly become available to dispatch (due to spikes in create task rates, the queue being unpaused, or many @@ -1010,8 +1010,8 @@ overridden: - ``Host`` - ``X-Google-*`` - ``X-AppEngine-*`` In addition, Cloud Tasks sets some headers when the task is dispatched, such as headers containing - information about the task; see `request headers `_. These headers are set only when the task is dispatched, so they are not visible when the task is returned in a Cloud Tasks response. Although diff --git a/tasks/noxfile.py b/tasks/noxfile.py index a2eefbb6765f..7949a4e3925a 100644 --- a/tasks/noxfile.py +++ b/tasks/noxfile.py @@ -86,7 +86,7 @@ def default(session): ) -@nox.session(python=["2.7", "3.5", "3.6", "3.7"]) +@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"]) def unit(session): """Run the unit test suite.""" default(session) diff --git a/tasks/synth.metadata b/tasks/synth.metadata index 3c5a36c157ea..e5d5cb978897 100644 --- a/tasks/synth.metadata +++ b/tasks/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-11-20T13:32:31.947238Z", + "updateTime": "2020-01-08T13:32:45.971046Z", "sources": [ { "generator": { "name": "artman", - "version": "0.42.1", - "dockerImage": "googleapis/artman@sha256:c773192618c608a7a0415dd95282f841f8e6bcdef7dd760a988c93b77a64bd57" + "version": "0.43.0", + "dockerImage": "googleapis/artman@sha256:264654a37596a44b0668b8ce6ac41082d713f6ee150b3fc6425fa78cc64e4f20" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "16543773103e2619d2b5f52456264de5bb9be104", - "internalRef": "281423227" + "sha": "08b488e0660c59842a7dee0e3e2b65d9e3a514a9", + "internalRef": "288625007" } }, { diff --git a/tasks/tests/unit/gapic/v2/test_cloud_tasks_client_v2.py b/tasks/tests/unit/gapic/v2/test_cloud_tasks_client_v2.py index 884c07d8bc9f..42052e1bbb11 100644 --- a/tasks/tests/unit/gapic/v2/test_cloud_tasks_client_v2.py +++ b/tasks/tests/unit/gapic/v2/test_cloud_tasks_client_v2.py @@ -384,7 +384,7 @@ def test_get_iam_policy(self): client = tasks_v2.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" response = client.get_iam_policy(resource) assert expected_response == response @@ -403,7 +403,7 @@ def test_get_iam_policy_exception(self): client = tasks_v2.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" with pytest.raises(CustomException): client.get_iam_policy(resource) @@ -423,7 +423,7 @@ def test_set_iam_policy(self): client = tasks_v2.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" policy = {} response = client.set_iam_policy(resource, policy) @@ -445,7 +445,7 @@ def test_set_iam_policy_exception(self): client = tasks_v2.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" policy = {} with pytest.raises(CustomException): @@ -466,7 +466,7 @@ def test_test_iam_permissions(self): client = tasks_v2.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" permissions = [] response = client.test_iam_permissions(resource, permissions) @@ -488,7 +488,7 @@ def test_test_iam_permissions_exception(self): client = tasks_v2.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" permissions = [] with pytest.raises(CustomException): diff --git a/tasks/tests/unit/gapic/v2beta2/test_cloud_tasks_client_v2beta2.py b/tasks/tests/unit/gapic/v2beta2/test_cloud_tasks_client_v2beta2.py index 7aa9d9033334..e803ed472501 100644 --- a/tasks/tests/unit/gapic/v2beta2/test_cloud_tasks_client_v2beta2.py +++ b/tasks/tests/unit/gapic/v2beta2/test_cloud_tasks_client_v2beta2.py @@ -386,7 +386,7 @@ def test_get_iam_policy(self): client = tasks_v2beta2.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" response = client.get_iam_policy(resource) assert expected_response == response @@ -405,7 +405,7 @@ def test_get_iam_policy_exception(self): client = tasks_v2beta2.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" with pytest.raises(CustomException): client.get_iam_policy(resource) @@ -425,7 +425,7 @@ def test_set_iam_policy(self): client = tasks_v2beta2.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" policy = {} response = client.set_iam_policy(resource, policy) @@ -447,7 +447,7 @@ def test_set_iam_policy_exception(self): client = tasks_v2beta2.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" policy = {} with pytest.raises(CustomException): @@ -468,7 +468,7 @@ def test_test_iam_permissions(self): client = tasks_v2beta2.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" permissions = [] response = client.test_iam_permissions(resource, permissions) @@ -490,7 +490,7 @@ def test_test_iam_permissions_exception(self): client = tasks_v2beta2.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" permissions = [] with pytest.raises(CustomException): diff --git a/tasks/tests/unit/gapic/v2beta3/test_cloud_tasks_client_v2beta3.py b/tasks/tests/unit/gapic/v2beta3/test_cloud_tasks_client_v2beta3.py index 0e53b80bfa14..0337c6673944 100644 --- a/tasks/tests/unit/gapic/v2beta3/test_cloud_tasks_client_v2beta3.py +++ b/tasks/tests/unit/gapic/v2beta3/test_cloud_tasks_client_v2beta3.py @@ -384,7 +384,7 @@ def test_get_iam_policy(self): client = tasks_v2beta3.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" response = client.get_iam_policy(resource) assert expected_response == response @@ -403,7 +403,7 @@ def test_get_iam_policy_exception(self): client = tasks_v2beta3.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" with pytest.raises(CustomException): client.get_iam_policy(resource) @@ -423,7 +423,7 @@ def test_set_iam_policy(self): client = tasks_v2beta3.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" policy = {} response = client.set_iam_policy(resource, policy) @@ -445,7 +445,7 @@ def test_set_iam_policy_exception(self): client = tasks_v2beta3.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" policy = {} with pytest.raises(CustomException): @@ -466,7 +466,7 @@ def test_test_iam_permissions(self): client = tasks_v2beta3.CloudTasksClient() # Setup Request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" permissions = [] response = client.test_iam_permissions(resource, permissions) @@ -488,7 +488,7 @@ def test_test_iam_permissions_exception(self): client = tasks_v2beta3.CloudTasksClient() # Setup request - resource = client.queue_path("[PROJECT]", "[LOCATION]", "[QUEUE]") + resource = "resource-341064690" permissions = [] with pytest.raises(CustomException):