Skip to content

Commit

Permalink
[CI] Allow release tests infra to accept buildkite artifacts (ray-pro…
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-mo authored Oct 27, 2021
1 parent 98961d1 commit 3e038ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions release/.buildkite/build_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,10 @@ def create_test_step(
+ pip_requirements_command \
+ step_conf["commands"]

step_conf["label"] = f"{ray_wheels_str}{test_name} ({ray_branch}) - " \
f"{ray_test_branch}/{ray_test_repo}"
step_conf["label"] = (
f"{test_name} "
f"({'custom_wheels_url' if ray_wheels_str else ray_branch}) - "
f"{ray_test_branch}/{ray_test_repo}")
return step_conf


Expand Down
10 changes: 8 additions & 2 deletions release/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,13 @@ def wheel_exists(ray_version, git_branch, git_commit):

def commit_or_url(commit_or_url: str) -> str:
if commit_or_url.startswith("http"):
# Assume URL
return commit_or_url
# Directly return the S3 url
if "s3-us-west-2.amazonaws" in commit_or_url:
return commit_or_url
# Resolve the redirects for buildkite artifacts
# This is needed because otherwise pip won't recognize the file name.
if "buildkite.com" in commit_or_url and "artifacts" in commit_or_url:
return requests.head(commit_or_url, allow_redirects=True).url

# Else, assume commit
os.environ["RAY_COMMIT"] = commit_or_url
Expand Down Expand Up @@ -2079,6 +2084,7 @@ def run_test(test_config_file: str,
logger.info(f"Using Ray wheels provided from URL/commit: "
f"{ray_wheels}")
url = commit_or_url(str(ray_wheels))
logger.info(f"Resolved url link is: {url}")
# Overwrite with actual URL
os.environ["RAY_WHEELS"] = url
elif not args.check:
Expand Down

0 comments on commit 3e038ae

Please sign in to comment.