Skip to content

Commit 08fe205

Browse files
committed
pw_air_poller: post fail checks if the submission failed
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d806c57 commit 08fe205

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

pw_air_poller.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,30 @@ def post_patchwork_checks(self, series_id: int, review_id: str,
342342
log(f"Error posting checks: {e}")
343343
return False
344344

345+
def post_patchwork_error_checks(self, series_id: int, review_id: str):
346+
"""Post error check results to Patchwork when review fails
347+
348+
Args:
349+
series_id: Patchwork series ID
350+
review_id: AIR review ID
351+
"""
352+
check_url = f"{self.air_server}/ai-review.html?id={review_id}"
353+
354+
try:
355+
series_data = self.patchwork.get('series', series_id)
356+
patches = series_data.get('patches', [])
357+
358+
for patch in patches:
359+
patch_id = patch['id']
360+
self.patchwork.post_check(patch=patch_id, name=self.check_name,
361+
state='warning', url=check_url,
362+
desc='AI review failed or timed out')
363+
364+
log(f"Posted error checks for {len(patches)} patches")
365+
366+
except Exception as e:
367+
log(f"Error posting error checks: {e}")
368+
345369
def process_series(self, pw_series: Dict) -> bool:
346370
"""Process a single series
347371
@@ -382,6 +406,7 @@ def process_series(self, pw_series: Dict) -> bool:
382406
review_data = self.wait_for_review(review_id)
383407
if not review_data:
384408
log("Review failed or timed out")
409+
self.post_patchwork_error_checks(series_id, review_id)
385410
log_end_sec()
386411
return True # Still mark as processed
387412

0 commit comments

Comments
 (0)