diff --git a/CHANGELOG.md b/CHANGELOG.md
index 545b27c1..6d72594a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,13 @@
[1]: https://pypi.org/project/google-cloud-tasks/#history
+## [1.5.0](https://www.github.com/googleapis/python-tasks/compare/v1.4.0...v1.5.0) (2020-02-24)
+
+
+### Features
+
+* **tasks:** add support for stackdriver logging config; update retry config (via synth) ([#8](https://www.github.com/googleapis/python-tasks/issues/8)) ([70b597a](https://www.github.com/googleapis/python-tasks/commit/70b597a615c75976a4993ab223328d7cba3bd139))
+
## [1.4.0](https://www.github.com/googleapis/python-tasks/compare/v1.3.0...v1.4.0) (2020-02-06)
diff --git a/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py b/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py
index 691047c2..5c059c94 100644
--- a/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py
+++ b/google/cloud/tasks_v2/gapic/cloud_tasks_client_config.py
@@ -59,7 +59,7 @@
},
"GetIamPolicy": {
"timeout_millis": 10000,
- "retry_codes_name": "non_idempotent",
+ "retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"SetIamPolicy": {
@@ -69,7 +69,7 @@
},
"TestIamPermissions": {
"timeout_millis": 10000,
- "retry_codes_name": "non_idempotent",
+ "retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListTasks": {
@@ -89,7 +89,7 @@
},
"DeleteTask": {
"timeout_millis": 10000,
- "retry_codes_name": "non_idempotent",
+ "retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"RunTask": {
diff --git a/google/cloud/tasks_v2/proto/queue.proto b/google/cloud/tasks_v2/proto/queue.proto
index b50f5aec..483a1f61 100644
--- a/google/cloud/tasks_v2/proto/queue.proto
+++ b/google/cloud/tasks_v2/proto/queue.proto
@@ -166,6 +166,11 @@ message Queue {
// Purge time will be truncated to the nearest microsecond. Purge
// time will be unset if the queue has never been purged.
google.protobuf.Timestamp purge_time = 6;
+
+ // Configuration options for writing logs to
+ // [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
+ // field is unset, then no logs are written.
+ StackdriverLoggingConfig stackdriver_logging_config = 9;
}
// Rate limits.
@@ -344,3 +349,13 @@ message RetryConfig {
// queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
int32 max_doublings = 5;
}
+
+// Configuration options for writing logs to
+// [Stackdriver Logging](https://cloud.google.com/logging/docs/).
+message StackdriverLoggingConfig {
+ // Specifies the fraction of operations to write to
+ // [Stackdriver Logging](https://cloud.google.com/logging/docs/).
+ // This field may contain any value between 0.0 and 1.0, inclusive.
+ // 0.0 is the default and means that no operations are logged.
+ double sampling_ratio = 1;
+}
diff --git a/google/cloud/tasks_v2/proto/queue_pb2.py b/google/cloud/tasks_v2/proto/queue_pb2.py
index 2bfa7466..543ccd3f 100644
--- a/google/cloud/tasks_v2/proto/queue_pb2.py
+++ b/google/cloud/tasks_v2/proto/queue_pb2.py
@@ -32,7 +32,7 @@
"\n\031com.google.cloud.tasks.v2B\nQueueProtoP\001Z:google.golang.org/genproto/googleapis/cloud/tasks/v2;tasks"
),
serialized_pb=_b(
- '\n\'google/cloud/tasks_v2/proto/queue.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a(google/cloud/tasks_v2/proto/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xdd\x03\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x1b\x61pp_engine_routing_override\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x36\n\x0brate_limits\x18\x03 \x01(\x0b\x32!.google.cloud.tasks.v2.RateLimits\x12\x38\n\x0cretry_config\x18\x04 \x01(\x0b\x32".google.cloud.tasks.v2.RetryConfig\x12\x31\n\x05state\x18\x05 \x01(\x0e\x32".google.cloud.tasks.v2.Queue.State\x12.\n\npurge_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05\x42\x65\n\x19\x63om.google.cloud.tasks.v2B\nQueueProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/tasks/v2;tasksb\x06proto3'
+ '\n\'google/cloud/tasks_v2/proto/queue.proto\x12\x15google.cloud.tasks.v2\x1a\x19google/api/resource.proto\x1a(google/cloud/tasks_v2/proto/target.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto"\xb2\x04\n\x05Queue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12L\n\x1b\x61pp_engine_routing_override\x18\x02 \x01(\x0b\x32\'.google.cloud.tasks.v2.AppEngineRouting\x12\x36\n\x0brate_limits\x18\x03 \x01(\x0b\x32!.google.cloud.tasks.v2.RateLimits\x12\x38\n\x0cretry_config\x18\x04 \x01(\x0b\x32".google.cloud.tasks.v2.RetryConfig\x12\x31\n\x05state\x18\x05 \x01(\x0e\x32".google.cloud.tasks.v2.Queue.State\x12.\n\npurge_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12S\n\x1astackdriver_logging_config\x18\t \x01(\x0b\x32/.google.cloud.tasks.v2.StackdriverLoggingConfig"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x0c\n\x08\x44ISABLED\x10\x03:\\\xea\x41Y\n\x1f\x63loudtasks.googleapis.com/Queue\x12\x36projects/{project}/locations/{location}/queues/{queue}"j\n\nRateLimits\x12!\n\x19max_dispatches_per_second\x18\x01 \x01(\x01\x12\x16\n\x0emax_burst_size\x18\x02 \x01(\x05\x12!\n\x19max_concurrent_dispatches\x18\x03 \x01(\x05"\xd1\x01\n\x0bRetryConfig\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\x05\x12\x35\n\x12max_retry_duration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmin_backoff\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12.\n\x0bmax_backoff\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x15\n\rmax_doublings\x18\x05 \x01(\x05"2\n\x18StackdriverLoggingConfig\x12\x16\n\x0esampling_ratio\x18\x01 \x01(\x01\x42\x65\n\x19\x63om.google.cloud.tasks.v2B\nQueueProtoP\x01Z:google.golang.org/genproto/googleapis/cloud/tasks/v2;tasksb\x06proto3'
),
dependencies=[
google_dot_api_dot_resource__pb2.DESCRIPTOR,
@@ -69,8 +69,8 @@
],
containing_type=None,
serialized_options=None,
- serialized_start=545,
- serialized_end=614,
+ serialized_start=630,
+ serialized_end=699,
)
_sym_db.RegisterEnumDescriptor(_QUEUE_STATE)
@@ -190,6 +190,24 @@
serialized_options=None,
file=DESCRIPTOR,
),
+ _descriptor.FieldDescriptor(
+ name="stackdriver_logging_config",
+ full_name="google.cloud.tasks.v2.Queue.stackdriver_logging_config",
+ index=6,
+ number=9,
+ type=11,
+ cpp_type=10,
+ label=1,
+ has_default_value=False,
+ default_value=None,
+ message_type=None,
+ enum_type=None,
+ containing_type=None,
+ is_extension=False,
+ extension_scope=None,
+ serialized_options=None,
+ file=DESCRIPTOR,
+ ),
],
extensions=[],
nested_types=[],
@@ -202,7 +220,7 @@
extension_ranges=[],
oneofs=[],
serialized_start=231,
- serialized_end=708,
+ serialized_end=793,
)
@@ -276,8 +294,8 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=710,
- serialized_end=816,
+ serialized_start=795,
+ serialized_end=901,
)
@@ -387,8 +405,47 @@
syntax="proto3",
extension_ranges=[],
oneofs=[],
- serialized_start=819,
- serialized_end=1028,
+ serialized_start=904,
+ serialized_end=1113,
+)
+
+
+_STACKDRIVERLOGGINGCONFIG = _descriptor.Descriptor(
+ name="StackdriverLoggingConfig",
+ full_name="google.cloud.tasks.v2.StackdriverLoggingConfig",
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name="sampling_ratio",
+ full_name="google.cloud.tasks.v2.StackdriverLoggingConfig.sampling_ratio",
+ index=0,
+ number=1,
+ type=1,
+ cpp_type=5,
+ label=1,
+ has_default_value=False,
+ default_value=float(0),
+ message_type=None,
+ enum_type=None,
+ containing_type=None,
+ is_extension=False,
+ extension_scope=None,
+ serialized_options=None,
+ file=DESCRIPTOR,
+ )
+ ],
+ extensions=[],
+ nested_types=[],
+ enum_types=[],
+ serialized_options=None,
+ is_extendable=False,
+ syntax="proto3",
+ extension_ranges=[],
+ oneofs=[],
+ serialized_start=1115,
+ serialized_end=1165,
)
_QUEUE.fields_by_name[
@@ -402,6 +459,9 @@
_QUEUE.fields_by_name[
"purge_time"
].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_QUEUE.fields_by_name[
+ "stackdriver_logging_config"
+].message_type = _STACKDRIVERLOGGINGCONFIG
_QUEUE_STATE.containing_type = _QUEUE
_RETRYCONFIG.fields_by_name[
"max_retry_duration"
@@ -415,6 +475,7 @@
DESCRIPTOR.message_types_by_name["Queue"] = _QUEUE
DESCRIPTOR.message_types_by_name["RateLimits"] = _RATELIMITS
DESCRIPTOR.message_types_by_name["RetryConfig"] = _RETRYCONFIG
+DESCRIPTOR.message_types_by_name["StackdriverLoggingConfig"] = _STACKDRIVERLOGGINGCONFIG
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Queue = _reflection.GeneratedProtocolMessageType(
@@ -512,6 +573,10 @@
eting-tasks-and-queues#purging_all_tasks_from_a_queue>`_.
Purge time will be truncated to the nearest microsecond. Purge
time will be unset if the queue has never been purged.
+ stackdriver_logging_config:
+ Configuration options for writing logs to `Stackdriver Logging
+ `_. If this field is
+ unset, then no logs are written.
""",
# @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.Queue)
),
@@ -684,6 +749,28 @@
)
_sym_db.RegisterMessage(RetryConfig)
+StackdriverLoggingConfig = _reflection.GeneratedProtocolMessageType(
+ "StackdriverLoggingConfig",
+ (_message.Message,),
+ dict(
+ DESCRIPTOR=_STACKDRIVERLOGGINGCONFIG,
+ __module__="google.cloud.tasks_v2.proto.queue_pb2",
+ __doc__="""Configuration options for writing logs to `Stackdriver
+ Logging `_.
+
+
+ Attributes:
+ sampling_ratio:
+ Specifies the fraction of operations to write to `Stackdriver
+ Logging `_. This
+ field may contain any value between 0.0 and 1.0, inclusive.
+ 0.0 is the default and means that no operations are logged.
+ """,
+ # @@protoc_insertion_point(class_scope:google.cloud.tasks.v2.StackdriverLoggingConfig)
+ ),
+)
+_sym_db.RegisterMessage(StackdriverLoggingConfig)
+
DESCRIPTOR._options = None
_QUEUE._options = None
diff --git a/google/cloud/tasks_v2beta2/proto/queue_pb2.py b/google/cloud/tasks_v2beta2/proto/queue_pb2.py
index 901a11fe..5fd3fd18 100644
--- a/google/cloud/tasks_v2beta2/proto/queue_pb2.py
+++ b/google/cloud/tasks_v2beta2/proto/queue_pb2.py
@@ -502,9 +502,9 @@
dict(
DESCRIPTOR=_QUEUE,
__module__="google.cloud.tasks_v2beta2.proto.queue_pb2",
- __doc__="""A queue is a container of related tasks. Queues are
- configured to manage how those tasks are dispatched. Configurable
- properties include rate limits, retry options, target types, and others.
+ __doc__="""A queue is a container of related tasks. Queues are configured to manage
+ how those tasks are dispatched. Configurable properties include rate
+ limits, retry options, target types, and others.
Attributes:
diff --git a/noxfile.py b/noxfile.py
index d029ec73..fa131842 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -72,6 +72,7 @@ def default(session):
session.run(
"py.test",
"--quiet",
+ "--cov=google.cloud.cloudtasks",
"--cov=google.cloud",
"--cov=tests.unit",
"--cov-append",
diff --git a/setup.py b/setup.py
index 9dc5eeda..e88249a5 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@
name = "google-cloud-tasks"
description = "Cloud Tasks API API client library"
-version = "1.4.0"
+version = "1.5.0"
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
"google-api-core[grpc] >= 1.14.0, < 2.0.0dev",
diff --git a/synth.metadata b/synth.metadata
index 49613d49..7da65d3e 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -1,27 +1,41 @@
{
- "updateTime": "2020-02-04T17:18:19.946970Z",
+ "updateTime": "2020-02-23T13:21:08.191941Z",
"sources": [
{
"generator": {
"name": "artman",
- "version": "0.44.4",
- "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8"
+ "version": "0.45.1",
+ "dockerImage": "googleapis/artman@sha256:36956ca6a4dc70a59de5d5d0fd35061b050bb56884516f0898f46d8220f25738"
+ }
+ },
+ {
+ "git": {
+ "name": ".",
+ "remote": "https://github.com/googleapis/python-tasks.git",
+ "sha": "70b597a615c75976a4993ab223328d7cba3bd139"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "69d9945330a5721cd679f17331a78850e2618226",
- "internalRef": "293080182",
- "log": "69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\n"
+ "sha": "7f910bcc4fc4704947ccfd3ceed015d16b9e00c2",
+ "internalRef": "296451205",
+ "log": "7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n"
+ }
+ },
+ {
+ "git": {
+ "name": "synthtool",
+ "remote": "rpc://devrel/cloud/libraries/tools/autosynth",
+ "sha": "706a38c26db42299845396cdae55db635c38794a"
}
},
{
"template": {
- "name": "python_split_library",
+ "name": "python_library",
"origin": "synthtool.gcp",
- "version": "2019.10.17"
+ "version": "2020.2.4"
}
}
],