Skip to content

Commit

Permalink
fix: DEADLINE_EXCEEDED is no longer retried (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and bcoe committed May 9, 2019
1 parent 50df440 commit 2292d07
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-iot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"eslint-plugin-prettier": "^3.0.0",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"jsdoc": "3.5.5",
"mocha": "^6.0.0",
"nyc": "^14.0.0",
"power-assert": "^1.6.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/google-cloud-iot/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
/**
* @namespace google.rpc
*/
/**
* @namespace google.type
*/

'use strict';

Expand Down
9 changes: 3 additions & 6 deletions packages/google-cloud-iot/src/v1/device_manager_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1266,8 +1266,7 @@ class DeviceManagerClient {
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy is being specified.
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* See the operation documentation for the appropriate value for this field.
* @param {Object} request.policy
* REQUIRED: The complete policy to be applied to the `resource`. The size of
* the policy is limited to a few 10s of KB. An empty policy is a
Expand Down Expand Up @@ -1335,8 +1334,7 @@ class DeviceManagerClient {
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy is being requested.
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* See the operation documentation for the appropriate value for this field.
* @param {Object} [options]
* Optional parameters. You can override the default settings for this call, e.g, timeout,
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
Expand Down Expand Up @@ -1392,8 +1390,7 @@ class DeviceManagerClient {
* The request object that will be sent.
* @param {string} request.resource
* REQUIRED: The resource for which the policy detail is being requested.
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* See the operation documentation for the appropriate value for this field.
* @param {string[]} request.permissions
* The set of permissions to check for the `resource`. Permissions with
* wildcards (such as '*' or 'storage.*') are not allowed. For more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
"google.cloud.iot.v1.DeviceManager": {
"retry_codes": {
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": [],
"rate_limited_aware": [
"DEADLINE_EXCEEDED",
"RESOURCE_EXHAUSTED",
"UNAVAILABLE"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
*
* @property {string} resource
* REQUIRED: The resource for which the policy is being specified.
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* See the operation documentation for the appropriate value for this field.
*
* @property {Object} policy
* REQUIRED: The complete policy to be applied to the `resource`. The size of
Expand All @@ -44,8 +43,7 @@ const SetIamPolicyRequest = {
*
* @property {string} resource
* REQUIRED: The resource for which the policy is being requested.
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* See the operation documentation for the appropriate value for this field.
*
* @typedef GetIamPolicyRequest
* @memberof google.iam.v1
Expand All @@ -60,8 +58,7 @@ const GetIamPolicyRequest = {
*
* @property {string} resource
* REQUIRED: The resource for which the policy detail is being requested.
* `resource` is usually specified as a path. For example, a Project
* resource is specified as `projects/{project}`.
* See the operation documentation for the appropriate value for this field.
*
* @property {string[]} permissions
* The set of permissions to check for the `resource`. Permissions with
Expand Down
39 changes: 30 additions & 9 deletions packages/google-cloud-iot/src/v1/doc/google/iam/v1/doc_policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
* specify access control policies for Cloud Platform resources.
*
*
* A `Policy` consists of a list of `bindings`. A `Binding` binds a list of
* A `Policy` consists of a list of `bindings`. A `binding` binds a list of
* `members` to a `role`, where the members can be user accounts, Google groups,
* Google domains, and service accounts. A `role` is a named list of permissions
* defined by IAM.
*
* **Example**
* **JSON Example**
*
* {
* "bindings": [
Expand All @@ -35,7 +35,7 @@
* "user:[email protected]",
* "group:[email protected]",
* "domain:google.com",
* "serviceAccount:[email protected]",
* "serviceAccount:[email protected]"
* ]
* },
* {
Expand All @@ -45,15 +45,28 @@
* ]
* }
*
* **YAML Example**
*
* bindings:
* - members:
* - user:[email protected]
* - group:[email protected]
* - domain:google.com
* - serviceAccount:[email protected]
* role: roles/owner
* - members:
* - user:[email protected]
* role: roles/viewer
*
*
* For a description of IAM and its features, see the
* [IAM developer's guide](https://cloud.google.com/iam).
* [IAM developer's guide](https://cloud.google.com/iam/docs).
*
* @property {number} version
* Version of the `Policy`. The default version is 0.
* Deprecated.
*
* @property {Object[]} bindings
* Associates a list of `members` to a `role`.
* Multiple `bindings` must not be specified for the same `role`.
* `bindings` with no members will result in an error.
*
* This object should have the same structure as [Binding]{@link google.iam.v1.Binding}
Expand Down Expand Up @@ -84,7 +97,6 @@ const Policy = {
* @property {string} role
* Role that is assigned to `members`.
* For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
* Required
*
* @property {string[]} members
* Specifies the identities requesting access for a Cloud Platform resource.
Expand All @@ -97,7 +109,7 @@ const Policy = {
* who is authenticated with a Google account or a service account.
*
* * `user:{emailid}`: An email address that represents a specific Google
* account. For example, `[email protected]` or `[email protected]`.
* account. For example, `[email protected]` .
*
*
* * `serviceAccount:{emailid}`: An email address that represents a service
Expand All @@ -106,9 +118,18 @@ const Policy = {
* * `group:{emailid}`: An email address that represents a Google group.
* For example, `[email protected]`.
*
* * `domain:{domain}`: A Google Apps domain name that represents all the
*
* * `domain:{domain}`: The G Suite domain (primary) that represents all the
* users of that domain. For example, `google.com` or `example.com`.
*
* @property {Object} condition
* The condition that is associated with this binding.
* NOTE: An unsatisfied condition will not allow user access via current
* binding. Different bindings, including their conditions, are examined
* independently.
*
* This object should have the same structure as [Expr]{@link google.type.Expr}
*
* @typedef Binding
* @memberof google.iam.v1
* @see [google.iam.v1.Binding definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/iam/v1/policy.proto}
Expand Down
51 changes: 51 additions & 0 deletions packages/google-cloud-iot/src/v1/doc/google/type/doc_expr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// 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.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Note: this file is purely for documentation. Any contents are not expected
// to be loaded as the JS file.

/**
* Represents an expression text. Example:
*
* title: "User account presence"
* description: "Determines whether the request has a user account"
* expression: "size(request.user) > 0"
*
* @property {string} expression
* Textual representation of an expression in
* Common Expression Language syntax.
*
* The application context of the containing message determines which
* well-known feature set of CEL is supported.
*
* @property {string} title
* An optional title for the expression, i.e. a short string describing
* its purpose. This can be used e.g. in UIs which allow to enter the
* expression.
*
* @property {string} description
* An optional description of the expression. This is a longer text which
* describes the expression, e.g. when hovered over it in a UI.
*
* @property {string} location
* An optional string indicating the location of the expression for error
* reporting, e.g. a file name and a position in the file.
*
* @typedef Expr
* @memberof google.type
* @see [google.type.Expr definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/type/expr.proto}
*/
const Expr = {
// This is for documentation. Actual contents will be loaded by gRPC.
};
10 changes: 5 additions & 5 deletions packages/google-cloud-iot/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-05-04T11:15:24.641079Z",
"updateTime": "2019-05-08T16:15:42.726285Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.18.0",
"dockerImage": "googleapis/artman@sha256:29bd82cc42c43825fde408e63fc955f3f9d07ff9989243d7aa0f91a35c7884dc"
"version": "0.19.0",
"dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "39c876cca5403e7e8282ce2229033cc3cc02962c",
"internalRef": "246561601"
"sha": "51145ff7812d2bb44c1219d0b76dac92a8bd94b2",
"internalRef": "247143125"
}
},
{
Expand Down

0 comments on commit 2292d07

Please sign in to comment.