GNU bug report logs - #71947
[PATCH 0/2] Modify guix-build-coordinator-agent-service

Previous Next

Package: guix-patches;

Reported by: Andreas Enge <andreas <at> enge.fr>

Date: Fri, 5 Jul 2024 12:29:01 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71947 in the body.
You can then email your comments to 71947 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, matt <at> excalamus.com, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#71947; Package guix-patches. (Fri, 05 Jul 2024 12:29:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Enge <andreas <at> enge.fr>:
New bug report received and forwarded. Copy sent to pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, matt <at> excalamus.com, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org. (Fri, 05 Jul 2024 12:29:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: guix-patches <at> gnu.org
Cc: Andreas Enge <andreas <at> enge.fr>
Subject: [PATCH 0/2] Modify guix-build-coordinator-agent-service
Date: Fri,  5 Jul 2024 14:27:24 +0200
The following two patches modify the guix-build-coordinator-agent-service
to not have default numerical values for two parameters (setting them to #f
instead, which means that they will be taken from the package). And they
add extra-options.

The motivation is to be able to change them on the fly, by letting
extra-options read them from environment variables.
Andreas Enge (2):
  services: guix-build-coordinator-agent: Remove defaults.
  services: guix-build-coordinator-agent: Add extra-options.

 doc/guix.texi         |  8 +++++---
 gnu/services/guix.scm | 18 +++++++++++++-----
 2 files changed, 18 insertions(+), 8 deletions(-)


base-commit: cb57a3fd9f09f4158f1e2ff122ac855be422f374
prerequisite-patch-id: e0c8dd359305affa867e537d444f0cf688b5e342
-- 
2.45.2





Information forwarded to pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, matt <at> excalamus.com, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#71947; Package guix-patches. (Fri, 05 Jul 2024 12:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 71947 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 71947 <at> debbugs.gnu.org
Cc: Andreas Enge <andreas <at> enge.fr>
Subject: [PATCH 1/2] services: guix-build-coordinator-agent: Remove defaults.
Date: Fri,  5 Jul 2024 14:32:52 +0200
* gnu/services/guix.scm (<guix-build-coordinator-agent-configuration>)
[max-parallel-builds, max-parallel-uploads]: Set default to #f.
(guix-build-coordinator-agent-shepherd-services): Check for
max-parallel-builds.
* doc/guix.texi (Guix Services): Adapt the documentation.

If set to #f, the default values are now taken as the defaults of the
guix-build-coordinator-agent command.

Change-Id: Ide6dde0e88aa0dc851b6295095f414ca2ddc72ac
---
 doc/guix.texi         |  6 +++---
 gnu/services/guix.scm | 10 ++++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 7d0824784d..d4d00fd4b8 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -23,7 +23,7 @@
 
 @copying
 Copyright @copyright{} 2012-2024 Ludovic Courtès@*
-Copyright @copyright{} 2013, 2014, 2016 Andreas Enge@*
+Copyright @copyright{} 2013, 2014, 2016, 2024 Andreas Enge@*
 Copyright @copyright{} 2013 Nikita Karetnikov@*
 Copyright @copyright{} 2014, 2015, 2016 Alex Kost@*
 Copyright @copyright{} 2015, 2016 Mathieu Lirzin@*
@@ -39656,10 +39656,10 @@ Guix Services
 The systems for which this agent should fetch builds.  The agent process
 will use the current system it's running on as the default.
 
-@item @code{max-parallel-builds} (default: @code{1})
+@item @code{max-parallel-builds} (default: @code{#f})
 The number of builds to perform in parallel.
 
-@item @code{max-parallel-uploads} (default: @code{1})
+@item @code{max-parallel-uploads} (default: @code{#f})
 The number of uploads to perform in parallel.
 
 @item @code{max-allocated-builds} (default: @code{#f})
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index 0182c21ea7..fdeaeeb472 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -194,10 +194,10 @@ (define-record-type* <guix-build-coordinator-agent-configuration>
                        (default #f))
   (max-parallel-builds
    guix-build-coordinator-agent-configuration-max-parallel-builds
-   (default 1))
+   (default #f))
   (max-parallel-uploads
    guix-build-coordinator-agent-configuration-max-parallel-uploads
-   (default 1))
+   (default #f))
   (max-allocated-builds
    guix-build-coordinator-agent-configuration-max-allocated-builds
    (default #f))
@@ -443,8 +443,10 @@ (define (guix-build-coordinator-agent-shepherd-services config)
                           #~(#$(string-append "--name=" agent-name)
                              #$(string-append "--dynamic-auth-token-file="
                                               token-file))))
-                    #$(simple-format #f "--max-parallel-builds=~A"
-                                     max-parallel-builds)
+                    #$@(if max-parallel-builds
+                           #~(#$(simple-format #f "--max-parallel-builds=~A"
+                                               max-parallel-builds))
+                           #~())
                     #$@(if max-parallel-uploads
                            #~(#$(simple-format #f "--max-parallel-uploads=~A"
                                                max-parallel-uploads))
-- 
2.45.2





Information forwarded to pelzflorian <at> pelzflorian.de, ludo <at> gnu.org, matt <at> excalamus.com, maxim.cournoyer <at> gmail.com, guix-patches <at> gnu.org:
bug#71947; Package guix-patches. (Fri, 05 Jul 2024 12:34:03 GMT) Full text and rfc822 format available.

Message #11 received at 71947 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 71947 <at> debbugs.gnu.org
Cc: Andreas Enge <andreas <at> enge.fr>
Subject: [PATCH 2/2] services: guix-build-coordinator-agent: Add extra-options.
Date: Fri,  5 Jul 2024 14:32:53 +0200
* gnu/services/guix.scm (<guix-build-coordinator-agent-configuration>):
Add field extra-options.
(guix-build-coordinator-agent-shepherd-services): Add and use EXTRA-OPTIONS
argument.
* doc/guix.texi (Guix Services): Adapt the documentation.

Change-Id: I9e7e258e03e2b6553aa1570f5fcfaf3b0ada3e15
---
 doc/guix.texi         | 2 ++
 gnu/services/guix.scm | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index d4d00fd4b8..8bfb342253 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -39682,6 +39682,8 @@ Guix Services
 URLs from which to attempt to fetch substitutes for build inputs, if the
 input store items aren't already available.
 
+@item @code{extra-options} (default: @var{'()})
+Extra command line options for @code{guix-build-coordinator-agent}.
 @end table
 @end deftp
 
diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm
index fdeaeeb472..6c58b3a292 100644
--- a/gnu/services/guix.scm
+++ b/gnu/services/guix.scm
@@ -66,6 +66,7 @@ (define-module (gnu services guix)
             guix-build-coordinator-agent-configuration-max-1min-load-average
             guix-build-coordinator-agent-configuration-derivation-substitute-urls
             guix-build-coordinator-agent-configuration-non-derivation-substitute-urls
+            guix-build-coordinator-agent-configuration-extra-options
 
             guix-build-coordinator-agent-password-auth
             guix-build-coordinator-agent-password-auth?
@@ -209,7 +210,10 @@ (define-record-type* <guix-build-coordinator-agent-configuration>
    (default #f))
   (non-derivation-substitute-urls
    guix-build-coordinator-agent-configuration-non-derivation-substitute-urls
-   (default #f)))
+   (default #f))
+  (extra-options
+   guix-build-coordinator-agent-configuration-extra-options
+   (default '())))
 
 (define-record-type* <guix-build-coordinator-agent-password-auth>
   guix-build-coordinator-agent-password-auth
@@ -410,6 +414,7 @@ (define (guix-build-coordinator-agent-shepherd-services config)
              max-parallel-builds max-parallel-uploads
              max-allocated-builds max-1min-load-average
              derivation-substitute-urls non-derivation-substitute-urls
+             extra-options
              systems)
     (list
      (shepherd-service
@@ -469,6 +474,7 @@ (define (guix-build-coordinator-agent-shepherd-services config)
                                  "--non-derivation-substitute-urls="
                                  (string-join non-derivation-substitute-urls " ")))
                            #~())
+                    #$@extra-options
                     #$@(map (lambda (system)
                               (string-append "--system=" system))
                             (or systems '())))
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#71947; Package guix-patches. (Tue, 09 Jul 2024 02:42:01 GMT) Full text and rfc822 format available.

Message #14 received at 71947 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 71947 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>,
 Christopher Baines <mail <at> cbaines.net>,
 Florian Pelz <pelzflorian <at> pelzflorian.de>,
 Matthew Trzcinski <matt <at> excalamus.com>
Subject: Re: [bug#71947] [PATCH 0/2] Modify
 guix-build-coordinator-agent-service
Date: Mon, 08 Jul 2024 22:40:40 -0400
Hi Andreas,

Andreas Enge <andreas <at> enge.fr> writes:

> The following two patches modify the guix-build-coordinator-agent-service
> to not have default numerical values for two parameters (setting them to #f
> instead, which means that they will be taken from the package). And they
> add extra-options.

The above would have been best expressed by a maybe value using the
define-configuration scheme (but you'd have to migrate from the
define-record-type* to define-configuration first -- perhaps for another
time).

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#71947; Package guix-patches. (Tue, 09 Jul 2024 02:43:02 GMT) Full text and rfc822 format available.

Message #17 received at 71947 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: 71947 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>,
 Florian Pelz <pelzflorian <at> pelzflorian.de>,
 Matthew Trzcinski <matt <at> excalamus.com>
Subject: Re: [bug#71947] [PATCH 0/2] Modify
 guix-build-coordinator-agent-service
Date: Mon, 08 Jul 2024 22:41:43 -0400
Andreas Enge <andreas <at> enge.fr> writes:

> The following two patches modify the guix-build-coordinator-agent-service
> to not have default numerical values for two parameters (setting them to #f
> instead, which means that they will be taken from the package). And they
> add extra-options.
>
> The motivation is to be able to change them on the fly, by letting
> extra-options read them from environment variables.
> Andreas Enge (2):
>   services: guix-build-coordinator-agent: Remove defaults.
>   services: guix-build-coordinator-agent: Add extra-options.
>

Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail>

-- 
Thanks,
Maxim




Reply sent to Andreas Enge <andreas <at> enge.fr>:
You have taken responsibility. (Wed, 18 Sep 2024 09:26:02 GMT) Full text and rfc822 format available.

Notification sent to Andreas Enge <andreas <at> enge.fr>:
bug acknowledged by developer. (Wed, 18 Sep 2024 09:26:02 GMT) Full text and rfc822 format available.

Message #22 received at 71947-done <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Ludovic Courtès <ludo <at> gnu.org>,
 71947-done <at> debbugs.gnu.org, Florian Pelz <pelzflorian <at> pelzflorian.de>,
 Matthew Trzcinski <matt <at> excalamus.com>, Christopher Baines <mail <at> cbaines.net>
Subject: Re: [bug#71947] [PATCH 0/2] Modify
 guix-build-coordinator-agent-service
Date: Wed, 18 Sep 2024 11:24:22 +0200
Hello Maxim,

Am Mon, Jul 08, 2024 at 10:40:40PM -0400 schrieb Maxim Cournoyer:
> The above would have been best expressed by a maybe value using the
> define-configuration scheme (but you'd have to migrate from the
> define-record-type* to define-configuration first -- perhaps for another
> time).

thanks for the review, I have just pushed the patches.
Since this is the first time I have touched a service, I contented myself
with making minimal changes and not daring a bigger rewrite.

Andreas





Information forwarded to guix-patches <at> gnu.org:
bug#71947; Package guix-patches. (Sun, 22 Sep 2024 02:33:01 GMT) Full text and rfc822 format available.

Message #25 received at 71947-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Andreas Enge <andreas <at> enge.fr>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 71947-done <at> debbugs.gnu.org,
 Florian Pelz <pelzflorian <at> pelzflorian.de>,
 Matthew Trzcinski <matt <at> excalamus.com>, Christopher Baines <mail <at> cbaines.net>
Subject: Re: [bug#71947] [PATCH 0/2] Modify
 guix-build-coordinator-agent-service
Date: Sun, 22 Sep 2024 11:30:59 +0900
Hi Andreas,

Andreas Enge <andreas <at> enge.fr> writes:

> Hello Maxim,
>
> Am Mon, Jul 08, 2024 at 10:40:40PM -0400 schrieb Maxim Cournoyer:
>> The above would have been best expressed by a maybe value using the
>> define-configuration scheme (but you'd have to migrate from the
>> define-record-type* to define-configuration first -- perhaps for another
>> time).
>
> thanks for the review, I have just pushed the patches.
> Since this is the first time I have touched a service, I contented myself
> with making minimal changes and not daring a bigger rewrite.

That's understandable.  Thanks for doing it all the same!

Cheers,

-- 
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 20 Oct 2024 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 144 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.