rb_snowflake_client 1.6.0 → 1.6.2
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/workflows/arby-review.yml +96 -0
- data/CHANGELOG.md +15 -0
- data/lib/ruby_snowflake/client.rb +3 -3
- data/lib/ruby_snowflake/version.rb +1 -1
- data/rb_snowflake_client.gemspec +16 -1
- metadata +3 -3
- data/Gemfile.lock +0 -87
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14628efb496cd0a61e49675e329f38d075dd5bb201371df522b7a84e31a6beca
|
|
4
|
+
data.tar.gz: b8b3618986b2d8d5a24d660270ab8860ebb985718375183c8ab73af0a89cd124
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '00485ce43306464ac2d541a1349879d0e0130c4ced1dba7c785a0c1cd78319954e3eea734c6f77e4448d825f3ed42538f6ea042b1224a01d4b644d587cfa805b'
|
|
7
|
+
data.tar.gz: 90a65fc0820e5783870540d335a1db672f1a01affb5160cf4d88ba5411217a4e45ad896a16b274061f1d892161863958ad2da1c6ae87a373506c7c59692426f4
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# For a PUBLIC repo: copy this one file into its .github/workflows/ instead of review.yml,
|
|
2
|
+
# review-manual-request.yml and review-dismiss-stale.yml. A public repo can't use actions or reusable
|
|
3
|
+
# workflows from rinsed-org/review-bot-workflows (an internal repo), so it doesn't run Arby itself. It asks
|
|
4
|
+
# rinsed-org/review-bot-public-runner (internal) to, by dispatching that repo's review workflow with nothing
|
|
5
|
+
# but this repo's name and the PR number. The runner reads this repo's settings (limit-approval-to,
|
|
6
|
+
# blocking-severities, ...) from its own config file and runs the reusable workflow in cross-repo mode, which
|
|
7
|
+
# reviews this PR in public repo mode and posts the review here as Arby. Per-repo setup: add this repo to the
|
|
8
|
+
# runner's config, then add this file. See the bot's README, "Public repositories".
|
|
9
|
+
#
|
|
10
|
+
# Nothing PR-controlled reaches the dispatch: only github.repository and the PR number, passed through env.
|
|
11
|
+
# No checkout, no PR code. The token is minted from the Arby Dispatcher app (Actions: write, installed only on
|
|
12
|
+
# the runner repo) and scoped to that one repo, so all it can do is start runs there. The run's own red/green
|
|
13
|
+
# status shows in the runner repo; on this PR the result is Arby's review. Manual "re-request Arby" reviews
|
|
14
|
+
# aren't supported here yet: push a commit to get a new review.
|
|
15
|
+
name: Arby review (public repo)
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
pull_request_target:
|
|
19
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
|
20
|
+
|
|
21
|
+
# Nothing by default; each job asks for exactly what it needs.
|
|
22
|
+
permissions: {}
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
dispatch:
|
|
26
|
+
name: Request Arby review
|
|
27
|
+
# Drafts skip, as in review.yml.
|
|
28
|
+
if: github.event.pull_request.draft == false
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
timeout-minutes: 5
|
|
31
|
+
# Only the app token is used, so the job's own token needs nothing.
|
|
32
|
+
permissions: {}
|
|
33
|
+
steps:
|
|
34
|
+
- name: Mint a dispatch token
|
|
35
|
+
id: token
|
|
36
|
+
uses: actions/create-github-app-token@v3
|
|
37
|
+
with:
|
|
38
|
+
client-id: ${{ secrets.ARBY_DISPATCH_CLIENT_ID }}
|
|
39
|
+
private-key: ${{ secrets.ARBY_DISPATCH_PRIVATE_KEY }}
|
|
40
|
+
owner: rinsed-org
|
|
41
|
+
repositories: review-bot-public-runner
|
|
42
|
+
permission-actions: write
|
|
43
|
+
- name: Dispatch the review
|
|
44
|
+
env:
|
|
45
|
+
GH_TOKEN: ${{ steps.token.outputs.token }}
|
|
46
|
+
REPO: ${{ github.repository }}
|
|
47
|
+
PR: ${{ github.event.pull_request.number }}
|
|
48
|
+
run: |
|
|
49
|
+
# The REST endpoint directly, with an explicit ref: `gh workflow run` would first look up the runner
|
|
50
|
+
# repo's default branch, which needs Contents read, and this token has only Actions: write.
|
|
51
|
+
gh api --method POST repos/rinsed-org/review-bot-public-runner/actions/workflows/review.yml/dispatches \
|
|
52
|
+
-f ref=master -f "inputs[repo]=$REPO" -f "inputs[pr]=$PR"
|
|
53
|
+
|
|
54
|
+
# A COPY of rinsed-org/review-bot-workflows' dismiss-stale/action.yml, inlined because a public repo can't
|
|
55
|
+
# use that internal action. The two must change together. Its own job, so it stays a cheap check with no
|
|
56
|
+
# dependency on Arby, the app or the runner repo: make THIS job ("Dismiss stale Arby approvals") the
|
|
57
|
+
# required status check, as in review-dismiss-stale.yml. It runs on the job's default token and consumes
|
|
58
|
+
# nothing PR-controlled beyond the PR number.
|
|
59
|
+
dismiss:
|
|
60
|
+
# The required check is keyed on this name; keep it exactly as is.
|
|
61
|
+
name: Dismiss stale Arby approvals
|
|
62
|
+
concurrency:
|
|
63
|
+
group: arby-dismiss-stale-${{ github.event.pull_request.number }}
|
|
64
|
+
cancel-in-progress: true
|
|
65
|
+
timeout-minutes: 5
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
permissions:
|
|
68
|
+
pull-requests: write
|
|
69
|
+
steps:
|
|
70
|
+
- name: Dismiss stale review-bot approvals
|
|
71
|
+
shell: bash
|
|
72
|
+
env:
|
|
73
|
+
GH_TOKEN: ${{ github.token }}
|
|
74
|
+
REPO: ${{ github.repository }}
|
|
75
|
+
PR: ${{ github.event.pull_request.number }}
|
|
76
|
+
BOT_LOGIN: rinsed-review-bot
|
|
77
|
+
run: |
|
|
78
|
+
set -euo pipefail
|
|
79
|
+
if [ -z "$PR" ]; then
|
|
80
|
+
echo "::error::No pull request in the event payload — call this from a pull_request_target workflow."
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
83
|
+
# Skip approvals for the PR's current head: the review workflow runs on the same event with no
|
|
84
|
+
# ordering, so a delayed dismiss job must not kill an approval Arby already gave the new commits. The
|
|
85
|
+
# head is fetched at execution time (not from the event payload) so a run delayed past a newer push
|
|
86
|
+
# can't dismiss that newer push's approval either.
|
|
87
|
+
head_sha=$(gh api "repos/$REPO/pulls/$PR" --jq .head.sha)
|
|
88
|
+
gh api "repos/$REPO/pulls/$PR/reviews" --paginate \
|
|
89
|
+
--jq ".[] | select(.user.login == \"$BOT_LOGIN\" and .state == \"APPROVED\"
|
|
90
|
+
and .commit_id != \"$head_sha\") | .id" |
|
|
91
|
+
while read -r review_id; do
|
|
92
|
+
echo "Dismissing stale approval (review $review_id)"
|
|
93
|
+
# The API rejects blank (or whitespace-only) messages, so this is as terse as GitHub allows.
|
|
94
|
+
gh api --method PUT "repos/$REPO/pulls/$PR/reviews/$review_id/dismissals" \
|
|
95
|
+
--field message="Dismissing stale review" --field event="DISMISS"
|
|
96
|
+
done
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## [1.6.2] - 2026-10-19
|
|
11
|
+
### Fixed
|
|
12
|
+
- Compatibility with `json` 3.0, where `JSON.parse` options are keyword-only: every query raised
|
|
13
|
+
`ArgumentError: wrong number of arguments (given 2, expected 1)` because the parse options were passed
|
|
14
|
+
as a positional Hash. They're now passed as keywords, which works on `json` 2.x and 3.x. (#191)
|
|
15
|
+
|
|
16
|
+
## [1.6.1] - 2026-08-18
|
|
17
|
+
### Security
|
|
18
|
+
- Bumped `json` to patch a format-string injection CVE (#169)
|
|
19
|
+
- Bumped `concurrent-ruby` and `jwt` to patch CVEs (#182)
|
|
20
|
+
### Changed
|
|
21
|
+
- `Gemfile.lock` is no longer shipped inside the published gem. It has no function in a
|
|
22
|
+
consumer's dependency resolution, but image scanners read it as a manifest and reported our
|
|
23
|
+
development pins as CRITICAL findings against every consumer (#186)
|
|
24
|
+
|
|
10
25
|
## [1.6.0] - 2026-04-13
|
|
11
26
|
### Added
|
|
12
27
|
- Support for passing a passphrase when using an encrypted private key for JWT authentication (#166)
|
|
@@ -300,12 +300,12 @@ module RubySnowflake
|
|
|
300
300
|
end
|
|
301
301
|
|
|
302
302
|
def retrieve_result_set(query_start_time, query, response, streaming, query_timeout)
|
|
303
|
-
json_body = JSON.parse(response.body, JSON_PARSE_OPTIONS)
|
|
303
|
+
json_body = JSON.parse(response.body, **JSON_PARSE_OPTIONS)
|
|
304
304
|
statement_handle = json_body["statementHandle"]
|
|
305
305
|
|
|
306
306
|
if response.code == POLLING_RESPONSE_CODE
|
|
307
307
|
result_response = poll_for_completion_or_timeout(query_start_time, query, statement_handle, query_timeout)
|
|
308
|
-
json_body = JSON.parse(result_response.body, JSON_PARSE_OPTIONS)
|
|
308
|
+
json_body = JSON.parse(result_response.body, **JSON_PARSE_OPTIONS)
|
|
309
309
|
end
|
|
310
310
|
|
|
311
311
|
num_threads = number_of_threads_to_use(json_body["resultSetMetaData"]["partitionInfo"].size)
|
|
@@ -331,7 +331,7 @@ module RubySnowflake
|
|
|
331
331
|
end
|
|
332
332
|
|
|
333
333
|
partition_json = {}
|
|
334
|
-
bm = Benchmark.measure { partition_json = JSON.parse(partition_response.body, JSON_PARSE_OPTIONS) }
|
|
334
|
+
bm = Benchmark.measure { partition_json = JSON.parse(partition_response.body, **JSON_PARSE_OPTIONS) }
|
|
335
335
|
logger.debug { "JSON parsing took: #{bm.real}" }
|
|
336
336
|
partition_data = partition_json["data"]
|
|
337
337
|
|
data/rb_snowflake_client.gemspec
CHANGED
|
@@ -14,8 +14,23 @@ Gem::Specification.new do |s|
|
|
|
14
14
|
s.homepage = "https://github.com/rinsed-org/rb-snowflake-client"
|
|
15
15
|
s.license = "MIT"
|
|
16
16
|
|
|
17
|
+
# Gemfile.lock is excluded deliberately, and it is a security fix rather than tidiness.
|
|
18
|
+
#
|
|
19
|
+
# A lockfile has no function inside a published gem -- Bundler resolves a consumer's tree from the
|
|
20
|
+
# dependency constraints below, never from a lockfile shipped in a dependency -- but container image
|
|
21
|
+
# scanners read any Gemfile.lock they find on disk as a manifest of what is installed. So our
|
|
22
|
+
# DEVELOPMENT lock became a vulnerability report against every consumer: an image that installs this
|
|
23
|
+
# gem gets .../gems/rb_snowflake_client-1.6.0/Gemfile.lock scanned, and the pinned
|
|
24
|
+
# concurrent-ruby 1.3.6, jwt 3.1.2 and json 2.15.1 are reported as CRITICAL findings on the consumer.
|
|
25
|
+
#
|
|
26
|
+
# That is all three CRITICAL findings on the DataExtract Lambda image, and they are unfixable there:
|
|
27
|
+
# the versions are ours, in our published artifact, and no bump on the consumer's side can move them.
|
|
28
|
+
# The runtime constraints (concurrent-ruby >= 1.2, json >= 2.1.0, jwt >= 2.7) are open-ended, so
|
|
29
|
+
# consumers already resolve their own versions and lose nothing by not receiving this file.
|
|
17
30
|
s.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
18
|
-
`git ls-files -z`.split("\x0").reject
|
|
31
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
32
|
+
f.match(%r{\A(?:test|spec|features|vendor)/}) || f == "Gemfile.lock"
|
|
33
|
+
end
|
|
19
34
|
end
|
|
20
35
|
|
|
21
36
|
s.require_paths = ["lib"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rb_snowflake_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rinsed
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bigdecimal
|
|
@@ -120,6 +120,7 @@ extensions: []
|
|
|
120
120
|
extra_rdoc_files: []
|
|
121
121
|
files:
|
|
122
122
|
- ".github/dependabot.yml"
|
|
123
|
+
- ".github/workflows/arby-review.yml"
|
|
123
124
|
- ".github/workflows/ci.yml"
|
|
124
125
|
- ".github/workflows/release-gh-packages.yml"
|
|
125
126
|
- ".github/workflows/release-rubygems.yml"
|
|
@@ -127,7 +128,6 @@ files:
|
|
|
127
128
|
- CHANGELOG.md
|
|
128
129
|
- CODE_OF_CONDUCT.md
|
|
129
130
|
- Gemfile
|
|
130
|
-
- Gemfile.lock
|
|
131
131
|
- LICENSE.txt
|
|
132
132
|
- README.md
|
|
133
133
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
rb_snowflake_client (1.6.0)
|
|
5
|
-
bigdecimal (>= 3.0)
|
|
6
|
-
concurrent-ruby (>= 1.2)
|
|
7
|
-
connection_pool (>= 2.4)
|
|
8
|
-
dotenv (>= 2.8)
|
|
9
|
-
json (>= 2.1.0)
|
|
10
|
-
jwt (>= 2.7)
|
|
11
|
-
retryable (>= 3.0)
|
|
12
|
-
|
|
13
|
-
GEM
|
|
14
|
-
remote: https://rubygems.org/
|
|
15
|
-
specs:
|
|
16
|
-
activesupport (8.0.5)
|
|
17
|
-
base64
|
|
18
|
-
benchmark (>= 0.3)
|
|
19
|
-
bigdecimal
|
|
20
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
21
|
-
connection_pool (>= 2.2.5)
|
|
22
|
-
drb
|
|
23
|
-
i18n (>= 1.6, < 2)
|
|
24
|
-
logger (>= 1.4.2)
|
|
25
|
-
minitest (>= 5.1)
|
|
26
|
-
securerandom (>= 0.3)
|
|
27
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
28
|
-
uri (>= 0.13.1)
|
|
29
|
-
base64 (0.3.0)
|
|
30
|
-
benchmark (0.5.0)
|
|
31
|
-
bigdecimal (4.1.1)
|
|
32
|
-
coderay (1.1.3)
|
|
33
|
-
concurrent-ruby (1.3.6)
|
|
34
|
-
connection_pool (3.0.2)
|
|
35
|
-
diff-lcs (1.6.2)
|
|
36
|
-
dotenv (3.1.8)
|
|
37
|
-
drb (2.2.3)
|
|
38
|
-
i18n (1.14.8)
|
|
39
|
-
concurrent-ruby (~> 1.0)
|
|
40
|
-
json (2.15.1)
|
|
41
|
-
jwt (3.1.2)
|
|
42
|
-
base64
|
|
43
|
-
logger (1.7.0)
|
|
44
|
-
method_source (1.1.0)
|
|
45
|
-
minitest (6.0.3)
|
|
46
|
-
drb (~> 2.0)
|
|
47
|
-
prism (~> 1.5)
|
|
48
|
-
parallel (1.27.0)
|
|
49
|
-
prism (1.9.0)
|
|
50
|
-
pry (0.15.2)
|
|
51
|
-
coderay (~> 1.1)
|
|
52
|
-
method_source (~> 1.0)
|
|
53
|
-
rake (13.3.0)
|
|
54
|
-
retryable (3.0.5)
|
|
55
|
-
rspec (3.13.1)
|
|
56
|
-
rspec-core (~> 3.13.0)
|
|
57
|
-
rspec-expectations (~> 3.13.0)
|
|
58
|
-
rspec-mocks (~> 3.13.0)
|
|
59
|
-
rspec-core (3.13.5)
|
|
60
|
-
rspec-support (~> 3.13.0)
|
|
61
|
-
rspec-expectations (3.13.5)
|
|
62
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
63
|
-
rspec-support (~> 3.13.0)
|
|
64
|
-
rspec-mocks (3.13.5)
|
|
65
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
66
|
-
rspec-support (~> 3.13.0)
|
|
67
|
-
rspec-support (3.13.6)
|
|
68
|
-
securerandom (0.4.1)
|
|
69
|
-
tzinfo (2.0.6)
|
|
70
|
-
concurrent-ruby (~> 1.0)
|
|
71
|
-
uri (1.1.1)
|
|
72
|
-
|
|
73
|
-
PLATFORMS
|
|
74
|
-
arm64-darwin-22
|
|
75
|
-
ruby
|
|
76
|
-
|
|
77
|
-
DEPENDENCIES
|
|
78
|
-
activesupport (~> 8.0.4, >= 8.0.4.1)
|
|
79
|
-
bundler
|
|
80
|
-
parallel
|
|
81
|
-
pry
|
|
82
|
-
rake
|
|
83
|
-
rb_snowflake_client!
|
|
84
|
-
rspec
|
|
85
|
-
|
|
86
|
-
BUNDLED WITH
|
|
87
|
-
4.0.3
|