From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +ED8BmYV82JMAwEAbAwnHQ (envelope-from ) for ; Wed, 10 Aug 2022 04:18:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id iEjoBWYV82JfDQEAG6o9tA (envelope-from ) for ; Wed, 10 Aug 2022 04:18:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 80D84A98 for ; Wed, 10 Aug 2022 04:18:13 +0200 (CEST) Received: from localhost ([::1]:33354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLbIS-00073V-9H for larch@yhetil.org; Tue, 09 Aug 2022 22:18:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLbIO-00073N-7z for bug-guix@gnu.org; Tue, 09 Aug 2022 22:18:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLbII-0008D8-Fk for bug-guix@gnu.org; Tue, 09 Aug 2022 22:18:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLbII-0001zw-Bu for bug-guix@gnu.org; Tue, 09 Aug 2022 22:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56799: (gnu services configuration) usage of *unspecified* is problematic Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 10 Aug 2022 02:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56799 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Attila Lendvai Cc: 56799@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 56799-submit@debbugs.gnu.org id=B56799.16600978597652 (code B ref 56799); Wed, 10 Aug 2022 02:18:02 +0000 Received: (at 56799) by debbugs.gnu.org; 10 Aug 2022 02:17:39 +0000 Received: from localhost ([127.0.0.1]:45599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLbHu-0001zM-GC for submit@debbugs.gnu.org; Tue, 09 Aug 2022 22:17:38 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:40587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLbHr-0001z7-3c for 56799@debbugs.gnu.org; Tue, 09 Aug 2022 22:17:36 -0400 Received: by mail-qt1-f174.google.com with SMTP id w28so2041731qtc.7 for <56799@debbugs.gnu.org>; Tue, 09 Aug 2022 19:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc; bh=8ARWpQqi9vogCQu1nvbQW/vZ+w8h1/HM+SY94lT0wug=; b=Ix4/ekSgtqoTOI8ISAlSHX+kELute63ScS1jX+1QSfA8nSe+wqMv/lhkoWrE5WOlTP SrGifNDGe0E99WutGI4+qiI8xYrbq5uVmugPeZCQtCDrxwnpR01z31O2DCwKiCBKwEI9 H0FKKw6m0TlUalEB/Di18Fy90qzkupWbGW2L7d4FW2AEZrSi6kD0jq1oQSvGDhNoScmm E0zkj0ICeDdC3heJDwntBJE/2KllyHu7MebFcR89/bDZmnvKNW6t7SpYeJRV6xmXfpWA YfkxS2H+qfBgiyD6BGB4wTOmDjLJBMnCh55poR7awRDgpq7dRLwk2ddpNBb3lqa2k7QM GbZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc; bh=8ARWpQqi9vogCQu1nvbQW/vZ+w8h1/HM+SY94lT0wug=; b=hZroI1aJnXGMdTs8O7yASLn2rI8T60qm4/Dd5DrL6gkhjk6xLi40xWq+b6DQtYDgU0 LFowiuV4ZeqhjiWJc/V8XN7MPAxh25W1LX39yr47yIR7yY8YQvCHwxmXPDvuJTXwER/k wHCjwwMSDOnDdBxgo6fvrJ1F7fMIhskUmXzwSdslDJBvBdJwx+TDRPJooT65UIFyzoqT 0EoMOAIVOCkinhPHe8CvP1QmPTzn5NSWHQmAHkr5e5cKoii3yyeTPB/Z7Tlw890i9+L1 82cBW7mQIEJPYtM/g5ia1HPmjaexTztfZzPDpDdirNjEExXIg1q5WvGyYAYr5sOO4wvl sKtA== X-Gm-Message-State: ACgBeo2YJixAigV1MET5jXie57JHJuWWFy5K6hwos1ZuGqFwCa4La8U8 M5Mb2y8H7IzbCaChSUhIYgqTk6SFUXA= X-Google-Smtp-Source: AA6agR6RZU4tBsvKwojR0E5hRpr3C/0jqeuc3fFafWJi7tlr9o4ENUMZ+PkDN1tBiX4eTglVRNxZww== X-Received: by 2002:a05:622a:490:b0:339:aea:70a5 with SMTP id p16-20020a05622a049000b003390aea70a5mr22466671qtx.351.1660097849288; Tue, 09 Aug 2022 19:17:29 -0700 (PDT) Received: from hurd (dsl-10-135-11.b2b2c.ca. [72.10.135.11]) by smtp.gmail.com with ESMTPSA id u11-20020a05620a0c4b00b006b60c965024sm12599859qki.113.2022.08.09.19.17.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 19:17:28 -0700 (PDT) From: Maxim Cournoyer References: <87o7xa8qxt.fsf@gmail.com> <8735egxedv.fsf@gnu.org> <87les82c2f.fsf@gmail.com> <87v8rbumnx.fsf@gnu.org> <87sfme1y8m.fsf@gmail.com> <877d3omc9c.fsf@gnu.org> Date: Tue, 09 Aug 2022 22:17:27 -0400 In-Reply-To: (Attila Lendvai's message of "Mon, 08 Aug 2022 23:35:03 +0000") Message-ID: <87k07gn8p4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660097893; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=8ARWpQqi9vogCQu1nvbQW/vZ+w8h1/HM+SY94lT0wug=; b=P0ueFiggEGEl2Wfjad6Z1epQ44AAyrGcHYftU1+O6qfxjxzhGUPmjetfvKxXOv1ryMZu8J GLo5pLE7vmkDuA6uElrdfGNi47R1vSQqcehAzWlRjiw9dFJOW4D3vrJhrbKFa+FIQBSm5+ 2tcgfWMQ5S2avRUI/mHrraIjn9cG4GwsnYF36Yh6mVTa0JafASItGQHTMG2tXrV4aEd8u2 MKgi4fKZlXNjs+o7d5uLTBWHlq9pYcp1o+byDhr0RceYW7gUyXoFwLI782dRY9nZbJJI/w rKSV4/yh7uByaTqbUqlgJIcC4hujAZkWokoLL5yjdiLurdFYiyJE+GIOyY+Uvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660097893; a=rsa-sha256; cv=none; b=b2T49uvIzHXzS0rfwQMKqc3klfyTVtyj2gWw34beiUGkx6P9AWfdMvOdEyedY2dAlIZWnK dYG29O0qorOnQd/T7f9vQoLamlVg2v+UR7OWS9DTUYQ6LEREF/dkxN95R9Y/3UPSoucS/g 5u3JMpusqPbkrdsPfrZJsXu6t3PMqK0JQv/xmnBJSSUJpuRyGZ+tCrNbtsPpNzw08uwTb7 miHS0wYWZy7rW08Pc0jSlCQAEwFg3sWNo5tpxxmCPbmRBriHdJlbFk+WKNbFrqUKbPnymg F2KY5zd+ySukHP2g+0eCY+D5hnB5kt/fIKhNk7PxfhXNqrCz0vJUaggUvMUUMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="Ix4/ekSg"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.51 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="Ix4/ekSg"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 80D84A98 X-Spam-Score: 4.51 X-Migadu-Scanner: scn0.migadu.com X-TUID: 08r8MOE0nnap Hi Attila, Attila Lendvai writes: >> i'm obviously not aware of the entire complexity here, othrwise >> there wouldn't have remained a bug... but regardless of the actual >> API/value used, i don't see how any of this could work without the >> service code explicitly checking for the unspecified value for >> fields that have a maybe type (i.e. whose type allows the value to >> be unspecified). i think using a symbol instead of unspecified only >> pushes the appearance of the symptoms farther away both in time and >> space (otherwise there should have been a trivial fix to this >> without changing unspecified back to 'unset). > > > sorry, i was wrong/slow here^. > > i think i finally understand what the original issue was that triggered the rollback: > > the *UNSPECIFIED* value cannot get through the GExp > serialize/deserialize operation between the host/builder (or how do we > call it?) and Shepherd. the checks in the service code that handle the > unspecified field values only happen when Shepeherd is executing the > deserialized GExp's. That's the issue, yes! the *unspecified* value cannot cross the host/build border, which forces someone to pre-compute all things before serialization happens, which is inconvenient at best in some scenarios I hinted at (a recent one is defining inetd-style services, which endpoints need to be computed on the target (inside the service gexp)). > the fix i would propose is to smarten up GExp serialization to handle > whichever value we use as the marker, be it 1) *UNSPECIFIED*, or 2) > Nothing from srfi-189, or 3) a record instance that we > define/instantiate ourselves. That's what I first attempted, without success. That *unspecified* expands to some random object on every usage seems meant to discourage its usage as a specific value (its name, too!) > i don't recommend 3). we should rather use srfi-189 then, because it > sandardizes widely known concepts srfi-189 sounds fancy, but how would it be better than the 'unset symbol? Could you please restate the problems faced when using a symbol? Would it be lowerable into Gexp, unlike *unspecified*? To me, in Guile this means having a readily implemented reader syntax. > so, would you accept a patch that implements 1) or 2) ? As I mentioned earlier, the specific value used for a maybe value is an implementation detail, or should be made one, in my opinion. So it doesn't matter to me, as long as it makes writing services convenient and passes all the tests (I recently augmented the jami-service-type test which such a case to avoid any regressions). Thanks, Maxim