From patchwork Sat Apr 4 21:28:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2130 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338315; bh=qed2PkWEvCgNTZ9DsYhoPtQ0N+ZKXTuw3Hc0APcQOfE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=KQye4mGFxm4hB/Ff+ngyNEVKU0bSIM3uOL2hkWEoK/Hv67zP9/1K63K4CA6dq9kvW YNhKKZcOwXgUIFpuaBrwnM+uSpSob7FJrCK8Ycw5HjgV7JdEJkpgEzeII34/QR2bax ibkrBqyf0tVUvvmn2v1iX0xO8yoANuy8Pn/5oGnm/dGtyg3Pj0VGQ/KRidI/A6eXGf JDd5WWKDz7wXo38rH9ZgfYHd4m7us2SNQ/r66aEvNi2l4VESTcC6erlZHc49XnGuAN /LJEMr7avfCC3n9hZp5umX8rMPW+nAp8rKhbjsmRag4ryE9X3E7b5kEOofqvrjRPJq L1p2Ze2EsMT9A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C21506A382 for ; Sat, 4 Apr 2026 15:31:55 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id dI2dig_k38G4 for ; Sat, 4 Apr 2026 15:31:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338315; bh=qed2PkWEvCgNTZ9DsYhoPtQ0N+ZKXTuw3Hc0APcQOfE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=KQye4mGFxm4hB/Ff+ngyNEVKU0bSIM3uOL2hkWEoK/Hv67zP9/1K63K4CA6dq9kvW YNhKKZcOwXgUIFpuaBrwnM+uSpSob7FJrCK8Ycw5HjgV7JdEJkpgEzeII34/QR2bax ibkrBqyf0tVUvvmn2v1iX0xO8yoANuy8Pn/5oGnm/dGtyg3Pj0VGQ/KRidI/A6eXGf JDd5WWKDz7wXo38rH9ZgfYHd4m7us2SNQ/r66aEvNi2l4VESTcC6erlZHc49XnGuAN /LJEMr7avfCC3n9hZp5umX8rMPW+nAp8rKhbjsmRag4ryE9X3E7b5kEOofqvrjRPJq L1p2Ze2EsMT9A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AC1886A375 for ; Sat, 4 Apr 2026 15:31:55 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338312; bh=ITgI3b57TaPLdPHaE68IKnPW3g3Rk1laIJWPWLj3V3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TqmMCke4BWOpCenoB4sFp0Cs/ZnmE8Gf7SPHk53biDJltyn+QRsbGl28WipOIEkfq zXBkRG5YKnFt/gpyvKP+jBxY214KshEwL3DTdMuYIs8ksOdztttJxZfTm0JlJzasfx jtrR3ovedSbC7jhkUnQOm/O30RehCpLVwyizyy1wAM65Krxc0r08NvuYMSlAeAbnGI 3Xb+uSwsJ2EnIM1y4l1yexV4t1DBLzSRQriTT2tnQHuCErVYTKES4HtyziSm/oaxJM is3JD8B5uoeTgvmZFzQfTUabMjofFyuG42pIwN8NgJ8O9HSItkXUal+IIUbpXOXIKT HhDcS4nzHxK7g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E603A6A369; Sat, 4 Apr 2026 15:31:52 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id zgjfZvB9aohB; Sat, 4 Apr 2026 15:31:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338308; bh=EFuaZ9/wNPJeXmieHwjfMG8GrDn+GSjVAWVMOb65z6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mS+fsYyrImz1wrOGGKz9dwRUc/GI5BIy4/1j0tIWdIussORGkkhZWo+wjcttPEMuO CrXvNGGeZOT/xghF3QlZzEJ7ZIHa46CQl7OpCk5sqs3N+pKU9e01wbShZwsBPN0Wct qNd02w4vnO1EFMPan/JTJlF/ONW+o2BYOnRz8ue72S0Ito9T/z8+ua4ILgMg4Dw3e4 UY8P0PcO4sIEcbDxCIY7/+M3GYSg5CqtUqDTGty3ygxb+jhJqqGt9BMpsmtnx4it62 fcpgxAEfzwwLg6SfuAHlHle3KOnYbcoqSPaFV4YYHIMxLpIuU/dYoKuLbRy631Qzws IE/iyu8qT1z5Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 8B7016869D; Sat, 4 Apr 2026 15:31:48 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Sat, 4 Apr 2026 15:28:51 -0600 Message-ID: <20260404213020.372253-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260404213020.372253-1-sjg@u-boot.org> References: <20260404213020.372253-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 6KNJODKUF64AAIXRMIDYQFMKIQH46JFP X-Message-ID-Hash: 6KNJODKUF64AAIXRMIDYQFMKIQH46JFP X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 15/37] patman: Add debug logging to autolink and patchwork queries List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add tout.debug() calls throughout the autolink pipeline so failures can be diagnosed with -v. Log the patchwork URL resolution, project lookup, series queries and autolink progress. Signed-off-by: Simon Glass --- tools/patman/control.py | 1 + tools/patman/cseries.py | 8 ++++++++ tools/patman/patchwork.py | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/patman/control.py b/tools/patman/control.py index a37893785ad..61379cc108e 100644 --- a/tools/patman/control.py +++ b/tools/patman/control.py @@ -182,6 +182,7 @@ def do_series(args, test_db=None, pwork=None, cser=None): cser.open_database() if args.subcmd in needs_patchwork: ups = cser.get_series_upstream(args.series) + tout.debug(f'Series upstream: {ups!r}') pwork = _setup_patchwork( cser, pwork, ups, args.patchwork_url) elif pwork and pwork is not True: diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 5569eb6f4f5..1dd1550f367 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -302,11 +302,19 @@ class Cseries(cser_helper.CseriesHelper): stop = start + wait_s sleep_time = 5 last_options = None + first = True while True: pws, options, name, version, desc = self.link_search( pwork, series, version) + if first: + tout.debug(f"Autolinking series '{name}' v{version}" + f" (timeout {wait_s}s)") + first = False + tout.debug(f"Searching {pwork.url} project {pwork.proj_id}" + f" for '{desc}'") if pws: tout.clear_progress() + tout.debug(f'Found link: {pws}') if wait_s: tout.notice('Link completed after ' f'{self.get_time() - start} seconds') diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py index de676161eee..3e8f7c6c62c 100644 --- a/tools/patman/patchwork.py +++ b/tools/patman/patchwork.py @@ -281,8 +281,9 @@ class Patchwork: list of series matches, each a dict, see get_series() """ query = desc.replace(' ', '+') - return await self._request( - client, f'series/?project={self.proj_id}&q={query}') + subpath = f'series/?project={self.proj_id}&q={query}' + tout.debug(f' GET {self.url}/api/1.2/{subpath}') + return await self._request(client, subpath) async def _find_series(self, client, svid, ser_id, version, ser): """Find a series on the server