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

samples(spanner): update samples to use wrappers #890

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
a138b8d
update samples to use wrappers
NivedhaSenthil Dec 6, 2021
81e5e2b
update spanner_create_instance
NivedhaSenthil Dec 6, 2021
1140e27
update create instance and database samples
NivedhaSenthil Dec 7, 2021
db3d790
update create_database_with_version_retention_period
NivedhaSenthil Dec 7, 2021
e249069
update create_database_with_encryption_key
NivedhaSenthil Dec 9, 2021
de3d4f5
update create_table_with_timestamp_column
NivedhaSenthil Dec 9, 2021
1ea47f8
update create_index
NivedhaSenthil Dec 9, 2021
36afe37
update storing index
NivedhaSenthil Dec 9, 2021
d56e16d
update add column
NivedhaSenthil Dec 9, 2021
705c775
update add_timestamp_column
NivedhaSenthil Dec 9, 2021
5340beb
update add_numeric_column
NivedhaSenthil Dec 9, 2021
f02dceb
update write_read_bool_array
NivedhaSenthil Dec 9, 2021
251cad9
update write_read_empty_int64_array
NivedhaSenthil Dec 9, 2021
06e4c6b
update write_read_null_int64_array
NivedhaSenthil Dec 9, 2021
7d33666
update write_read_int64_array
NivedhaSenthil Dec 9, 2021
6eb5664
update write_read_empty_float64_array
NivedhaSenthil Dec 9, 2021
dea018c
update write_read_null_float64_array
NivedhaSenthil Dec 9, 2021
5748a8d
update write_read_float64_array
NivedhaSenthil Dec 9, 2021
7ec5d54
update create_backup
NivedhaSenthil Dec 9, 2021
730fb07
update create_backup_with_encryption_key
NivedhaSenthil Dec 9, 2021
7220ee3
update backup samples
NivedhaSenthil Dec 10, 2021
77fd1d4
update create backup cancel
NivedhaSenthil Dec 10, 2021
956df2f
update list backup operations
NivedhaSenthil Dec 10, 2021
aa9afad
update list_database_operations
NivedhaSenthil Dec 10, 2021
a022e8a
update list backups
NivedhaSenthil Dec 10, 2021
f6f7e22
update delete backup
NivedhaSenthil Dec 10, 2021
b637f6a
update update_backup
NivedhaSenthil Dec 10, 2021
844a30d
fix rubocop complaints
NivedhaSenthil Dec 13, 2021
1401f67
Revert "fix rubocop complaints"
NivedhaSenthil Dec 13, 2021
319197a
Fix linting errors
NivedhaSenthil Dec 13, 2021
77268ce
fix tests
NivedhaSenthil Dec 14, 2021
29080f7
Fix test assertion
NivedhaSenthil Dec 15, 2021
9359bbe
Fix tests and run on new instance
NivedhaSenthil Dec 16, 2021
2dcc4f3
update gemlock
NivedhaSenthil Dec 16, 2021
79fe923
test config change
NivedhaSenthil Dec 16, 2021
a3cbabf
update with instance created in us-west1
NivedhaSenthil Dec 16, 2021
63e032c
check with new instance
NivedhaSenthil Dec 16, 2021
f18ea05
remove bundle update
NivedhaSenthil Dec 21, 2021
4b61424
Revert "remove bundle update"
NivedhaSenthil Dec 21, 2021
d60030e
bundle update conservatively
NivedhaSenthil Dec 21, 2021
fe88aab
use mini_racer version less than 0.5.0
NivedhaSenthil Dec 21, 2021
054ea8e
update mini_racer
NivedhaSenthil Dec 21, 2021
e64678e
update versions for pubsub
NivedhaSenthil Dec 21, 2021
4594483
update jobs api-client
NivedhaSenthil Dec 21, 2021
1c16232
update with key created in us-west1
NivedhaSenthil Dec 21, 2021
9adb287
update spanner deps
NivedhaSenthil Dec 21, 2021
2565dc4
update to use specific mini_racer version
NivedhaSenthil Dec 22, 2021
3a23aa9
increase koroko timeout for tests
NivedhaSenthil Dec 22, 2021
2d20f76
skip backup tests
NivedhaSenthil Dec 22, 2021
133270b
Revert "update to use specific mini_racer version"
NivedhaSenthil Dec 23, 2021
666f1e2
Revert "update with key created in us-west1"
NivedhaSenthil Dec 23, 2021
531f964
Revert "update jobs api-client"
NivedhaSenthil Dec 23, 2021
9a374ff
Revert "update versions for pubsub"
NivedhaSenthil Dec 23, 2021
85e9c73
Revert "update mini_racer"
NivedhaSenthil Dec 23, 2021
3a424b5
Revert "use mini_racer version less than 0.5.0"
NivedhaSenthil Dec 23, 2021
9bd1af4
Revert "check with new instance"
NivedhaSenthil Dec 23, 2021
85b8acf
Revert "update with instance created in us-west1"
NivedhaSenthil Dec 23, 2021
82c64ea
Revert "test config change"
NivedhaSenthil Dec 23, 2021
5160b10
revert test config changes
NivedhaSenthil Dec 23, 2021
c2675de
revert test config changes
NivedhaSenthil Dec 23, 2021
eba8ba4
revert test config changes
NivedhaSenthil Dec 23, 2021
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
44 changes: 22 additions & 22 deletions spanner/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEM
public_suffix (>= 2.0.2, < 5.0)
concurrent-ruby (1.1.9)
diff-lcs (1.4.4)
faraday (1.7.0)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand Down Expand Up @@ -36,50 +36,50 @@ GEM
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
google-cloud-spanner (2.10.0)
google-cloud-errors (1.2.0)
google-cloud-spanner (2.11.0)
concurrent-ruby (~> 1.0)
google-cloud-core (~> 1.5)
google-cloud-spanner-admin-database-v1 (~> 0.1)
google-cloud-spanner-admin-instance-v1 (~> 0.1)
google-cloud-spanner-v1 (~> 0.2)
google-cloud-spanner-admin-database-v1 (0.7.2)
google-cloud-spanner-admin-database-v1 (0.7.4)
gapic-common (>= 0.7, < 2.a)
google-cloud-errors (~> 1.0)
grpc-google-iam-v1 (>= 0.6.10, < 2.a)
google-cloud-spanner-admin-instance-v1 (0.5.2)
google-cloud-spanner-admin-instance-v1 (0.5.4)
gapic-common (>= 0.7, < 2.a)
google-cloud-errors (~> 1.0)
grpc-google-iam-v1 (>= 0.6.10, < 2.a)
google-cloud-spanner-v1 (0.7.2)
google-cloud-spanner-v1 (0.7.3)
gapic-common (>= 0.7, < 2.a)
google-cloud-errors (~> 1.0)
google-protobuf (3.17.3)
googleapis-common-protos (1.3.11)
google-protobuf (3.19.1)
googleapis-common-protos (1.3.12)
google-protobuf (~> 3.14)
googleapis-common-protos-types (>= 1.0.6, < 2.0)
googleapis-common-protos-types (~> 1.2)
grpc (~> 1.27)
googleapis-common-protos-types (1.1.0)
googleapis-common-protos-types (1.3.0)
google-protobuf (~> 3.14)
googleauth (0.17.0)
googleauth (1.1.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
grpc (1.38.0)
google-protobuf (~> 3.15)
signet (>= 0.16, < 2.a)
grpc (1.42.0)
google-protobuf (~> 3.18)
googleapis-common-protos-types (~> 1.0)
grpc-google-iam-v1 (0.6.11)
grpc-google-iam-v1 (1.0.0)
google-protobuf (~> 3.14)
googleapis-common-protos (>= 1.3.11, < 2.0)
googleapis-common-protos (>= 1.3.12, < 2.0)
grpc (~> 1.27)
jwt (2.2.3)
jwt (2.3.0)
memoist (0.16.2)
multi_json (1.15.0)
multipart-post (2.1.1)
os (1.1.1)
os (1.1.4)
public_suffix (4.0.6)
rspec (3.10.0)
rspec-core (~> 3.10.0)
Expand All @@ -93,12 +93,12 @@ GEM
rspec-mocks (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
rspec-support (3.10.3)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
ruby2_keywords (0.0.5)
signet (0.15.0)
addressable (~> 2.3)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
Expand All @@ -112,4 +112,4 @@ DEPENDENCIES
rspec_junit_formatter

BUNDLED WITH
2.2.19
2.2.32
24 changes: 12 additions & 12 deletions spanner/database_leader_placement_samples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def instance_config project_id:, instance_config_id:
# instance_config_id = "Spanner instance config ID"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/instance"

instance_admin_client = \
Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
instance_admin_client = Google::Cloud::Spanner::Admin::Instance.instance_admin

instance_config_path = instance_admin_client.instance_config_path \
project: project_id, instance_config: instance_config_id
Expand All @@ -35,9 +35,9 @@ def list_instance_configs project_id:
# project_id = "Your Google Cloud project ID"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/instance"

instance_admin_client = \
Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
instance_admin_client = Google::Cloud::Spanner::Admin::Instance.instance_admin

project_path = instance_admin_client.project_path project: project_id
configs = instance_admin_client.list_instance_configs parent: project_path
Expand All @@ -54,9 +54,9 @@ def list_databases project_id:, instance_id:
# instance_id = "Your Spanner instance ID"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/database"

db_admin_client = \
Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
db_admin_client = Google::Cloud::Spanner::Admin::Database.database_admin project_id: project_id

instance_path = db_admin_client.instance_path project: project_id,
instance: instance_id
Expand All @@ -77,9 +77,9 @@ def create_database_with_default_leader \
# default_leader = "Spanner database default leader"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/database"

db_admin_client = \
Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
db_admin_client = Google::Cloud::Spanner::Admin::Database.database_admin project_id: project_id

instance_path = \
db_admin_client.instance_path project: project_id, instance: instance_id
Expand Down Expand Up @@ -124,9 +124,9 @@ def update_database_with_default_leader \
# default_leader = "Spanner database default leader"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/database"

db_admin_client = \
Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
db_admin_client = Google::Cloud::Spanner::Admin::Database.database_admin project_id: project_id

db_path = db_admin_client.database_path project: project_id,
instance: instance_id,
Expand Down Expand Up @@ -154,9 +154,9 @@ def database_ddl project_id:, instance_id:, database_id:
# database_id = "Your Spanner database ID"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/database"

db_admin_client = \
Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
db_admin_client = Google::Cloud::Spanner::Admin::Database.database_admin project_id: project_id

db_path = db_admin_client.database_path project: project_id,
instance: instance_id,
Expand Down
4 changes: 2 additions & 2 deletions spanner/json_column_type_samples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def add_json_column project_id:, instance_id:, database_id:
# database_id = "Your Spanner database ID"

require "google/cloud/spanner"
require "google/cloud/spanner/admin/database"

db_admin_client = \
Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client.new
db_admin_client = Google::Cloud::Spanner::Admin::Database.database_admin

database_path = db_admin_client.database_path project: project_id,
instance: instance_id,
Expand Down
Loading