File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change 3131)
3232DEFAULT_ANYSCALE_PROJECT = DeferredEnvVar (
3333 "RELEASE_DEFAULT_PROJECT" ,
34- "prj_rw3kzbqsehh4a6klka7j616fgb " ,
34+ "prj_6rfevmf12tbsbd6g3al5f6zssh " ,
3535)
3636
3737RELEASE_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 )
You can’t perform that action at this time.
0 commit comments