Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump default deadline on CreateDatabase and RestoreDatabase to 2 minutes #28245

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ def self.configure

default_config.rpcs.bulk_delete_documents.timeout = 60.0

default_config.rpcs.create_database.timeout = 120.0

default_config.rpcs.restore_database.timeout = 120.0

default_config
end
yield @configure if block_given?
Expand Down Expand Up @@ -1901,7 +1905,7 @@ def get_backup request, options = nil
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
# @overload list_backups(parent: nil)
# @overload list_backups(parent: nil, filter: nil)
# Pass arguments to `list_backups` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
Expand All @@ -1913,6 +1917,19 @@ def get_backup request, options = nil
# Use `{location} = '-'` to list backups from all locations for the given
# project. This allows listing backups from a single location or from all
# locations.
# @param filter [::String]
# An expression that filters the list of returned backups.
#
# A filter expression consists of a field name, a comparison operator, and a
# value for filtering.
# The value must be a string, a number, or a boolean. The comparison operator
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
# Colon `:` is the contains operator. Filter rules are not case sensitive.
#
# The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are
# eligible for filtering:
#
# * `database_uid` (supports `=` only)
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def self.configure

default_config.rpcs.bulk_delete_documents.timeout = 60.0

default_config.rpcs.create_database.timeout = 120.0

default_config.rpcs.restore_database.timeout = 120.0

default_config
end
yield @configure if block_given?
Expand Down Expand Up @@ -1782,7 +1786,7 @@ def get_backup request, options = nil
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
# @overload list_backups(parent: nil)
# @overload list_backups(parent: nil, filter: nil)
# Pass arguments to `list_backups` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
Expand All @@ -1794,6 +1798,19 @@ def get_backup request, options = nil
# Use `{location} = '-'` to list backups from all locations for the given
# project. This allows listing backups from a single location or from all
# locations.
# @param filter [::String]
# An expression that filters the list of returned backups.
#
# A filter expression consists of a field name, a comparison operator, and a
# value for filtering.
# The value must be a string, a number, or a boolean. The comparison operator
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
# Colon `:` is the contains operator. Filter rules are not case sensitive.
#
# The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are
# eligible for filtering:
#
# * `database_uid` (supports `=` only)
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,20 @@ class GetBackupRequest
# Use `{location} = '-'` to list backups from all locations for the given
# project. This allows listing backups from a single location or from all
# locations.
# @!attribute [rw] filter
# @return [::String]
# An expression that filters the list of returned backups.
#
# A filter expression consists of a field name, a comparison operator, and a
# value for filtering.
# The value must be a string, a number, or a boolean. The comparison operator
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
# Colon `:` is the contains operator. Filter rules are not case sensitive.
#
# The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are
# eligible for filtering:
#
# * `database_uid` (supports `=` only)
class ListBackupsRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,7 @@ def test_list_backups

# Create request parameters for a unary method.
parent = "hello world"
filter = "hello world"

list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:|
assert options.metadata.key? :"x-goog-api-client"
Expand All @@ -988,27 +989,27 @@ def test_list_backups
end

# Use hash object
client.list_backups({ parent: parent }) do |_result, response|
client.list_backups({ parent: parent, filter: filter }) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use named arguments
client.list_backups parent: parent do |_result, response|
client.list_backups parent: parent, filter: filter do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use protobuf object
client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent) do |_result, response|
client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use hash object with options
client.list_backups({ parent: parent }, call_options) do |_result, response|
client.list_backups({ parent: parent, filter: filter }, call_options) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use protobuf object with options
client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent), call_options) do |_result, response|
client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter), call_options) do |_result, response|
assert_equal http_response, response.underlying_op
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,13 @@ def test_list_backups

# Create request parameters for a unary method.
parent = "hello world"
filter = "hello world"

list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :list_backups, name
assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, request
assert_equal "hello world", request["parent"]
assert_equal "hello world", request["filter"]
refute_nil options
end

Expand All @@ -1110,31 +1112,31 @@ def test_list_backups
end

# Use hash object
client.list_backups({ parent: parent }) do |response, operation|
client.list_backups({ parent: parent, filter: filter }) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use named arguments
client.list_backups parent: parent do |response, operation|
client.list_backups parent: parent, filter: filter do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use protobuf object
client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent) do |response, operation|
client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use hash object with options
client.list_backups({ parent: parent }, grpc_options) do |response, operation|
client.list_backups({ parent: parent, filter: filter }, grpc_options) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use protobuf object with options
client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent), grpc_options) do |response, operation|
client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter), grpc_options) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
Expand Down
Loading