@@ -280,10 +280,7 @@ def main(pr_number: Optional[int], sha_override: Optional[str] = None, force=Fal
280
280
for lang_test_failure in lang_test_failures :
281
281
job_failure_urls .add (lang_test_failure .target_url )
282
282
283
- if job_failure_urls :
284
- assert len (job_failure_urls ) == 1 , f"Multiple job failure URLs: { job_failure_urls } "
285
- job_failure_url = job_failure_urls .pop ()
286
-
283
+ for job_failure_url in job_failure_urls :
287
284
# fixup URL. On the status, the target URL is the run, and it's really hard to
288
285
# change this to link to the full `/runs/<run_id>/jobs/<numeric_job_id>` URL, since
289
286
# the `<numeric_job_id>` is not available in a context: https://github.com/community/community/discussions/40291
@@ -301,6 +298,11 @@ def main(pr_number: Optional[int], sha_override: Optional[str] = None, force=Fal
301
298
302
299
for job in jobs ["jobs" ]:
303
300
api_name : str = job ["name" ]
301
+
302
+ if api_name .lower ().startswith (expected_workflow_name .lower ()):
303
+ lang_test_failure .job_id = job ["id" ]
304
+ break
305
+
304
306
if " / " not in api_name :
305
307
continue
306
308
@@ -310,9 +312,11 @@ def main(pr_number: Optional[int], sha_override: Optional[str] = None, force=Fal
310
312
if workflow_name == expected_workflow_name and job_name .lower ().startswith (lang_test_failure .context .lower ()):
311
313
lang_test_failure .job_id = job ["id" ]
312
314
break
313
- else :
314
- LOGGER .error (f"Could not find job for { lang_test_failure .context !r} " )
315
- sys .exit (1 )
315
+
316
+ for lang_test_failure in lang_test_failures :
317
+ if lang_test_failure .job_id is None :
318
+ LOGGER .error (f"Could not find job for { lang_test_failure .context !r} " )
319
+ sys .exit (1 )
316
320
317
321
# Ruby/Swift/C#/Go use github actions, and not internal CI. These are not reported
318
322
# from the /statuses API, but from the /check-suites API
0 commit comments