Skip to content

Commit 0d0466b

Browse files
aslonniekamil-kaczmarek
authored andcommitted
[ci] fix postmerge tests that require credentials (#57915)
use awscli directly; stop installing extra dependencies Signed-off-by: Lonnie Liu <[email protected]> Signed-off-by: Kamil Kaczmarek <[email protected]>
1 parent e61b8d8 commit 0d0466b

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

.buildkite/data.rayci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

.buildkite/ml.rayci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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

ci/env/setup_credentials.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,30 @@
88
export COMET_API_KEY=efgh
99
"""
1010
import json
11+
import subprocess
1112
import sys
1213

13-
import boto3
14-
1514
AWS_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

2637
SERVICES = {
@@ -36,10 +47,8 @@ def get_ray_air_secrets(client):
3647

3748

3849
def 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)

0 commit comments

Comments
 (0)