Skip to content

Commit df8546c

Browse files
authored
cherrypick #50841 (#50842)
Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
1 parent 6d46ba3 commit df8546c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

release/ray_release/buildkite/step.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,12 @@ def get_step(
141141
env_dict = load_environment(env_to_use)
142142
env_dict.update(env)
143143

144-
# Set the project id for the test
145-
project_id = get_test_project_id(test)
146-
env_dict["ANYSCALE_PROJECT"] = project_id
144+
# Set the project id for the test, based on the follow priority:
145+
# 1. Specified in the test, as "project_id" field.
146+
# 2. Specified in the specific test environment, as RELEASE_DEFAULT_PROJECT env var
147+
# 3. Specified in the global environment, as RELEASE_DEFAULT_PROJECT env var
148+
default_project_id = env_dict.get("RELEASE_DEFAULT_PROJECT")
149+
env_dict["ANYSCALE_PROJECT"] = get_test_project_id(test, default_project_id)
147150

148151
step["env"].update(env_dict)
149152
step["plugins"][0][DOCKER_PLUGIN_KEY]["image"] = "python:3.9"

release/ray_release/config.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
)
3232
DEFAULT_ANYSCALE_PROJECT = DeferredEnvVar(
3333
"RELEASE_DEFAULT_PROJECT",
34-
"prj_rw3kzbqsehh4a6klka7j616fgb",
34+
"prj_6rfevmf12tbsbd6g3al5f6zssh",
3535
)
3636

3737
RELEASE_PACKAGE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
@@ -255,6 +255,7 @@ def get_test_cloud_id(test: Test) -> str:
255255
return cloud_id
256256

257257

258-
def get_test_project_id(test: Test) -> str:
259-
default_project_id = str(DEFAULT_ANYSCALE_PROJECT)
258+
def get_test_project_id(test: Test, default_project_id: Optional[str] = None) -> str:
259+
if default_project_id is None:
260+
default_project_id = str(DEFAULT_ANYSCALE_PROJECT)
260261
return test.get("cluster", {}).get("project_id", default_project_id)

0 commit comments

Comments
 (0)