activerecord-spanner-adapter 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/sync-repo-settings.yaml +2 -2
- data/.github/workflows/acceptance-tests-on-emulator.yaml +4 -2
- data/.github/workflows/ci.yaml +6 -6
- data/.github/workflows/nightly-acceptance-tests-on-emulator.yaml +6 -1
- data/.github/workflows/nightly-unit-tests.yaml +6 -1
- data/.kokoro/release.sh +1 -3
- data/.release-please-manifest.json +1 -1
- data/.toys/release.rb +8 -2
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/lib/activerecord_spanner_adapter/connection.rb +1 -1
- data/lib/activerecord_spanner_adapter/transaction.rb +4 -4
- data/lib/activerecord_spanner_adapter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f8199e1af804baf47d382e53404f88329478d35958f71fcaec34f73921de987
|
4
|
+
data.tar.gz: b2bc3919e5cc4d675d539806c27e0dda7b16d676ca349aa95a11370c4ec145b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22ed1bd5840aa615681a7af2a4f87ceb31a5ec5a772d3260740ed520f99269b1ecdc0022aa1bcbf703afe01d99a04bb6181d546c5d6690bef20c17142281eb47
|
7
|
+
data.tar.gz: b9d65faf249175397de04b003a612ed10f89302ba545ffe09208b43414e9e8291feb9240aae3850f5f97d6f6b0bfd9c6134176316ebf6cc520d487e8d9700447
|
data/.github/CODEOWNERS
CHANGED
@@ -4,4 +4,4 @@
|
|
4
4
|
# For syntax help see:
|
5
5
|
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
|
6
6
|
|
7
|
-
* @googleapis/
|
7
|
+
* @googleapis/ruby-team @skuruppu @hengfengli @olavloite @xiangshen-dk
|
@@ -19,13 +19,15 @@ jobs:
|
|
19
19
|
max-parallel: 4
|
20
20
|
matrix:
|
21
21
|
ruby: [2.6, 2.7, 3.0]
|
22
|
-
ar: [6.0.
|
22
|
+
ar: [6.0.5.1, 6.1.6.1, 7.0.2.4, 7.0.3.1]
|
23
23
|
# Exclude combinations that are not supported.
|
24
24
|
exclude:
|
25
25
|
- ruby: 3.0
|
26
|
-
ar: 6.0.
|
26
|
+
ar: 6.0.5.1
|
27
27
|
- ruby: 2.6
|
28
28
|
ar: 7.0.2.4
|
29
|
+
- ruby: 2.6
|
30
|
+
ar: 7.0.3.1
|
29
31
|
env:
|
30
32
|
AR_VERSION: ${{ matrix.ar }}
|
31
33
|
steps:
|
data/.github/workflows/ci.yaml
CHANGED
@@ -10,14 +10,14 @@ jobs:
|
|
10
10
|
strategy:
|
11
11
|
max-parallel: 4
|
12
12
|
matrix:
|
13
|
-
ruby: [2.6, 2.7, 3.0]
|
14
|
-
ar: [6.0.4, 6.1.4, 7.0.2.4]
|
13
|
+
ruby: ["2.6", "2.7", "3.0"]
|
14
|
+
ar: ["6.0.4", "6.1.4", "7.0.2.4"]
|
15
15
|
# Exclude combinations that are not supported.
|
16
16
|
exclude:
|
17
|
-
- ruby: 3.0
|
18
|
-
ar: 6.0.4
|
19
|
-
- ruby: 2.6
|
20
|
-
ar: 7.0.2.4
|
17
|
+
- ruby: "3.0"
|
18
|
+
ar: "6.0.4"
|
19
|
+
- ruby: "2.6"
|
20
|
+
ar: "7.0.2.4"
|
21
21
|
env:
|
22
22
|
AR_VERSION: ${{ matrix.ar }}
|
23
23
|
steps:
|
@@ -2,6 +2,7 @@ on:
|
|
2
2
|
schedule:
|
3
3
|
# 06:00 UTC
|
4
4
|
- cron: '0 6 * * *'
|
5
|
+
workflow_dispatch:
|
5
6
|
name: nightly acceptance tests on emulator
|
6
7
|
jobs:
|
7
8
|
test:
|
@@ -19,7 +20,7 @@ jobs:
|
|
19
20
|
matrix:
|
20
21
|
# Run acceptance tests all supported combinations of Ruby and ActiveRecord.
|
21
22
|
ruby: [2.5, 2.6, 2.7, 3.0]
|
22
|
-
ar: [6.0.0, 6.0.1, 6.0.2.2, 6.0.3.7, 6.0.4, 6.1.
|
23
|
+
ar: [6.0.0, 6.0.1, 6.0.2.2, 6.0.3.7, 6.0.4, 6.1.3.2, 6.1.4.7, 6.1.5.1, 6.1.6.1, 7.0.2.4, 7.0.3.1]
|
23
24
|
# Exclude combinations that are not supported.
|
24
25
|
exclude:
|
25
26
|
- ruby: 3.0
|
@@ -36,6 +37,10 @@ jobs:
|
|
36
37
|
ar: 7.0.2.4
|
37
38
|
- ruby: 2.6
|
38
39
|
ar: 7.0.2.4
|
40
|
+
- ruby: 2.5
|
41
|
+
ar: 7.0.3.1
|
42
|
+
- ruby: 2.6
|
43
|
+
ar: 7.0.3.1
|
39
44
|
env:
|
40
45
|
AR_VERSION: ${{ matrix.ar }}
|
41
46
|
steps:
|
@@ -2,6 +2,7 @@ on:
|
|
2
2
|
schedule:
|
3
3
|
# 05:30 UTC
|
4
4
|
- cron: '30 5 * * *'
|
5
|
+
workflow_dispatch:
|
5
6
|
name: nightly-unit-tests
|
6
7
|
jobs:
|
7
8
|
test:
|
@@ -11,7 +12,7 @@ jobs:
|
|
11
12
|
matrix:
|
12
13
|
# Run unit tests all supported combinations of Ruby and ActiveRecord.
|
13
14
|
ruby: [2.5, 2.6, 2.7, 3.0]
|
14
|
-
ar: [6.0.0, 6.0.1, 6.0.2.2, 6.0.3.7, 6.0.4, 6.1.
|
15
|
+
ar: [6.0.0, 6.0.1, 6.0.2.2, 6.0.3.7, 6.0.4, 6.1.3.2, 6.1.4.7, 6.1.5.1, 6.1.6.1, 7.0.2.4, 7.0.3.1]
|
15
16
|
# Exclude combinations that are not supported.
|
16
17
|
exclude:
|
17
18
|
- ruby: 3.0
|
@@ -28,6 +29,10 @@ jobs:
|
|
28
29
|
ar: 7.0.2.4
|
29
30
|
- ruby: 2.6
|
30
31
|
ar: 7.0.2.4
|
32
|
+
- ruby: 2.5
|
33
|
+
ar: 7.0.3.1
|
34
|
+
- ruby: 2.6
|
35
|
+
ar: 7.0.3.1
|
31
36
|
env:
|
32
37
|
AR_VERSION: ${{ matrix.ar }}
|
33
38
|
steps:
|
data/.kokoro/release.sh
CHANGED
@@ -7,9 +7,7 @@ set -eo pipefail
|
|
7
7
|
export GEM_HOME=$HOME/.gem
|
8
8
|
export PATH=$GEM_HOME/bin:$PATH
|
9
9
|
|
10
|
-
python3 -m pip install git+https://github.com/googleapis/releasetool
|
11
|
-
python3 -m pip install gcp-docuploader
|
12
10
|
gem install --no-document toys
|
13
|
-
|
11
|
+
toys release install-python-tools -v
|
14
12
|
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
|
15
13
|
toys release perform -v --enable-docs < /dev/null
|
data/.toys/release.rb
CHANGED
@@ -14,5 +14,11 @@
|
|
14
14
|
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
if ENV["RUBY_COMMON_TOOLS"]
|
18
|
+
common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"]
|
19
|
+
load File.join(common_tools_dir, "toys", "release")
|
20
|
+
else
|
21
|
+
load_git remote: "https://github.com/googleapis/ruby-common-tools.git",
|
22
|
+
path: "toys/release",
|
23
|
+
update: true
|
24
|
+
end
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -3,7 +3,7 @@ source "https://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in activerecord-spanner.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem "activerecord", ENV.fetch("AR_VERSION", "~> 6.1.
|
6
|
+
gem "activerecord", ENV.fetch("AR_VERSION", "~> 6.1.6.1")
|
7
7
|
gem "minitest", "~> 5.15.0"
|
8
8
|
gem "pry", "~> 0.13.0"
|
9
9
|
gem "pry-byebug", "~> 3.9.0"
|
@@ -251,7 +251,7 @@ module ActiveRecordSpannerAdapter
|
|
251
251
|
# transaction fails, as that also means that no transaction id was returned.
|
252
252
|
def create_transaction_after_failed_first_statement original_error
|
253
253
|
transaction = current_transaction.force_begin_read_write
|
254
|
-
Google::Spanner::V1::TransactionSelector.new id: transaction.transaction_id
|
254
|
+
Google::Cloud::Spanner::V1::TransactionSelector.new id: transaction.transaction_id
|
255
255
|
rescue Google::Cloud::Error
|
256
256
|
# Raise the original error if the BeginTransaction RPC also fails.
|
257
257
|
raise original_error
|
@@ -55,9 +55,9 @@ module ActiveRecordSpannerAdapter
|
|
55
55
|
when :pdml
|
56
56
|
@grpc_transaction = @connection.session.create_pdml
|
57
57
|
else
|
58
|
-
@begin_transaction_selector = Google::Spanner::V1::TransactionSelector.new \
|
59
|
-
begin: Google::Spanner::V1::TransactionOptions.new(
|
60
|
-
read_write: Google::Spanner::V1::TransactionOptions::ReadWrite.new
|
58
|
+
@begin_transaction_selector = Google::Cloud::Spanner::V1::TransactionSelector.new \
|
59
|
+
begin: Google::Cloud::Spanner::V1::TransactionOptions.new(
|
60
|
+
read_write: Google::Cloud::Spanner::V1::TransactionOptions::ReadWrite.new
|
61
61
|
)
|
62
62
|
|
63
63
|
end
|
@@ -143,7 +143,7 @@ module ActiveRecordSpannerAdapter
|
|
143
143
|
|
144
144
|
# Use the transaction that has been started by a BeginTransaction RPC or returned by a
|
145
145
|
# statement, if present.
|
146
|
-
return Google::Spanner::V1::TransactionSelector.new id: @grpc_transaction.transaction_id \
|
146
|
+
return Google::Cloud::Spanner::V1::TransactionSelector.new id: @grpc_transaction.transaction_id \
|
147
147
|
if @grpc_transaction
|
148
148
|
|
149
149
|
# Return a transaction selector that will instruct the statement to also start a transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-spanner-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-spanner
|