Skip to content

Commit

Permalink
Add more logs around PR tracking
Browse files Browse the repository at this point in the history
Summary:
It looks like KPD gets confused when patchwork
changes the name of the series. The name of the series
can change when not all emails in the set are received
by patchwork at the same time.

It looks like `_guess_pr` contains logic to detect PR
title changes, but for some reason it isn't working.

Add more logs to troubleshoot this.

Reviewed By: chantra

Differential Revision: D57278464

fbshipit-source-id: 8fa926f5084dec159ded1602735698469279869b
  • Loading branch information
Daniel Xu authored and facebook-github-bot committed May 13, 2024
1 parent 4d78c8b commit e890777
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel_patches_daemon/branch_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ async def _comment_series_pr(
if pr and pr.state == "closed":
if can_create:
try:
logger.info(f"Trying to re-open {pr}")
pr.edit(state="open")
self.add_pr(pr)
self.prs[pr.title] = pr
Expand Down Expand Up @@ -892,6 +893,7 @@ async def checkout_and_patch(
def add_pr(self, pr: PullRequest) -> None:
self.all_prs.setdefault(pr.head.ref, {}).setdefault(pr.base.ref, [])
self.all_prs[pr.head.ref][pr.base.ref].append(pr)
logger.info(f"Found/tracking PR {pr.title=}, {pr.head.ref=}, {pr.base.ref=}")

def get_pulls(self) -> None:
self.prs = {}
Expand Down

0 comments on commit e890777

Please sign in to comment.