diff --git a/google-cloud-bigtable/conformance/known_failures.txt b/google-cloud-bigtable/conformance/known_failures.txt index 50c9fa926e70..3d843191ade2 100644 --- a/google-cloud-bigtable/conformance/known_failures.txt +++ b/google-cloud-bigtable/conformance/known_failures.txt @@ -40,6 +40,7 @@ TestMutateRow_Generic_DeadlineExceeded TestMutateRow_Generic_CloseClient TestMutateRows_Generic_DeadlineExceeded TestMutateRows_Generic_CloseClient +TestMutateRows_NoRetry_MissingResponseEntry TestReadModifyWriteRow_Generic_CloseClient TestReadModifyWriteRow_Generic_DeadlineExceeded TestReadRow_Generic_DeadlineExceeded diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/app_profile.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/app_profile.rb index 733d8f044bb1..cf05f316928b 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/app_profile.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/app_profile.rb @@ -45,6 +45,7 @@ module Bigtable # # # Delete # app_profile.delete + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # class AppProfile # @private @@ -119,6 +120,7 @@ def description # Sets the description of the app profile. # # @param text [String] Description text + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def description= text @grpc.description = text @@ -190,6 +192,7 @@ def single_cluster_routing # allow_transactional_writes: true # ) # app_profile.routing_policy = routing_policy + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def routing_policy= policy routing_policy_grpc = policy.to_grpc @@ -261,6 +264,7 @@ def routing_policy # # # OR : Not ignoring warnings # app_profile.delete + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def delete ignore_warnings: false ensure_service! @@ -324,6 +328,7 @@ def delete ignore_warnings: false # app_profile = job.app_profile # puts app_profile.name # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def save ignore_warnings: false ensure_service! @@ -338,6 +343,7 @@ def save ignore_warnings: false # Reloads the app profile data. # # @return [Google::Cloud::Bigtable::AppProfile] + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def reload! @grpc = service.get_app_profile instance_id, name @@ -369,6 +375,7 @@ def reload! # description: "App profile for user data instance" # ) # puts app_profile.routing_policy + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def self.multi_cluster_routing Google::Cloud::Bigtable::MultiClusterRoutingUseAny.new @@ -408,6 +415,7 @@ def self.multi_cluster_routing # description: "App profile for user data instance" # ) # puts app_profile.routing_policy + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def self.single_cluster_routing cluster_id, allow_transactional_writes: false Google::Cloud::Bigtable::SingleClusterRouting.new cluster_id, allow_transactional_writes diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/cluster.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/cluster.rb index b34a6610f94b..7917156a07d0 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/cluster.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/cluster.rb @@ -42,6 +42,7 @@ module Bigtable # # # Delete # cluster.delete + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # class Cluster # @private @@ -160,6 +161,7 @@ def nodes # throughput and more consistent performance. # # @param serve_nodes [Integer] Number of nodes + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def nodes= serve_nodes @grpc.serve_nodes = serve_nodes @@ -254,6 +256,7 @@ def kms_key # else # backup = job.backup # end + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def create_backup source_table, backup_id, expire_time source_table_id = source_table.respond_to?(:name) ? source_table.name : source_table @@ -285,6 +288,7 @@ def create_backup source_table, backup_id, expire_time # if backup # puts backup.backup_id # end + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def backup backup_id grpc = service.get_backup instance_id, cluster_id, backup_id @@ -309,6 +313,7 @@ def backup backup_id # cluster.backups.all do |backup| # puts backup.backup_id # end + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def backups grpc = service.list_backups instance_id, cluster_id @@ -345,6 +350,7 @@ def backups # else # cluster = job.cluster # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def save ensure_service! @@ -357,6 +363,7 @@ def save # Reloads cluster data. # # @return [Google::Cloud::Bigtable::Cluster] + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def reload! @grpc = service.get_cluster instance_id, cluster_id @@ -376,6 +383,7 @@ def reload! # instance = bigtable.instance "my-instance" # cluster = instance.cluster "my-cluster" # cluster.delete + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def delete ensure_service! diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/instance.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/instance.rb index 24497b3f2433..97e27dd1854d 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/instance.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/instance.rb @@ -60,6 +60,7 @@ module Bigtable # else # instance = job.instance # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # class Instance # @private @@ -108,6 +109,7 @@ def display_name # to avoid confusion. # # @param value [String] The descriptive name for the instance. + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def display_name= value @grpc.display_name = value @@ -209,6 +211,7 @@ def production? # instance.type = :PRODUCTION # instance.development? # false # instance.production? # true + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def type= instance_type @grpc.type = instance_type @@ -240,6 +243,7 @@ def labels # Sets the Cloud Labels for the instance. # # @param labels [Hash{String=>String}] The Cloud Labels. + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def labels= labels labels ||= {} @@ -285,6 +289,7 @@ def labels= labels # puts instance.name # puts instance.labels # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def save ensure_service! @@ -298,6 +303,7 @@ def save # Reloads instance data. # # @return [Google::Cloud::Bigtable::Instance] + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def reload! @grpc = service.get_instance instance_id @@ -316,6 +322,7 @@ def reload! # # instance = bigtable.instance "my-instance" # instance.delete + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def delete ensure_service! @@ -345,6 +352,7 @@ def delete # instance.clusters.all do |cluster| # puts cluster.cluster_id # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def clusters token: nil ensure_service! @@ -370,6 +378,7 @@ def clusters token: nil # # cluster = instance.cluster "my-cluster" # puts cluster.cluster_id + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def cluster cluster_id ensure_service! @@ -422,6 +431,7 @@ def cluster cluster_id # else # cluster = job.cluster # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def create_cluster cluster_id, location, nodes: nil, storage_type: nil ensure_service! @@ -456,6 +466,7 @@ def create_cluster cluster_id, location, nodes: nil, storage_type: nil # instance.tables.all do |table| # puts table.name # end + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def tables ensure_service! @@ -603,6 +614,7 @@ def table table_id, view: nil, perform_lookup: nil, app_profile_id: nil # end # # puts table + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def create_table name, column_families: nil, granularity: nil, initial_splits: nil, &block ensure_service! @@ -703,6 +715,7 @@ def create_table name, column_families: nil, granularity: nil, initial_splits: n # ignore_warnings: true # ) # puts app_profile.name + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def create_app_profile name, routing_policy, description: nil, etag: nil, ignore_warnings: false ensure_service! @@ -750,6 +763,7 @@ def create_app_profile name, routing_policy, description: nil, etag: nil, ignore # if app_profile # puts app_profile.name # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def app_profile app_profile_id ensure_service! @@ -778,6 +792,7 @@ def app_profile app_profile_id # instance.app_profiles.all do |app_profile| # puts app_profile.name # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def app_profiles ensure_service! @@ -817,6 +832,7 @@ def app_profiles # instance.policy do |p| # p.add "roles/owner", "user:owner@example.com" # end # 2 API calls + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def policy ensure_service! @@ -853,6 +869,7 @@ def policy # updated_policy = instance.update_policy policy # # puts updated_policy.roles + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def update_policy new_policy ensure_service! @@ -897,6 +914,7 @@ def update_policy new_policy # ) # permissions.include? "bigtable.instances.get" #=> true # permissions.include? "bigtable.instances.update" #=> false + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def test_iam_permissions *permissions ensure_service! diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/policy.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/policy.rb index 05bb0b0b4349..0f85a0f58aa0 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/policy.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/policy.rb @@ -52,6 +52,7 @@ module Bigtable # policy.remove "roles/owner", "user:owner@example.com" # policy.add "roles/owner", "user:newowner@example.com" # policy.roles["roles/viewer"] = ["allUsers"] + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} or {Google::Cloud::Bigtable::Project#table_admin_client} instead. # class Policy attr_reader :etag diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/project.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/project.rb index 41a43fc3eaab..0b763862464e 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/project.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/project.rb @@ -134,6 +134,7 @@ def project_id # instances.all do |instance| # puts instance.instance_id # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def instances token: nil ensure_service! @@ -157,6 +158,7 @@ def instances token: nil # if instance # puts instance.instance_id # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def instance instance_id ensure_service! @@ -257,6 +259,7 @@ def instance instance_id # else # instance = job.instance # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def create_instance instance_id, display_name: nil, type: nil, labels: nil, clusters: nil labels = labels.to_h { |k, v| [String(k), String(v)] } if labels @@ -291,6 +294,7 @@ def create_instance instance_id, display_name: nil, type: nil, labels: nil, clus # puts cluster.cluster_id # puts cluster.ready? # end + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # def clusters token: nil ensure_service! @@ -314,6 +318,7 @@ def clusters token: nil # puts table.name # puts table.column_families # end + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def tables instance_id ensure_service! @@ -455,6 +460,7 @@ def table instance_id, table_id, view: nil, perform_lookup: nil, app_profile_id: # end # # puts table + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def create_table instance_id, table_id, column_families: nil, granularity: nil, initial_splits: nil, &block ensure_service! @@ -483,6 +489,7 @@ def create_table instance_id, table_id, column_families: nil, granularity: nil, # bigtable = Google::Cloud::Bigtable.new # # bigtable.delete_table "my-instance", "my-table" + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def delete_table instance_id, table_id service.delete_table instance_id, table_id @@ -535,6 +542,7 @@ def delete_table instance_id, table_id # else # backup = job.backup # end + # @deprecated Use {Google::Cloud::Bigtable::Project#table_admin_client} instead. # def copy_backup dest_project_id:, dest_instance_id:, dest_cluster_id:, new_backup_id:, source_instance_id:, source_cluster_id:, source_backup_id:, expire_time: diff --git a/google-cloud-bigtable/lib/google/cloud/bigtable/routing_policy.rb b/google-cloud-bigtable/lib/google/cloud/bigtable/routing_policy.rb index cf0b832e2b9b..2d6b285d8cc2 100644 --- a/google-cloud-bigtable/lib/google/cloud/bigtable/routing_policy.rb +++ b/google-cloud-bigtable/lib/google/cloud/bigtable/routing_policy.rb @@ -67,6 +67,7 @@ module Bigtable # description: "App profile for user data instance" # ) # puts app_profile.routing_policy + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # class RoutingPolicy end @@ -95,6 +96,7 @@ class RoutingPolicy # description: "App profile for user data instance" # ) # puts app_profile.routing_policy + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # class MultiClusterRoutingUseAny < RoutingPolicy # @private @@ -139,6 +141,7 @@ def to_grpc # allowed by this app profile. It is unsafe to send these requests to # the same table/row/column in multiple clusters. # Default value is false. + # @deprecated Use {Google::Cloud::Bigtable::Project#instance_admin_client} instead. # class SingleClusterRouting < RoutingPolicy attr_reader :cluster_id