Skip to content

Commit

Permalink
chore: change default retry policies timeouts (via synth) (#48)
Browse files Browse the repository at this point in the history
* chore: change default retry policies timeouts

* Fix synth replacements, re-generate code
  • Loading branch information
plamut authored Sep 16, 2020
1 parent 8aa4609 commit f8acd69
Show file tree
Hide file tree
Showing 18 changed files with 1,274 additions and 617 deletions.
Empty file.
2 changes: 1 addition & 1 deletion packages/google-cloud-bigquery-datatransfer/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "1.6.3"
needs_sphinx = "1.5.5"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@
from google.cloud.bigquery_datatransfer_v1 import types


__all__ = ("enums", "types", "DataTransferServiceClient")
__all__ = (
"enums",
"types",
"DataTransferServiceClient",
)
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

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"
"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)
Expand All @@ -38,4 +38,8 @@ class DataTransferServiceClient(data_transfer_service_client.DataTransferService
enums = enums


__all__ = ("enums", "types", "DataTransferServiceClient")
__all__ = (
"enums",
"types",
"DataTransferServiceClient",
)

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,109 @@
"interfaces": {
"google.cloud.bigquery.datatransfer.v1.DataTransferService": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
"retry_policy_1_codes": ["UNAVAILABLE", "DEADLINE_EXCEEDED"],
"no_retry_codes": [],
"no_retry_1_codes": [],
},
"retry_params": {
"default": {
"retry_policy_1_params": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"total_timeout_millis": 600000,
}
},
"methods": {
"DeleteTransferConfig": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"total_timeout_millis": 20000,
},
"DeleteTransferRun": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"no_retry_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 0,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 0,
"total_timeout_millis": 0,
},
"CheckValidCreds": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"no_retry_1_params": {
"initial_retry_delay_millis": 0,
"retry_delay_multiplier": 0.0,
"max_retry_delay_millis": 0,
"initial_rpc_timeout_millis": 30000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 30000,
"total_timeout_millis": 30000,
},
},
"methods": {
"GetDataSource": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"ListDataSources": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"CreateTransferConfig": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 30000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"UpdateTransferConfig": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 30000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"DeleteTransferConfig": {
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"GetTransferConfig": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"ListTransferConfigs": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"ScheduleTransferRuns": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"timeout_millis": 30000,
"retry_codes_name": "no_retry_1_codes",
"retry_params_name": "no_retry_1_params",
},
"StartManualTransferRuns": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
"retry_codes_name": "no_retry_codes",
"retry_params_name": "no_retry_params",
},
"GetTransferRun": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"DeleteTransferRun": {
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"ListTransferRuns": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"ListTransferLogs": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
"CheckValidCreds": {
"timeout_millis": 20000,
"retry_codes_name": "retry_policy_1_codes",
"retry_params_name": "retry_policy_1_params",
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@

class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value
for the ``Value`` type union.
A designation of a specific field behavior (required, output only,
etc.) in protobuf messages.
The JSON representation for ``NullValue`` is JSON ``null``.
Examples:
string name = 1 [(google.api.field_behavior) = REQUIRED]; State state =
1 [(google.api.field_behavior) = OUTPUT_ONLY]; google.protobuf.Duration
ttl = 1 [(google.api.field_behavior) = INPUT_ONLY];
google.protobuf.Timestamp expire_time = 1 [(google.api.field_behavior) =
OUTPUT_ONLY, (google.api.field_behavior) = IMMUTABLE];
Attributes:
NULL_VALUE (int): Null value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
# exception (channels come with credentials baked in already).
if channel is not None and credentials is not None:
raise ValueError(
"The `channel` and `credentials` arguments are mutually " "exclusive."
"The `channel` and `credentials` arguments are mutually " "exclusive.",
)

# Create the channel.
Expand All @@ -77,7 +77,7 @@ def __init__(
self._stubs = {
"data_transfer_service_stub": datatransfer_pb2_grpc.DataTransferServiceStub(
channel
)
),
}

@classmethod
Expand Down Expand Up @@ -115,51 +115,6 @@ def channel(self):
"""
return self._channel

@property
def delete_transfer_config(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.delete_transfer_config`.
Deletes a data transfer configuration,
including any associated transfer runs and logs.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].DeleteTransferConfig

@property
def delete_transfer_run(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.delete_transfer_run`.
Deletes the specified transfer run.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].DeleteTransferRun

@property
def check_valid_creds(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.check_valid_creds`.
Returns true if valid credentials exist for the given data source and
requesting user.
Some data sources doesn't support service account, so we need to talk to
them on behalf of the end user. This API just checks whether we have OAuth
token for the particular user, which is a pre-requisite before user can
create a transfer config.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].CheckValidCreds

@property
def get_data_source(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.get_data_source`.
Expand Down Expand Up @@ -215,6 +170,20 @@ def update_transfer_config(self):
"""
return self._stubs["data_transfer_service_stub"].UpdateTransferConfig

@property
def delete_transfer_config(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.delete_transfer_config`.
Deletes a data transfer configuration,
including any associated transfer runs and logs.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].DeleteTransferConfig

@property
def get_transfer_config(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.get_transfer_config`.
Expand Down Expand Up @@ -245,10 +214,9 @@ def list_transfer_configs(self):
def schedule_transfer_runs(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.schedule_transfer_runs`.
Creates transfer runs for a time range [start_time, end_time]. For
each date - or whatever granularity the data source supports - in the
range, one transfer run is created. Note that runs are created per UTC
time in the time range. DEPRECATED: use StartManualTransferRuns instead.
If type_name is set, this need not be set. If both this and
type_name are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or
TYPE_GROUP.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -261,10 +229,11 @@ def schedule_transfer_runs(self):
def start_manual_transfer_runs(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.start_manual_transfer_runs`.
Start manual transfer runs to be executed now with schedule_time
equal to current time. The transfer runs can be created for a time range
where the run_time is between start_time (inclusive) and end_time
(exclusive), or for a specific run_time.
Pagination token, which can be used to request a specific page of
``ListTransferRunsRequest`` list results. For multiple-page results,
``ListTransferRunsResponse`` outputs a ``next_page`` token, which can be
used as the ``page_token`` value to request the next page of list
results.
Returns:
Callable: A callable which accepts the appropriate
Expand All @@ -286,6 +255,19 @@ def get_transfer_run(self):
"""
return self._stubs["data_transfer_service_stub"].GetTransferRun

@property
def delete_transfer_run(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.delete_transfer_run`.
Deletes the specified transfer run.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].DeleteTransferRun

@property
def list_transfer_runs(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.list_transfer_runs`.
Expand All @@ -311,3 +293,21 @@ def list_transfer_logs(self):
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].ListTransferLogs

@property
def check_valid_creds(self):
"""Return the gRPC stub for :meth:`DataTransferServiceClient.check_valid_creds`.
Returns true if valid credentials exist for the given data source and
requesting user.
Some data sources doesn't support service account, so we need to talk to
them on behalf of the end user. This API just checks whether we have OAuth
token for the particular user, which is a pre-requisite before user can
create a transfer config.
Returns:
Callable: A callable which accepts the appropriate
deserialized request object and returns a
deserialized response object.
"""
return self._stubs["data_transfer_service_stub"].CheckValidCreds
Loading

0 comments on commit f8acd69

Please sign in to comment.