* [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service
@ 2024-07-05 12:27 Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 1/2] services: guix-build-coordinator-agent: Remove defaults Andreas Enge
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Andreas Enge @ 2024-07-05 12:27 UTC (permalink / raw)
To: 71947
Cc: Andreas Enge, Florian Pelz, Ludovic Courtès,
Matthew Trzcinski, Maxim Cournoyer
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#71947] [PATCH 1/2] services: guix-build-coordinator-agent: Remove defaults.
2024-07-05 12:27 [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Andreas Enge
@ 2024-07-05 12:32 ` Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 2/2] services: guix-build-coordinator-agent: Add extra-options Andreas Enge
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Andreas Enge @ 2024-07-05 12:32 UTC (permalink / raw)
To: 71947
Cc: Andreas Enge, Florian Pelz, Ludovic Courtès,
Matthew Trzcinski, Maxim Cournoyer
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#71947] [PATCH 2/2] services: guix-build-coordinator-agent: Add extra-options.
2024-07-05 12:27 [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 1/2] services: guix-build-coordinator-agent: Remove defaults Andreas Enge
@ 2024-07-05 12:32 ` Andreas Enge
2024-07-09 2:40 ` [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Maxim Cournoyer
2024-07-09 2:41 ` Maxim Cournoyer
3 siblings, 0 replies; 7+ messages in thread
From: Andreas Enge @ 2024-07-05 12:32 UTC (permalink / raw)
To: 71947
Cc: Andreas Enge, Florian Pelz, Ludovic Courtès,
Matthew Trzcinski, Maxim Cournoyer
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service
2024-07-05 12:27 [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 1/2] services: guix-build-coordinator-agent: Remove defaults Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 2/2] services: guix-build-coordinator-agent: Add extra-options Andreas Enge
@ 2024-07-09 2:40 ` Maxim Cournoyer
2024-09-18 9:24 ` bug#71947: " Andreas Enge
2024-07-09 2:41 ` Maxim Cournoyer
3 siblings, 1 reply; 7+ messages in thread
From: Maxim Cournoyer @ 2024-07-09 2:40 UTC (permalink / raw)
To: Andreas Enge
Cc: 71947, Ludovic Courtès, Christopher Baines, Florian Pelz,
Matthew Trzcinski
Hi Andreas,
Andreas Enge <andreas@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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service
2024-07-05 12:27 [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Andreas Enge
` (2 preceding siblings ...)
2024-07-09 2:40 ` [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Maxim Cournoyer
@ 2024-07-09 2:41 ` Maxim Cournoyer
3 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2024-07-09 2:41 UTC (permalink / raw)
To: Andreas Enge; +Cc: 71947, Ludovic Courtès, Florian Pelz, Matthew Trzcinski
Andreas Enge <andreas@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@gmail>
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#71947: [PATCH 0/2] Modify guix-build-coordinator-agent-service
2024-07-09 2:40 ` [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Maxim Cournoyer
@ 2024-09-18 9:24 ` Andreas Enge
2024-09-22 2:30 ` [bug#71947] " Maxim Cournoyer
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Enge @ 2024-09-18 9:24 UTC (permalink / raw)
To: Maxim Cournoyer
Cc: Ludovic Courtès, 71947-done, Florian Pelz, Matthew Trzcinski,
Christopher Baines
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service
2024-09-18 9:24 ` bug#71947: " Andreas Enge
@ 2024-09-22 2:30 ` Maxim Cournoyer
0 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2024-09-22 2:30 UTC (permalink / raw)
To: Andreas Enge
Cc: Ludovic Courtès, 71947-done, Florian Pelz, Matthew Trzcinski,
Christopher Baines
Hi Andreas,
Andreas Enge <andreas@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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-22 2:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-05 12:27 [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 1/2] services: guix-build-coordinator-agent: Remove defaults Andreas Enge
2024-07-05 12:32 ` [bug#71947] [PATCH 2/2] services: guix-build-coordinator-agent: Add extra-options Andreas Enge
2024-07-09 2:40 ` [bug#71947] [PATCH 0/2] Modify guix-build-coordinator-agent-service Maxim Cournoyer
2024-09-18 9:24 ` bug#71947: " Andreas Enge
2024-09-22 2:30 ` [bug#71947] " Maxim Cournoyer
2024-07-09 2:41 ` Maxim Cournoyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).