From patchwork Mon Dec 18 11:34:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kleber Sacilotto de Souza X-Patchwork-Id: 849996 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3z0f8108sBz9s83; Mon, 18 Dec 2017 22:34:25 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1eQtga-0001bs-I7; Mon, 18 Dec 2017 11:34:20 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1eQtgZ-0001bW-AD for kernel-team@lists.ubuntu.com; Mon, 18 Dec 2017 11:34:19 +0000 Received: from mail-qt0-f200.google.com ([209.85.216.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1eQtgZ-0002Z9-0f for kernel-team@lists.ubuntu.com; Mon, 18 Dec 2017 11:34:19 +0000 Received: by mail-qt0-f200.google.com with SMTP id r51so12073919qtj.17 for ; Mon, 18 Dec 2017 03:34:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=y+j4j3rU44TfzZa0MkN9Athud05zWT2UvBe646G6P+A=; b=KGaeG8+fa43E4Lek2ySg0sPhca58coFfF0JkQhWiOtr/qR09p18QpTtPN9LfLpWyIz 1USBXmFmm5NcYPJ1LvfTFtPPOkc99xZqojqQcDorsLdonmetzYE1DNX1zEzwimhi88Rg v2tOkspX48a0d3LGdAXGpEQ2+S12bDq7V8Kqlc2joFd6Bezk/UpAewtxK2r7hrR1CqBu lqwhVV56SvtySiYb1s0Vn2NuGhxnX3Z2alhyVh0K6ohcvb67TP8zSz7Xzer5Y1aBGwjY q1TrJ8P1ouugyCIEgPszJo2/zJrzMTipTx64eMtAjYnhF/tT4CSsSLM3mlJ3lne/DVce V/Xg== X-Gm-Message-State: AKGB3mL+jpkbPGNHl3h+s/zfbgUW1vRYEEPX997LxDY84f4UDTen/9T5 NJ5GAL2wnGbE7VaFwaoZ8WZozrGmasZFS+7+sVVwzUFr1/NdE3aVWmaaWGG7sot8moTDXIjDPaZ bkSYeQxOg73MmKLRX51rIL4Ivp75LVN8tTZwHb/+jpw== X-Received: by 10.55.119.70 with SMTP id s67mr35018742qkc.45.1513596857929; Mon, 18 Dec 2017 03:34:17 -0800 (PST) X-Google-Smtp-Source: ACJfBovi5+gE0Ez9Df72/Za/ECcK1uQvE3MLXAUGX+8V3t7tdSUOTJeP+2F1br4EH5OlME8ECK+wXA== X-Received: by 10.55.119.70 with SMTP id s67mr35018724qkc.45.1513596857712; Mon, 18 Dec 2017 03:34:17 -0800 (PST) Received: from localhost ([191.8.83.182]) by smtp.gmail.com with ESMTPSA id g33sm5303936qkh.56.2017.12.18.03.34.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Dec 2017 03:34:17 -0800 (PST) From: Kleber Sacilotto de Souza To: kernel-team@lists.ubuntu.com Subject: [PATCH] swm: promote_to_updates.py: check for snap tasks before closing tb Date: Mon, 18 Dec 2017 09:34:14 -0200 Message-Id: <20171218113414.11756-1-kleber.souza@canonical.com> X-Mailer: git-send-email 2.14.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" Do not close the tracking bug until all the snap-related tasks are either Invalid or Fix Released. Signed-off-by: Kleber Sacilotto de Souza Acked-by: Stefan Bader Acked-by: Khalid Elmously --- stable/wfl/wft/promote_to_updates.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stable/wfl/wft/promote_to_updates.py b/stable/wfl/wft/promote_to_updates.py index d0377cf4..29f6c393 100644 --- a/stable/wfl/wft/promote_to_updates.py +++ b/stable/wfl/wft/promote_to_updates.py @@ -141,6 +141,15 @@ class PromoteToUpdates(Promoter): cinfo(' package promote-to-security status (%s) does not match security-signoff status (%s)' % (promote_to_security.status, security_signoff.status), 'yellow') break + # Check that all snap tasks are either "Invalid" or "Fix Released" + snap_done = True + for taskname in s.bug.tasks_by_name: + if taskname.startswith('snap-') and s.bug.tasks_by_name[taskname].status not in ['Invalid', 'Fix Released']: + cinfo(' %s is neither "Fix Released" nor "Invalid" (%s)' % (taskname, s.bug.tasks_by_name[taskname].status), 'yellow') + snap_done = False + if not snap_done: + break + # All is completed so we can finally close out this workflow bug. s.bug.tasks_by_name[s.bug.workflow_project].status = 'Fix Released' if promote_to_updates.status == 'Invalid':