Skip to content

Commit c17059c

Browse files
SNOW-2114104-adapating put fetch get for prober (#2358)
1 parent c1187c1 commit c17059c

File tree

5 files changed

+316
-101
lines changed

5 files changed

+316
-101
lines changed

prober/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
4343
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git ${PYENV_ROOT}
4444

4545
# Build arguments for Python versions and Snowflake connector versions
46-
ARG MATRIX_VERSION='{"3.10.17": ["3.14.0", "3.13.2", "3.13.1"], "3.9.22": ["3.14.0", "3.13.2", "3.13.1"], "3.8.20": ["3.14.0", "3.13.2", "3.13.1"]}'
46+
ARG MATRIX_VERSION='{"3.13.4": ["3.15.0", "3.13.2", "3.14.0", "3.12.3", "3.0.4", "3.12.1", "3.12.4", "3.11.0", "3.12.2", "3.6.0", "3.7.0"], "3.9.22": ["3.15.0", "3.13.2", "3.14.0", "3.12.3", "3.0.4", "3.12.1", "3.12.4", "3.11.0", "3.12.2", "3.6.0", "3.7.0"]}'
4747

4848

4949
# Install Python versions from ARG MATRIX_VERSION

prober/probes/main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import argparse
2+
import base64
23
import logging
34
import sys
45

@@ -37,10 +38,13 @@ def main():
3738
# Parse arguments
3839
args = parser.parse_args()
3940

40-
private_key = (
41+
private_key_str = (
4142
open(args.private_key_file).read().strip().replace("_", "/").replace("-", "+")
4243
)
4344

45+
# Decode the private key from Base64
46+
private_key_bytes = base64.b64decode(private_key_str)
47+
4448
connection_params = {
4549
"host": args.host,
4650
"port": args.port,
@@ -51,7 +55,7 @@ def main():
5155
"database": args.database,
5256
"user": args.user,
5357
"authenticator": args.authenticator,
54-
"private_key": private_key,
58+
"private_key": private_key_bytes,
5559
}
5660

5761
if args.scope not in PROBES_FUNCTIONS:

0 commit comments

Comments
 (0)