File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -141,9 +141,12 @@ def get_step(
141
141
env_dict = load_environment (env_to_use )
142
142
env_dict .update (env )
143
143
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 )
147
150
148
151
step ["env" ].update (env_dict )
149
152
step ["plugins" ][0 ][DOCKER_PLUGIN_KEY ]["image" ] = "python:3.9"
Original file line number Diff line number Diff line change 31
31
)
32
32
DEFAULT_ANYSCALE_PROJECT = DeferredEnvVar (
33
33
"RELEASE_DEFAULT_PROJECT" ,
34
- "prj_rw3kzbqsehh4a6klka7j616fgb " ,
34
+ "prj_6rfevmf12tbsbd6g3al5f6zssh " ,
35
35
)
36
36
37
37
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:
255
255
return cloud_id
256
256
257
257
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 )
260
261
return test .get ("cluster" , {}).get ("project_id" , default_project_id )
You can’t perform that action at this time.
0 commit comments