rb_snowflake_client 1.6.1 → 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 +6 -0
- data/lib/ruby_snowflake/client.rb +3 -3
- data/lib/ruby_snowflake/version.rb +1 -1
- metadata +3 -2
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,12 @@ 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
|
+
|
|
10
16
|
## [1.6.1] - 2026-08-18
|
|
11
17
|
### Security
|
|
12
18
|
- Bumped `json` to patch a format-string injection CVE (#169)
|
|
@@ -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
|
|
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"
|