File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed
Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,6 @@ steps:
291291 - skip-on-premerge
292292 instance_type : medium
293293 commands :
294- - pip install -U boto3==1.28.70 awscli==1.29.70
295294 - $(python ci/env/setup_credentials.py)
296295 - bazel run //ci/ray_ci:test_in_docker -- //python/ray/data/... data
297296 --build-name datalbuild
Original file line number Diff line number Diff line change @@ -157,7 +157,6 @@ steps:
157157 - oss
158158 instance_type : medium
159159 commands :
160- - pip install -U boto3==1.28.70 awscli==1.29.70
161160 - $(python ci/env/setup_credentials.py)
162161 - bazel run //ci/ray_ci:test_in_docker -- //python/ray/train/... ml
163162 --parallelism-per-worker 3
@@ -295,7 +294,6 @@ steps:
295294 - oss
296295 instance_type : medium
297296 commands :
298- - pip install -U boto3==1.28.70 awscli==1.29.70
299297 - $(python ci/env/setup_credentials.py)
300298 - bazel run //ci/ray_ci:test_in_docker -- //... ml --run-flaky-tests
301299 --parallelism-per-worker 3
Original file line number Diff line number Diff line change 88export COMET_API_KEY=efgh
99"""
1010import json
11+ import subprocess
1112import sys
1213
13- import boto3
14-
1514AWS_AIR_SECRETS_ARN = (
1615 "arn:aws:secretsmanager:us-west-2:029272617770:secret:"
1716 "oss-ci/ray-air-test-secrets20221014164754935800000002-UONblX"
1817)
1918
2019
21- def get_ray_air_secrets (client ):
22- raw_string = client .get_secret_value (SecretId = AWS_AIR_SECRETS_ARN )["SecretString" ]
23- return json .loads (raw_string )
20+ def get_ray_air_secrets ():
21+ output = subprocess .check_output (
22+ [
23+ "aws" ,
24+ "secretsmanager" ,
25+ "get-secret-value" ,
26+ "--region" ,
27+ "us-west-2" ,
28+ "--secret-id" ,
29+ AWS_AIR_SECRETS_ARN ,
30+ ]
31+ )
32+
33+ parsed_output = json .loads (output )
34+ return json .loads (parsed_output ["SecretString" ])
2435
2536
2637SERVICES = {
@@ -36,10 +47,8 @@ def get_ray_air_secrets(client):
3647
3748
3849def main ():
39-
4050 try :
41- client = boto3 .client ("secretsmanager" , region_name = "us-west-2" )
42- ray_air_secrets = get_ray_air_secrets (client )
51+ ray_air_secrets = get_ray_air_secrets ()
4352 except Exception as e :
4453 print (f"Could not get Ray AIR secrets: { e } " )
4554 sys .exit (1 )
You can’t perform that action at this time.
0 commit comments