File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
buildkite/bazel-central-registry Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -92,18 +92,17 @@ def select_modules_from_env_vars():
92
92
93
93
def get_target_modules ():
94
94
"""
95
- If the `MODULE_SELECTIONS` and `SMOKE_TEST_PERCENTAGE(S)` are specified, calculate the target modules from those env vars.
96
- Otherwise, calculate target modules based on changed files from the main branch.
95
+ Returns a list of selected module versions.
97
96
"""
98
- if "MODULE_SELECTIONS" not in os .environ :
99
- raise ValueError ("Please set MODULE_SELECTIONS env var to select modules for testing!" )
97
+ if "MODULE_SELECTIONS" not in os .environ and "SELECT_TOP_BCR_MODULES" not in os . environ :
98
+ raise ValueError ("Please set MODULE_SELECTIONS or SELECT_TOP_BCR_MODULES env var to select modules for testing!" )
100
99
101
100
modules = select_modules_from_env_vars ()
102
101
if modules :
103
102
bazelci .print_expanded_group ("The following modules are selected:\n \n %s" % "\n " .join ([f"{ name } @{ version } " for name , version in modules ]))
104
103
return sorted (list (set (modules )))
105
104
else :
106
- raise ValueError ("MODULE_SELECTIONS env var didn't select any modules !" )
105
+ raise ValueError ("No modules were selected, please set MODULE_SELECTIONS or SELECT_TOP_BCR_MODULES correctly !" )
107
106
108
107
109
108
def create_step_for_report_flags_results ():
You can’t perform that action at this time.
0 commit comments