@@ -31,9 +31,9 @@ class BundleAnalysisProcessorTask(
3131 def run_impl (
3232 self ,
3333 db_session ,
34- # Celery `chain` injects this argument - it's the returned result
35- # from the prior task in the chain
36- previous_result : dict [str , Any ],
34+ # Celery `chain` injects this argument - it's the list of processing results
35+ # from prior tasks in the chain (accumulated as each task executes)
36+ previous_result : list [ dict [str , Any ] ],
3737 * args ,
3838 repoid : int ,
3939 commitid : str ,
@@ -82,7 +82,7 @@ def process_impl_within_lock(
8282 commitid : str ,
8383 commit_yaml : UserYaml ,
8484 params : UploadArguments ,
85- previous_result : dict [str , Any ],
85+ previous_result : list [ dict [str , Any ] ],
8686 ):
8787 log .info (
8888 "Running bundle analysis processor" ,
@@ -100,9 +100,11 @@ def process_impl_within_lock(
100100
101101 report_service = BundleAnalysisReportService (commit_yaml )
102102
103- # these are the task results from prior processor tasks in the chain
103+ # previous_result is the list of processing results from prior processor tasks
104104 # (they get accumulated as we execute each task in succession)
105- processing_results = previous_result .get ("results" , [])
105+ processing_results = (
106+ previous_result if isinstance (previous_result , list ) else []
107+ )
106108
107109 # these are populated in the upload task
108110 # unless when this task is called on a non-BA upload then we have to create an empty upload
@@ -141,7 +143,7 @@ def process_impl_within_lock(
141143 "commit" : commit .commitid ,
142144 },
143145 )
144- return { "results" : processing_results }
146+ return processing_results
145147 else :
146148 # If the commit report does not exist, we will create a new one
147149 commit_report = report_service .initialize_and_save_report (commit )
@@ -240,7 +242,7 @@ def process_impl_within_lock(
240242 },
241243 )
242244
243- return { "results" : processing_results }
245+ return processing_results
244246
245247
246248RegisteredBundleAnalysisProcessorTask = celery_app .register_task (
0 commit comments