From aa35045b6f701efa148489e30d0a36728de52000 Mon Sep 17 00:00:00 2001 From: Kai Fricke Date: Tue, 4 Jan 2022 11:21:47 +0000 Subject: [PATCH] [ci/release] Update to recent anyscale API changes (#21149) Recent changes in the anyscale API rendered the current e2e script incompatible. This PR resolves these subtle API changes. --- release/e2e.py | 15 ++++++--------- release/requirements.txt | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/release/e2e.py b/release/e2e.py index 4366fbaa3a7c..bad4630bad4e 100644 --- a/release/e2e.py +++ b/release/e2e.py @@ -212,7 +212,7 @@ import anyscale import anyscale.conf -from anyscale.api import instantiate_api_client +from anyscale.authenticate import get_auth_api_client from anyscale.controllers.session_controller import SessionController from anyscale.sdk.anyscale_client.sdk import AnyscaleSDK @@ -243,7 +243,7 @@ def getenv_default(key: str, default: Optional[str] = None): "ANYSCALE_USER": getenv_default("ANYSCALE_USER", "release-automation@anyscale.com"), "ANYSCALE_HOST": getenv_default("ANYSCALE_HOST", - "https://beta.anyscale.com"), + "https://console.anyscale.com"), "ANYSCALE_CLI_TOKEN": getenv_default("ANYSCALE_CLI_TOKEN"), "ANYSCALE_CLOUD_ID": getenv_default( "ANYSCALE_CLOUD_ID", @@ -1307,13 +1307,10 @@ def run_test_config( # So we use the session controller instead. sdk = AnyscaleSDK(auth_token=GLOBAL_CONFIG["ANYSCALE_CLI_TOKEN"]) - session_controller = SessionController( - api_client=instantiate_api_client( - cli_token=GLOBAL_CONFIG["ANYSCALE_CLI_TOKEN"], - host=GLOBAL_CONFIG["ANYSCALE_HOST"], - ), - anyscale_api_client=sdk.api_client, - ) + get_auth_api_client( + cli_token=GLOBAL_CONFIG["ANYSCALE_CLI_TOKEN"], + host=GLOBAL_CONFIG["ANYSCALE_HOST"]) + session_controller = SessionController() cloud_id = test_config["cluster"].get("cloud_id", None) cloud_name = test_config["cluster"].get("cloud_name", None) diff --git a/release/requirements.txt b/release/requirements.txt index f45cf193fef9..24994dd4dfe0 100644 --- a/release/requirements.txt +++ b/release/requirements.txt @@ -1,6 +1,6 @@ ray click -anyscale==0.5.0 +anyscale>0.5.0 slackclient boto3 PyGithub