Skip to content

Commit

Permalink
Support postprocessing in OSS-Fuzz (#4388)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman authored Nov 7, 2024
1 parent 1cdcf32 commit a03f921
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/clusterfuzz/_internal/base/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def is_done_collecting_messages():
def get_postprocess_task():
"""Gets a postprocess task if one exists."""
# This should only be run on non-preemptible bots.
if not task_utils.is_remotely_executing_utasks():
if not (task_utils.is_remotely_executing_utasks() or
task_utils.get_opted_in_tasks()):
return None
# Postprocess is platform-agnostic, so we run all such tasks on our
# most generic and plentiful bots only. In other words, we avoid
Expand Down
6 changes: 5 additions & 1 deletion src/clusterfuzz/_internal/base/tasks/task_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@ def is_remotely_executing_utasks(task=None) -> bool:
return is_task_opted_into_uworker_execution(task)


def get_opted_in_tasks():
return local_config.ProjectConfig().get('uworker_tasks', [])


def is_task_opted_into_uworker_execution(task):
# TODO(metzman): Remove this after OSS-Fuzz and Chrome are at parity.
uworker_tasks = local_config.ProjectConfig().get('uworker_tasks', [])
if 'skia' not in environment.get_value('JOB_NAME', ''):
# This is just for testing OSS-Fuzz.
return False
uworker_tasks = get_opted_in_tasks()
return task in uworker_tasks


Expand Down

0 comments on commit a03f921

Please sign in to comment.