From patchwork Thu Mar 5 14:54:47 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1973 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=1772722534; bh=WKGNEuwavI7KZZhFNnIxT/Ja8pTLzkH912bRtGArchQ=; 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=kSPfMfCQxvaxm3uPSeLU4Q0OAKPccnhqDhkY2Rntfy77rdJ6CPpFfBz80c4UvHAWI 1vzNxJJSWZ5GXt6H3QBty7/XnD5jU7akK3rHGNA/+hOLbOuxFVJzDmU3pJB1KWcGsa Z1tiv2apjLKIjkz6Xjk2Xok0Hdl5oZmRRfmgGYWcv20hFIo60tXrcFK4jA6Fc8e9+c Pulqm80w2ZfXheTnNIcw8+XBNNUy8V5Eb27SoxvtSFaYgw8SfCB2e7YIkpWTtnHT+T Fl9j5VwDLzwfhWwg8TCNOeXCI+DM54ZIh/BPmx9o7hlnnHfIryNWvWhvWX6u8jDaX+ pQjFghBL/4dWw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AB5FC69F22 for ; Thu, 5 Mar 2026 07:55:34 -0700 (MST) 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 NgH896IZItSX for ; Thu, 5 Mar 2026 07:55:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772722534; bh=WKGNEuwavI7KZZhFNnIxT/Ja8pTLzkH912bRtGArchQ=; 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=kSPfMfCQxvaxm3uPSeLU4Q0OAKPccnhqDhkY2Rntfy77rdJ6CPpFfBz80c4UvHAWI 1vzNxJJSWZ5GXt6H3QBty7/XnD5jU7akK3rHGNA/+hOLbOuxFVJzDmU3pJB1KWcGsa Z1tiv2apjLKIjkz6Xjk2Xok0Hdl5oZmRRfmgGYWcv20hFIo60tXrcFK4jA6Fc8e9+c Pulqm80w2ZfXheTnNIcw8+XBNNUy8V5Eb27SoxvtSFaYgw8SfCB2e7YIkpWTtnHT+T Fl9j5VwDLzwfhWwg8TCNOeXCI+DM54ZIh/BPmx9o7hlnnHfIryNWvWhvWX6u8jDaX+ pQjFghBL/4dWw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9AB6269EC0 for ; Thu, 5 Mar 2026 07:55:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772722532; bh=V//o/oyxeLQzuTDcP7vtuSdushef3ic6SLRscMGnrkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pjuxanMFvGLxFZd4VJWuXnxuDwYqbzOAp8FjdObS1+fDMi/WSFz/U8K+icoh9ItV2 mr3+Z23k8ODWPhPPd+hLCdSXv1x9hHLaJ8/iW7x0HqrycZK41TgcLQChfJL30v2FmG GGHOvNZjRUUDUnyEqXJ9ZTAIsfkMXaQcPLbPGvYNsKSvw+9/4jHicWCyx2pp12D2DL tCcttQ3QomDm8eYyL3nwNeZVQIfloFZMYcBVoE4BAiPUKRhHXM4KzyU6905qIOBYgr fh+g/zuvtv208NtLBirYuLd06jcxS+x2rpEoodj1lGvvY2tl7fyxcvak3ryIBiT4RE Ua5rQCsb/YQBw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9B37F69F0F; Thu, 5 Mar 2026 07:55:32 -0700 (MST) 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 H_BZpeozKrJM; Thu, 5 Mar 2026 07:55:32 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772722528; bh=8ONThggmGdPKfrdvuTwwrRgkUXpQMRjX1ml/KUzgIdA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=egb2pwnrnnKN86UbJXTV6ZCT1ZXz0eJEOnLA4loixj0tWQiSxXOylYnJ2gn/djsdZ ebvixczum6IEMXfVAPJKGhQiFd+XWIrgPdI5XsImZZGQ5QF3e1S4IjvacZ0+qqb7Eh qwkWMokvD+afodAAECuPQBv5UxJ7HarHenaBhrQRx9+ts2UFh8kQUPU4Uf/1AYI9JM lnUPFcbjrfkypPM6EXwEER8P6HrWT+byDFVnGL6h3KZt/PLsqgJhaWUni6doeNUoYN k0HGjhhQDvIRpDWsudNbKNC/XW5uge0sm9XIzSeuP6+EMRf4IPrv7DgO2KRpx7U5Fx TT+20gpyzUvEg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DE2C669EC0; Thu, 5 Mar 2026 07:55:27 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 5 Mar 2026 07:54:47 -0700 Message-ID: <20260305145452.909661-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260305145452.909661-1-sjg@u-boot.org> References: <20260305145452.909661-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: NUIBC645AE4GITJZO5CURU5SRHQDMTA2 X-Message-ID-Hash: NUIBC645AE4GITJZO5CURU5SRHQDMTA2 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 4/4] pickman: Handle connection errors gracefully in do_step() 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 When the GitLab server drops the connection, do_step() crashes with an unhandled requests.exceptions.ConnectionError. Catch this specific exception in do_step(), report it, and return failure. This means 'poll' continues to the next iteration after the sleep, while 'step' reports the error and aborts cleanly. Signed-off-by: Simon Glass --- tools/pickman/control.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/pickman/control.py b/tools/pickman/control.py index 6d787d02163..817ae02d900 100644 --- a/tools/pickman/control.py +++ b/tools/pickman/control.py @@ -15,6 +15,8 @@ import tempfile import time import unittest +import requests + # Allow 'from pickman import xxx' to work via symlink our_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(our_path, '..')) @@ -2872,6 +2874,15 @@ def do_step(args, dbs): Returns: int: 0 on success, 1 on failure """ + try: + return _do_step(args, dbs) + except requests.exceptions.ConnectionError as exc: + tout.error(f'step failed with connection error: {exc}') + return 1 + + +def _do_step(args, dbs): + """Internal implementation of do_step""" remote = args.remote source = args.source