From patchwork Sat Dec 21 17:02:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 2527 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8513427BBEA; Sat, 21 Dec 2024 17:04:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B3A8727BBE2 for ; Sat, 21 Dec 2024 17:04:35 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tP2tc-00057K-1z; Sat, 21 Dec 2024 12:04:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP2tY-00056t-Su for guix-patches@gnu.org; Sat, 21 Dec 2024 12:04:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tP2tY-0002o6-1a for guix-patches@gnu.org; Sat, 21 Dec 2024 12:04:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:Subject; bh=nhT0nJ8hLTcNp807orlhORxWkUQwN/owqpSs/xAEbic=; b=hDNxHHhFZARolHxHjDIjwBhTDd3qJQ4V43gaY0vKIWtywkAttHRXGjTfSq7JYD+/6PahWvLMJM4MEpcxk9DJXBUEzdFhZ2sQHQzNe0bStiZUORxoAM6DUoOcQIcy+Cb+zrG6IdVSTIenWjfW6SmZXI1W1EKzRK2hCiIZR7zwpNI4QzwKagH0ucR2rG1/S8K0i1dHgV0RvxN1yppIzZtYG4ol8CLguKxToAt1fW5TFAyu5KUYNKtSUn5+V6rYUTotBufzJ5fwY3X8MdQNB2qSU5gqJ2wO0va1+p3tvTB5/hh70f95pFS677HZAwlZ9E/e7bpb8V2MFVXPV41HarJYQg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tP2tW-0005GI-Oy for guix-patches@gnu.org; Sat, 21 Dec 2024 12:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75010] [PATCH 0/7] Roll back when deployment fails. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 21 Dec 2024 17:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75010 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75010@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.173480061520182 (code B ref -1); Sat, 21 Dec 2024 17:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2024 17:03:35 +0000 Received: from localhost ([127.0.0.1]:47501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tP2t5-0005FS-30 for submit@debbugs.gnu.org; Sat, 21 Dec 2024 12:03:35 -0500 Received: from lists.gnu.org ([209.51.188.17]:42782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tP2t1-0005FI-L0 for submit@debbugs.gnu.org; Sat, 21 Dec 2024 12:03:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tP2t0-000541-Hl for guix-patches@gnu.org; Sat, 21 Dec 2024 12:03:31 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117] helo=email.rimm.ee) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tP2sx-0002Tb-Fm for guix-patches@gnu.org; Sat, 21 Dec 2024 12:03:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1734800596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=nhT0nJ8hLTcNp807orlhORxWkUQwN/owqpSs/xAEbic=; b=TvdiH//QGNzyUlm8KgUfSLzkpGR7CpQAGwoHL+usAkxapCR3M88X3aEFEntDfESxrkAGIY 9o60uI0jwPoqDwwskLNkJjjOjs8fMqWl8Z+d+sy8pW5kshMPJl4SUIKhaEOpP6aOkPACw6 Hv4MMbi779YYCMR+bXa5rx/lot5qI7bYHWxZV9ahRfcEtkLlWfrj8dINWCzCFgJWuh/ZPi iFVBav/lXDjw0p15TBAZ370jFNR/WbuRuuRADATamF9ICD9Gy4cl6Z9xiZbZb4VpVp6HIO vQ0CvQ3J2WvIbVqh3SkbEJgYNKGY1wSxlFBszHbm+XN8/1d0eKNtLyQBCJouLA== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id a3ddfb77 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Sat, 21 Dec 2024 17:03:16 +0000 (UTC) Date: Sat, 21 Dec 2024 18:02:35 +0100 Message-ID: MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@rimm.ee; helo=email.rimm.ee X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, Felix's patch is from issue #69343, one is also squashed into [PATCH 2/7]. In [PATCH 2/7], does the mbegin above the mlet work, or is its value discarded? Guix deploy seems to work the same way. In [PATCH 7/7] I try to add a test for the guix deploy rollback behavior. See attachment, why does this error occur? Cheers, Herman Felix Lechner (1): Rename two remote variables confusingly named 'generations'. Herman Rimm (6): monads: Add 'mmatch'. gnu: machine: ssh: Refactor roll-back-managed-host. gnu: machine: ssh: Return monadic value from roll-back-managed-host. gnu: machine: Remove &deploy-error. gnu: machine: ssh: Roll-back on failure. WIP: gnu: tests: Add module for guix deploy tests. doc/guix.texi | 6 ++ gnu/machine.scm | 17 +--- gnu/machine/ssh.scm | 122 +++++++++++------------- gnu/tests/deploy.scm | 203 ++++++++++++++++++++++++++++++++++++++++ guix/monads.scm | 11 +++ guix/scripts/deploy.scm | 8 +- 6 files changed, 279 insertions(+), 88 deletions(-) create mode 100644 gnu/tests/deploy.scm base-commit: 11855e1c2863c56d9a3364cdac614a529a1c7cc2