From patchwork Mon Apr 13 16:29:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 1269875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 491Dbx6wbpz9sSM; Tue, 14 Apr 2020 02:29:47 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jO1xu-00017o-5e; Mon, 13 Apr 2020 16:29:42 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jO1xs-00017i-I3 for kernel-team@lists.ubuntu.com; Mon, 13 Apr 2020 16:29:40 +0000 Received: from 3.general.kamal.us.vpn ([10.172.68.53] helo=ascalon) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jO1xs-0007Kx-4j for kernel-team@lists.ubuntu.com; Mon, 13 Apr 2020 16:29:40 +0000 Received: from kamal by ascalon with local (Exim 4.90_1) (envelope-from ) id 1jO1xq-0000eb-6D for kernel-team@lists.ubuntu.com; Mon, 13 Apr 2020 09:29:38 -0700 From: Kamal Mostafa To: kernel-team@lists.ubuntu.com Subject: [kteam-tools][PATCH] stable/create-stable-tracker: do not fail if obsolete Ubuntu series Date: Mon, 13 Apr 2020 09:29:36 -0700 Message-Id: <20200413162936.2431-1-kamal@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Sometimes, we need to continue creating tracking bugs even after Launchpad stops supporting an Ubuntu series. Do not fail in this case; Just create the tracking bug without any series nomination. More specifically, if the nomination step fails for any reason after the bug has already been created (e.g. Launchpad timeout), do print the link to the created bug. Signed-off-by: Kamal Mostafa --- stable/create-stable-tracker | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stable/create-stable-tracker b/stable/create-stable-tracker index c088b01f..6a300a59 100755 --- a/stable/create-stable-tracker +++ b/stable/create-stable-tracker @@ -221,9 +221,13 @@ class CreateTrackingBug(StdApp): sc = ubuntu.series_collection for s in sc: if s.name == series_name: - nomination = bug.lpbug.addNomination(target=s) - if nomination.canApprove(): - nomination.approve() + try: + nomination = bug.lpbug.addNomination(target=s) + if nomination.canApprove(): + nomination.approve() + except: + print("WARNING: Bug created, but series nomination failed!") + pass if 'staging' in self.cfg: print("https://bugs.%s.launchpad.net/bugs/%s" % (self.defaults['launchpad_services_root'], bug.id))