From bdc515b8fdc735431cd549d489ed5c0c385b01da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot <44816363+yoshi-automation@users.noreply.github.com> Date: Sat, 26 Jan 2019 10:31:03 -0800 Subject: [PATCH] feat: support the .dispatch_deadline property. (#160) --- .../google/cloud/tasks/v2beta3/queue.proto | 37 ++++++++-------- .../google/cloud/tasks/v2beta3/target.proto | 29 +++++++++---- .../google/cloud/tasks/v2beta3/task.proto | 43 +++++++++++++++---- .../src/v2beta2/cloud_tasks_client.js | 2 +- .../cloud/tasks/v2beta2/doc_cloudtasks.js | 2 +- .../google/cloud/tasks/v2beta2/doc_queue.js | 2 +- .../google/cloud/tasks/v2beta2/doc_target.js | 2 +- .../google/cloud/tasks/v2beta2/doc_task.js | 2 +- .../doc/google/iam/v1/doc_iam_policy.js | 2 +- .../v2beta2/doc/google/iam/v1/doc_policy.js | 2 +- .../v2beta2/doc/google/protobuf/doc_any.js | 2 +- .../doc/google/protobuf/doc_duration.js | 2 +- .../v2beta2/doc/google/protobuf/doc_empty.js | 2 +- .../doc/google/protobuf/doc_field_mask.js | 2 +- .../doc/google/protobuf/doc_timestamp.js | 2 +- .../src/v2beta2/doc/google/rpc/doc_status.js | 2 +- .../google-cloud-tasks/src/v2beta2/index.js | 2 +- .../src/v2beta3/cloud_tasks_client.js | 2 +- .../cloud/tasks/v2beta3/doc_cloudtasks.js | 2 +- .../google/cloud/tasks/v2beta3/doc_queue.js | 32 +++++++++----- .../google/cloud/tasks/v2beta3/doc_target.js | 37 +++++++++++----- .../google/cloud/tasks/v2beta3/doc_task.js | 41 +++++++++++++++--- .../doc/google/iam/v1/doc_iam_policy.js | 2 +- .../v2beta3/doc/google/iam/v1/doc_policy.js | 2 +- .../v2beta3/doc/google/protobuf/doc_any.js | 2 +- .../doc/google/protobuf/doc_duration.js | 2 +- .../v2beta3/doc/google/protobuf/doc_empty.js | 2 +- .../doc/google/protobuf/doc_field_mask.js | 2 +- .../doc/google/protobuf/doc_timestamp.js | 2 +- .../src/v2beta3/doc/google/rpc/doc_status.js | 2 +- .../google-cloud-tasks/src/v2beta3/index.js | 2 +- packages/google-cloud-tasks/synth.metadata | 12 +++--- .../google-cloud-tasks/test/gapic-v2beta2.js | 2 +- .../google-cloud-tasks/test/gapic-v2beta3.js | 2 +- 34 files changed, 191 insertions(+), 94 deletions(-) diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto index 5448e85d4fe..4b6b9266365 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/queue.proto @@ -55,9 +55,11 @@ message Queue { // The queue is disabled. // // A queue becomes `DISABLED` when - // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) or - // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) is uploaded - // which does not contain the queue. You cannot directly disable a queue. + // [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + // or + // [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + // is uploaded which does not contain the queue. You cannot directly disable + // a queue. // // When a queue is disabled, tasks can still be added to a queue // but the tasks are not dispatched. @@ -87,26 +89,17 @@ message Queue { // hyphens (-). The maximum length is 100 characters. string name = 1; - // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue][], - // after which the queue config type becomes output only, though fields within - // the config are mutable. - // - // The queue's type. - // - // The type applies to all tasks in the queue. oneof queue_type { - // App Engine HTTP queue. - // - // An App Engine queue is a queue that has an [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] type. + // [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] settings apply only to + // [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest] in this queue. AppEngineHttpQueue app_engine_http_queue = 3; } // Rate limits for task dispatches. // - // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and - // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related because they both - // control task attempts however they control how tasks are - // attempted in different ways: + // [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are + // related because they both control task attempts. However they control task + // attempts in different ways: // // * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the total rate of // dispatches from a queue (i.e. all traffic dispatched from the @@ -116,6 +109,16 @@ message Queue { // particular a task after its first attempt fails. That is, // [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls task retries (the // second attempt, third attempt, etc). + // + // The queue's actual dispatch rate is the result of: + // + // * Number of tasks in the queue + // * User-specified throttling: [rate limits][Queue.RateLimits] + // [retry configuration][Queue.RetryConfig], and the + // [queue's state][google.cloud.tasks.v2beta3.Queue.state]. + // * System throttling due to `429` (Too Many Requests) or `503` (Service + // Unavailable) responses from the worker, high error rates, or to smooth + // sudden large traffic spikes. RateLimits rate_limits = 4; // Settings that determine the retry behavior. diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto index 58092ed8bf3..087249f93d2 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/target.proto @@ -68,6 +68,11 @@ message AppEngineHttpQueue { // [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) // and how routing is affected by // [dispatch files](https://cloud.google.com/appengine/docs/python/config/dispatchref). +// Traffic is encrypted during transport and never leaves Google datacenters. +// Because this traffic is carried over a communication mechanism internal to +// Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). +// The request to the handler, however, will appear to have used the HTTP +// protocol. // // The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to construct the URL that the task is // delivered to can be set at the queue-level or task-level: @@ -84,6 +89,14 @@ message AppEngineHttpQueue { // * `url =` [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] `+` // [relative_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relative_uri] // +// Tasks can be dispatched to secure app handlers, unsecure app handlers, and +// URIs restricted with +// [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). +// Because tasks are not run as any user, they cannot be dispatched to URIs +// restricted with +// [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) +// Task dispatches also do not follow redirects. +// // The task attempt has succeeded if the app's request handler returns // an HTTP response code in the range [`200` - `299`]. `503` is // considered an App Engine system error instead of an application @@ -171,14 +184,8 @@ message AppEngineHttpRequest { // App Engine Routing. // -// Specifies the target URI. Since this target type dispatches tasks to secure -// app handlers, unsecure app handlers, and URIs restricted with -// [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref) -// the protocol (for example, HTTP or HTTPS) cannot be explictly specified. -// Task dispatches do not follow redirects and cannot target URI paths -// restricted with -// [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) -// because tasks are not run as any user. +// Defines routing characteristics specific to App Engine - service, version, +// and instance. // // For more information about services, versions, and instances see // [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), @@ -266,4 +273,10 @@ enum HttpMethod { // HTTP DELETE DELETE = 5; + + // HTTP PATCH + PATCH = 6; + + // HTTP OPTIONS + OPTIONS = 7; } diff --git a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto index 2a7de02b999..46026f70e62 100644 --- a/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto +++ b/packages/google-cloud-tasks/protos/google/cloud/tasks/v2beta3/task.proto @@ -19,6 +19,7 @@ package google.cloud.tasks.v2beta3; import "google/api/annotations.proto"; import "google/cloud/tasks/v2beta3/target.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; @@ -80,15 +81,9 @@ message Task { // hyphens (-), or underscores (_). The maximum length is 500 characters. string name = 1; - // Required. - // - // The task's payload is used by the task's target to process the task. - // A payload is valid only if it is compatible with the queue's target. + // Required. The message to send to the worker. oneof payload_type { - // App Engine HTTP request that is sent to the task's target. Can - // be set only if - // [app_engine_http_queue][google.cloud.tasks.v2beta3.Queue.app_engine_http_queue] is set - // on the queue. + // HTTP request that is sent to the App Engine app handler. // // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] set. AppEngineHttpRequest app_engine_http_request = 3; @@ -106,6 +101,36 @@ message Task { // `create_time` will be truncated to the nearest second. google.protobuf.Timestamp create_time = 5; + // The deadline for requests sent to the worker. If the worker does not + // respond by this deadline then the request is cancelled and the attempt + // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + // task according to the [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. + // + // Note that when the request is cancelled, Cloud Tasks will stop listing for + // the response, but whether the worker stops processing depends on the + // worker. For example, if the worker is stuck, it may not react to cancelled + // requests. + // + // The default and maximum values depend on the type of request: + // + // + // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the + // request has the default deadline. The default deadline depends on the + // [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + // of the service: 10 minutes for standard apps with automatic scaling, 24 + // hours for standard apps with manual and basic scaling, and 60 minutes for + // flex apps. If the request deadline is set, it must be in the interval [15 + // seconds, 24 hours 15 seconds]. Regardless of the task's + // `dispatch_deadline`, the app handler will not run for longer than than + // the service's timeout. We recommend setting the `dispatch_deadline` to + // at most a few seconds more than the app handler's timeout. For more + // information see + // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + // + // `dispatch_deadline` will be truncated to the nearest millisecond. The + // deadline is an approximate deadline. + google.protobuf.Duration dispatch_deadline = 12; + // Output only. The number of attempts dispatched. // // This count includes tasks which have been dispatched but haven't @@ -146,7 +171,7 @@ message Attempt { // `response_time` will be truncated to the nearest microsecond. google.protobuf.Timestamp response_time = 3; - // Output only. The response from the target for this attempt. + // Output only. The response from the worker for this attempt. // // If `response_time` is unset, then the task has not been attempted or is // currently running and the `response_status` field is meaningless. diff --git a/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.js b/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.js index 2b35479459b..ec59a6a42f2 100644 --- a/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.js +++ b/packages/google-cloud-tasks/src/v2beta2/cloud_tasks_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js index 974731584d8..7583ea28f22 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_cloudtasks.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js index b700ca75255..a67191636be 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_queue.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js index 3e4de8d11f6..1445f4b1d26 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_target.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js index 4de796af683..8c2dfa3253b 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/cloud/tasks/v2beta2/doc_task.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js index e952d5d1f02..12b7ac5df09 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_iam_policy.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js index 5e7237e0fa9..bcae4a7d873 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/iam/v1/doc_policy.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js index 3accb1fc0d8..f3278b34e66 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_any.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js index c03ce2fb3df..1275f8f4d13 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_duration.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js index b1d6b5e32a9..0b446dd9ce4 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_empty.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js index 0cb35328962..d55d97e6e38 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_field_mask.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js index 1cc64cbed80..b47f41c2b30 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/protobuf/doc_timestamp.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js b/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js index 13cfcab1021..fc4b5be93f0 100644 --- a/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-tasks/src/v2beta2/doc/google/rpc/doc_status.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta2/index.js b/packages/google-cloud-tasks/src/v2beta2/index.js index 6797ee2ee12..08ba9a54af9 100644 --- a/packages/google-cloud-tasks/src/v2beta2/index.js +++ b/packages/google-cloud-tasks/src/v2beta2/index.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/cloud_tasks_client.js b/packages/google-cloud-tasks/src/v2beta3/cloud_tasks_client.js index a5c5708555f..69dda88d4a8 100644 --- a/packages/google-cloud-tasks/src/v2beta3/cloud_tasks_client.js +++ b/packages/google-cloud-tasks/src/v2beta3/cloud_tasks_client.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js index 4ac626f80c3..0d2920ec8ab 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_cloudtasks.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js index 5c4bc9ceeae..e4c9428a7e0 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_queue.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,19 +41,17 @@ * hyphens (-). The maximum length is 100 characters. * * @property {Object} appEngineHttpQueue - * App Engine HTTP queue. - * - * An App Engine queue is a queue that has an AppEngineHttpQueue type. + * AppEngineHttpQueue settings apply only to + * App Engine tasks in this queue. * * This object should have the same structure as [AppEngineHttpQueue]{@link google.cloud.tasks.v2beta3.AppEngineHttpQueue} * * @property {Object} rateLimits * Rate limits for task dispatches. * - * rate_limits and - * retry_config are related because they both - * control task attempts however they control how tasks are - * attempted in different ways: + * rate_limits and retry_config are + * related because they both control task attempts. However they control task + * attempts in different ways: * * * rate_limits controls the total rate of * dispatches from a queue (i.e. all traffic dispatched from the @@ -64,6 +62,16 @@ * retry_config controls task retries (the * second attempt, third attempt, etc). * + * The queue's actual dispatch rate is the result of: + * + * * Number of tasks in the queue + * * User-specified throttling: rate limits + * retry configuration, and the + * queue's state. + * * System throttling due to `429` (Too Many Requests) or `503` (Service + * Unavailable) responses from the worker, high error rates, or to smooth + * sudden large traffic spikes. + * * This object should have the same structure as [RateLimits]{@link google.cloud.tasks.v2beta3.RateLimits} * * @property {Object} retryConfig @@ -147,9 +155,11 @@ const Queue = { * The queue is disabled. * * A queue becomes `DISABLED` when - * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) or - * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) is uploaded - * which does not contain the queue. You cannot directly disable a queue. + * [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) + * or + * [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) + * is uploaded which does not contain the queue. You cannot directly disable + * a queue. * * When a queue is disabled, tasks can still be added to a queue * but the tasks are not dispatched. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js index 6ac029c7089..19028af537a 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_target.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -69,6 +69,11 @@ const AppEngineHttpQueue = { * [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) * and how routing is affected by * [dispatch files](https://cloud.google.com/appengine/docs/python/config/dispatchref). + * Traffic is encrypted during transport and never leaves Google datacenters. + * Because this traffic is carried over a communication mechanism internal to + * Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS). + * The request to the handler, however, will appear to have used the HTTP + * protocol. * * The AppEngineRouting used to construct the URL that the task is * delivered to can be set at the queue-level or task-level: @@ -85,6 +90,14 @@ const AppEngineHttpQueue = { * * `url =` host `+` * relative_uri * + * Tasks can be dispatched to secure app handlers, unsecure app handlers, and + * URIs restricted with + * [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref). + * Because tasks are not run as any user, they cannot be dispatched to URIs + * restricted with + * [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) + * Task dispatches also do not follow redirects. + * * The task attempt has succeeded if the app's request handler returns * an HTTP response code in the range [`200` - `299`]. `503` is * considered an App Engine system error instead of an application @@ -184,14 +197,8 @@ const AppEngineHttpRequest = { /** * App Engine Routing. * - * Specifies the target URI. Since this target type dispatches tasks to secure - * app handlers, unsecure app handlers, and URIs restricted with - * [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - * the protocol (for example, HTTP or HTTPS) cannot be explictly specified. - * Task dispatches do not follow redirects and cannot target URI paths - * restricted with - * [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref) - * because tasks are not run as any user. + * Defines routing characteristics specific to App Engine - service, version, + * and instance. * * For more information about services, versions, and instances see * [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), @@ -303,5 +310,15 @@ const HttpMethod = { /** * HTTP DELETE */ - DELETE: 5 + DELETE: 5, + + /** + * HTTP PATCH + */ + PATCH: 6, + + /** + * HTTP OPTIONS + */ + OPTIONS: 7 }; \ No newline at end of file diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js index 3e5f70f996a..c6e02e74550 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/cloud/tasks/v2beta3/doc_task.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,10 +40,7 @@ * hyphens (-), or underscores (_). The maximum length is 500 characters. * * @property {Object} appEngineHttpRequest - * App Engine HTTP request that is sent to the task's target. Can - * be set only if - * app_engine_http_queue is set - * on the queue. + * HTTP request that is sent to the App Engine app handler. * * An App Engine task is a task that has AppEngineHttpRequest set. * @@ -65,6 +62,38 @@ * * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * + * @property {Object} dispatchDeadline + * The deadline for requests sent to the worker. If the worker does not + * respond by this deadline then the request is cancelled and the attempt + * is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the + * task according to the RetryConfig. + * + * Note that when the request is cancelled, Cloud Tasks will stop listing for + * the response, but whether the worker stops processing depends on the + * worker. For example, if the worker is stuck, it may not react to cancelled + * requests. + * + * The default and maximum values depend on the type of request: + * + * + * * For App Engine tasks, 0 indicates that the + * request has the default deadline. The default deadline depends on the + * [scaling type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) + * of the service: 10 minutes for standard apps with automatic scaling, 24 + * hours for standard apps with manual and basic scaling, and 60 minutes for + * flex apps. If the request deadline is set, it must be in the interval [15 + * seconds, 24 hours 15 seconds]. Regardless of the task's + * `dispatch_deadline`, the app handler will not run for longer than than + * the service's timeout. We recommend setting the `dispatch_deadline` to + * at most a few seconds more than the app handler's timeout. For more + * information see + * [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). + * + * `dispatch_deadline` will be truncated to the nearest millisecond. The + * deadline is an approximate deadline. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * * @property {number} dispatchCount * Output only. The number of attempts dispatched. * @@ -167,7 +196,7 @@ const Task = { * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} * * @property {Object} responseStatus - * Output only. The response from the target for this attempt. + * Output only. The response from the worker for this attempt. * * If `response_time` is unset, then the task has not been attempted or is * currently running and the `response_status` field is meaningless. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js index e952d5d1f02..12b7ac5df09 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_iam_policy.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js index 5e7237e0fa9..bcae4a7d873 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/iam/v1/doc_policy.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js index 3accb1fc0d8..f3278b34e66 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_any.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js index c03ce2fb3df..1275f8f4d13 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_duration.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js index b1d6b5e32a9..0b446dd9ce4 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_empty.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js index 0cb35328962..d55d97e6e38 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_field_mask.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js index 1cc64cbed80..b47f41c2b30 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/protobuf/doc_timestamp.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js b/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js index 13cfcab1021..fc4b5be93f0 100644 --- a/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js +++ b/packages/google-cloud-tasks/src/v2beta3/doc/google/rpc/doc_status.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/src/v2beta3/index.js b/packages/google-cloud-tasks/src/v2beta3/index.js index 6797ee2ee12..08ba9a54af9 100644 --- a/packages/google-cloud-tasks/src/v2beta3/index.js +++ b/packages/google-cloud-tasks/src/v2beta3/index.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/synth.metadata b/packages/google-cloud-tasks/synth.metadata index 4392ca355e2..c7ff9f94906 100644 --- a/packages/google-cloud-tasks/synth.metadata +++ b/packages/google-cloud-tasks/synth.metadata @@ -1,26 +1,26 @@ { - "updateTime": "2019-01-03T17:54:49.639546Z", + "updateTime": "2019-01-26T12:21:48.662294Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.4", - "dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857" + "version": "0.16.7", + "dockerImage": "googleapis/artman@sha256:d6c8ced606eb49973ca95d2af7c55a681acc042db0f87d135968349e7bf6dd80" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2a5caab4315cb5ab3d5c97c90c6d4e9441052b16", - "internalRef": "227195651" + "sha": "a6b4398490269577fc511f297b85763ba4701403", + "internalRef": "230969086" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2018.12.6" + "version": "2019.1.16" } } ], diff --git a/packages/google-cloud-tasks/test/gapic-v2beta2.js b/packages/google-cloud-tasks/test/gapic-v2beta2.js index a7d2845ec8b..06804982b76 100644 --- a/packages/google-cloud-tasks/test/gapic-v2beta2.js +++ b/packages/google-cloud-tasks/test/gapic-v2beta2.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-tasks/test/gapic-v2beta3.js b/packages/google-cloud-tasks/test/gapic-v2beta3.js index 3b9cda6fd60..a5543617f3a 100644 --- a/packages/google-cloud-tasks/test/gapic-v2beta3.js +++ b/packages/google-cloud-tasks/test/gapic-v2beta3.js @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC +// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.