Skip to content

Commit

Permalink
Fix bug in utask preprocessing (#3682)
Browse files Browse the repository at this point in the history
Handle cases where no input is returned for the uworker.
  • Loading branch information
jonathanmetzman authored Jan 26, 2024
1 parent 4cd717e commit 0bf83d2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/clusterfuzz/_internal/bot/tasks/task_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ def execute(self, task_argument, job_type, uworker_env):
tasks.add_utask_main(command, download_url, job_type)

def preprocess(self, task_argument, job_type, uworker_env):
download_url, _ = utasks.tworker_preprocess(self.module, task_argument,
job_type, uworker_env)
result = utasks.tworker_preprocess(self.module, task_argument, job_type,
uworker_env)
if not result:
logs.log_error('Nothing returned from preprocess.')
return None

download_url, _ = result
if not download_url:
logs.log_error('No download_url returned from preprocess.')
return None
Expand Down

0 comments on commit 0bf83d2

Please sign in to comment.