diff --git a/src/clusterfuzz/_internal/bot/tasks/utasks/fuzz_task.py b/src/clusterfuzz/_internal/bot/tasks/utasks/fuzz_task.py index 09b009d0e1..8a476fd080 100644 --- a/src/clusterfuzz/_internal/bot/tasks/utasks/fuzz_task.py +++ b/src/clusterfuzz/_internal/bot/tasks/utasks/fuzz_task.py @@ -1324,11 +1324,6 @@ def __init__(self, uworker_input, test_timeout): self.gcs_corpus = None self.fuzz_task_output = uworker_msg_pb2.FuzzTaskOutput() - def _get_output(self, **kwargs): - for k, v in kwargs.items(): - setattr(self.fuzz_task_output, k, v) - return uworker_msg_pb2.Output(fuzz_task_output=self.fuzz_task_output) - @property def fully_qualified_fuzzer_name(self): """Get the fully qualified fuzzer name.""" @@ -1907,16 +1902,20 @@ def run(self): if new_targets_count is not None: self.fuzz_task_output.new_targets_count = new_targets_count - return self._get_output( - fully_qualified_fuzzer_name=self.fully_qualified_fuzzer_name, - crash_revision=str(crash_revision), - job_run_timestamp=time.time(), - new_crash_count=new_crash_count, - known_crash_count=known_crash_count, - testcases_executed=testcases_executed, - job_run_crashes=convert_groups_to_crashes(processed_groups), - fuzzer_revision=self.fuzzer.revision, - ) + + self.fuzz_task_output.fully_qualified_fuzzer_name = ( + self.fully_qualified_fuzzer_name) + self.fuzz_task_output.crash_revision = str(crash_revision) + self.fuzz_task_output.job_run_timestamp = time.time() + self.fuzz_task_output.new_crash_count = new_crash_count + self.fuzz_task_output.known_crash_count = known_crash_count + self.fuzz_task_output.testcases_executed = testcases_executed + self.fuzz_task_output.fuzzer_revision = self.fuzzer.revision + if job_run_crashes: + job_run_crashes = convert_groups_to_crashes(processed_groups) + self.fuzz_task_output.job_run_crashes.extend(job_run_crashes) + + return uworker_msg_pb2.Output(fuzz_task_output=self.fuzz_task_output) def postprocess(self, uworker_output): """Handles postprocessing.""" diff --git a/src/clusterfuzz/_internal/bot/tasks/utasks/minimize_task.py b/src/clusterfuzz/_internal/bot/tasks/utasks/minimize_task.py index 8884116ed0..c67724dc0d 100644 --- a/src/clusterfuzz/_internal/bot/tasks/utasks/minimize_task.py +++ b/src/clusterfuzz/_internal/bot/tasks/utasks/minimize_task.py @@ -1402,7 +1402,7 @@ def _skip_minimization(testcase: data_types.Testcase, def handle_libfuzzer_minimization_unreproducible( output: uworker_msg_pb2.Output): """Handles libfuzzer minimization task's failure to reproduce the issue.""" - testcase = data_handler.get_testcase_by_id(output.uworker_intput.testcase_id) + testcase = data_handler.get_testcase_by_id(output.uworker_input.testcase_id) # Be more lenient with marking testcases as unreproducible when this is a # job override. is_overriden_job = bool(environment.get_value('ORIGINAL_JOB_NAME')) @@ -1414,7 +1414,7 @@ def handle_libfuzzer_minimization_unreproducible( def handle_libfuzzer_minimization_failed(output: uworker_msg_pb2.Output): """Handles libfuzzer minimization task failure.""" - testcase = data_handler.get_testcase_by_id(output.uworker_intput.testcase_id) + testcase = data_handler.get_testcase_by_id(output.uworker_input.testcase_id) _skip_minimization( testcase, 'LibFuzzer minimization failed', diff --git a/src/python/bot/startup/run_bot.py b/src/python/bot/startup/run_bot.py index 7352d2a6cf..bfce21371d 100644 --- a/src/python/bot/startup/run_bot.py +++ b/src/python/bot/startup/run_bot.py @@ -87,6 +87,8 @@ def schedule_utask_mains(): if not utask_mains: return + logs.log(f'Combining {len(utask_mains)} batch tasks.') + batch_tasks = [] with lease_all_tasks(utask_mains): batch_tasks = [