Skip to content

Commit

Permalink
Correctly fetch batch regions in fuzz task (#4569)
Browse files Browse the repository at this point in the history
#4568 resolved the merge conflict on get_batch_regions incorrectly, this
PR fixes that.

Testing: ran schedule-fuzz locally to completion
  • Loading branch information
vitorguidi authored Dec 28, 2024
1 parent 126d1c5 commit 8d7b9ab
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/clusterfuzz/_internal/cron/schedule_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,15 @@ def get_fuzz_tasks(available_cpus: int) -> [tasks.Task]:


def get_batch_regions(batch_config):
mapping = batch_config.get('mapping')
return list(set(config['gce_region'] for config in mapping.values()))
fuzz_subconf_names = {
subconf['name'] for subconf in batch_config.get(
'mapping.LINUX-PREEMPTIBLE-UNPRIVILEGED.subconfigs')
}
subconfs = batch_config.get('subconfigs')
return list(
set(subconfs[subconf]['region']
for subconf in subconfs
if subconf in fuzz_subconf_names))


def schedule_fuzz_tasks() -> bool:
Expand Down

0 comments on commit 8d7b9ab

Please sign in to comment.