* [bug#70285] [PATCH 1/3] services: cuirass: Use separate extra options for cuirass web process.
2024-04-08 17:48 [bug#70285] [PATCH 0/3] Cuirass service config options work Ahmad Draidi via Guix-patches via
@ 2024-04-08 17:54 ` Ahmad Draidi via Guix-patches via
2024-04-08 17:54 ` [bug#70285] [PATCH 2/3] services: cuirass: Add new configuration options Ahmad Draidi via Guix-patches via
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2024-04-08 17:54 UTC (permalink / raw)
To: 70285; +Cc: Ahmad Draidi
Currently, "extra-options" is passed to both "cuirass register" and "cuirass
web" processes. This makes it impractical since the extra parameters have to
be intended for and supported by both processes.
* gnu/services/cuirass.scm (<cuirass-configuration>): Add a web-extra-options
field.
(cuirass-shepherd-service): Replace extra-options with web-extra-options for
cuirass web.
* doc/guix.texi (Continuous Integration): Document the changes.
Change-Id: Iba79c559ea8267aaf8f25248f3d18ed7b352cb60
---
doc/guix.texi | 5 ++++-
gnu/services/cuirass.scm | 7 +++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 5827e0de14..77e17cb69c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34406,7 +34406,10 @@ Continuous Integration
packages locally.
@item @code{extra-options} (default: @code{'()})
-Extra options to pass when running the Cuirass processes.
+Extra options to pass when running the @code{cuirass register} process.
+
+@item @code{web-extra-options} (default: @code{'()})
+Extra options to pass when running the @code{cuirass web} process.
@end table
@end deftp
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index bcdbffa2f3..b09d5601d4 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -120,6 +120,8 @@ (define-record-type* <cuirass-configuration>
(fallback? cuirass-configuration-fallback? ;boolean
(default #f))
(extra-options cuirass-configuration-extra-options
+ (default '()))
+ (web-extra-options cuirass-configuration-web-extra-options
(default '())))
(define (cuirass-shepherd-service config)
@@ -142,7 +144,8 @@ (define (cuirass-shepherd-service config)
(use-substitutes? (cuirass-configuration-use-substitutes? config))
(one-shot? (cuirass-configuration-one-shot? config))
(fallback? (cuirass-configuration-fallback? config))
- (extra-options (cuirass-configuration-extra-options config)))
+ (extra-options (cuirass-configuration-extra-options config))
+ (web-extra-options (cuirass-configuration-web-extra-options config)))
`(,(shepherd-service
(documentation "Run Cuirass.")
(provision '(cuirass))
@@ -192,7 +195,7 @@ (define (cuirass-shepherd-service config)
"--parameters="
parameters))
'())
- #$@extra-options)
+ #$@web-extra-options)
#:user #$user
#:group #$group
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#70285] [PATCH 2/3] services: cuirass: Add new configuration options.
2024-04-08 17:48 [bug#70285] [PATCH 0/3] Cuirass service config options work Ahmad Draidi via Guix-patches via
2024-04-08 17:54 ` [bug#70285] [PATCH 1/3] services: cuirass: Use separate extra options for cuirass web process Ahmad Draidi via Guix-patches via
@ 2024-04-08 17:54 ` Ahmad Draidi via Guix-patches via
2024-04-29 21:33 ` Ludovic Courtès
2024-04-08 17:54 ` [bug#70285] [PATCH 3/3] services: cuirass: Remove use-substitutes? configuration option Ahmad Draidi via Guix-patches via
2024-05-02 1:37 ` [bug#70285] [PATCH v2 1/3] services: cuirass: Use separate extra options for cuirass web process Ahmad Draidi via Guix-patches via
3 siblings, 1 reply; 10+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2024-04-08 17:54 UTC (permalink / raw)
To: 70285; +Cc: Ahmad Draidi
* gnu/services/cuirass.scm (<cuirass-configuration>): Add ttl and threads
fields.
(cuirass-shepherd-service): Handle the new options.
* doc/guix.texi (Continuous Integration): Document them.
Change-Id: I4387fbd7bf6766f4a54801f35c7ed82ce4eb9645
---
doc/guix.texi | 6 ++++++
gnu/services/cuirass.scm | 12 ++++++++++++
2 files changed, 18 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 77e17cb69c..90a6135882 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34368,6 +34368,12 @@ Continuous Integration
Number of seconds between the poll of the repositories followed by the
Cuirass jobs.
+@item @code{ttl} (default: @code{"30d"})
+Duration to keep build results' GC roots alive.
+
+@item @code{threads} (default: @code{#f})
+Number of kernel threads to use for Cuirass. The default value should be appropriate for most cases.
+
@item @code{parameters} (default: @code{#f})
Read parameters from the given @var{parameters} file. The supported
parameters are described here (@pxref{Parameters,,, cuirass, Cuirass}).
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index b09d5601d4..ac086dedb9 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -101,6 +101,10 @@ (define-record-type* <cuirass-configuration>
(default "cuirass"))
(interval cuirass-configuration-interval ;integer (seconds)
(default 60))
+ (ttl cuirass-configuration-ttl ;string
+ (default "30d"))
+ (threads cuirass-configuration-threads ;integer
+ (default #f))
(parameters cuirass-configuration-parameters ;string
(default #f))
(remote-server cuirass-configuration-remote-server
@@ -133,6 +137,8 @@ (define (cuirass-shepherd-service config)
(user (cuirass-configuration-user config))
(group (cuirass-configuration-group config))
(interval (cuirass-configuration-interval config))
+ (ttl (cuirass-configuration-ttl config))
+ (threads (cuirass-configuration-threads config))
(parameters (cuirass-configuration-parameters config))
(remote-server (cuirass-configuration-remote-server config))
(database (cuirass-configuration-database config))
@@ -159,6 +165,12 @@ (define (cuirass-shepherd-service config)
"--specifications" #$config-file
"--database" #$database
"--interval" #$(number->string interval)
+ "--ttl" #$ttl
+ #$@(if threads
+ (list (string-append
+ "--threads="
+ (number->string threads)))
+ '())
#$@(if parameters
(list (string-append
"--parameters="
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#70285] [PATCH 2/3] services: cuirass: Add new configuration options.
2024-04-08 17:54 ` [bug#70285] [PATCH 2/3] services: cuirass: Add new configuration options Ahmad Draidi via Guix-patches via
@ 2024-04-29 21:33 ` Ludovic Courtès
2024-05-02 1:36 ` Ahmad Draidi via Guix-patches via
0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2024-04-29 21:33 UTC (permalink / raw)
To: Ahmad Draidi; +Cc: 70285
Hi Ahmad,
Ahmad Draidi <a.r.draidi@redscript.org> skribis:
> * gnu/services/cuirass.scm (<cuirass-configuration>): Add ttl and threads
> fields.
> (cuirass-shepherd-service): Handle the new options.
> * doc/guix.texi (Continuous Integration): Document them.
[...]
> + (ttl cuirass-configuration-ttl ;string
> + (default "30d"))
For consistency with <guix-publish-configuration>, I would make it an
integer (number of seconds).
If that’s fine with you, could you send an updated patch or let me know
if I should make this change on your behalf?
The rest of the patch series looks good to me!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [bug#70285] [PATCH 3/3] services: cuirass: Remove use-substitutes? configuration option.
2024-04-08 17:48 [bug#70285] [PATCH 0/3] Cuirass service config options work Ahmad Draidi via Guix-patches via
2024-04-08 17:54 ` [bug#70285] [PATCH 1/3] services: cuirass: Use separate extra options for cuirass web process Ahmad Draidi via Guix-patches via
2024-04-08 17:54 ` [bug#70285] [PATCH 2/3] services: cuirass: Add new configuration options Ahmad Draidi via Guix-patches via
@ 2024-04-08 17:54 ` Ahmad Draidi via Guix-patches via
2024-05-02 1:37 ` [bug#70285] [PATCH v2 1/3] services: cuirass: Use separate extra options for cuirass web process Ahmad Draidi via Guix-patches via
3 siblings, 0 replies; 10+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2024-04-08 17:54 UTC (permalink / raw)
To: 70285; +Cc: Ahmad Draidi
As of Cuirass commit 9a1452ee021c9f773424961cfeef47ca0b7c5c5a, this option
seems to be unused and kept for back compatibility there.
* gnu/services/cuirass.scm (<cuirass-configuration>): Remove use-substitutes?
field.
(cuirass-shepherd-service): Remove the option.
* doc/guix.texi (Continuous Integration): Remove option documentation.
Change-Id: I933550ce76eecdf918b07891aa8212fd30a7c87e
---
doc/guix.texi | 4 ----
gnu/services/cuirass.scm | 4 ----
2 files changed, 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 90a6135882..cc55f48aea 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34400,10 +34400,6 @@ Continuous Integration
specifications records. The specification record is described in the
Cuirass manual (@pxref{Specifications,,, cuirass, Cuirass}).
-@item @code{use-substitutes?} (default: @code{#f})
-This allows using substitutes to avoid building every dependencies of a job
-from source.
-
@item @code{one-shot?} (default: @code{#f})
Only evaluate specifications and build derivations once.
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index ac086dedb9..0684c149c1 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -117,8 +117,6 @@ (define-record-type* <cuirass-configuration>
(default "localhost"))
(specifications cuirass-configuration-specifications)
;gexp that evaluates to specification-alist
- (use-substitutes? cuirass-configuration-use-substitutes? ;boolean
- (default #f))
(one-shot? cuirass-configuration-one-shot? ;boolean
(default #f))
(fallback? cuirass-configuration-fallback? ;boolean
@@ -147,7 +145,6 @@ (define (cuirass-shepherd-service config)
(config-file (scheme-file
"cuirass-specs.scm"
(cuirass-configuration-specifications config)))
- (use-substitutes? (cuirass-configuration-use-substitutes? config))
(one-shot? (cuirass-configuration-one-shot? config))
(fallback? (cuirass-configuration-fallback? config))
(extra-options (cuirass-configuration-extra-options config))
@@ -177,7 +174,6 @@ (define (cuirass-shepherd-service config)
parameters))
'())
#$@(if remote-server '("--build-remote") '())
- #$@(if use-substitutes? '("--use-substitutes") '())
#$@(if one-shot? '("--one-shot") '())
#$@(if fallback? '("--fallback") '())
#$@extra-options)
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#70285] [PATCH v2 1/3] services: cuirass: Use separate extra options for cuirass web process.
2024-04-08 17:48 [bug#70285] [PATCH 0/3] Cuirass service config options work Ahmad Draidi via Guix-patches via
` (2 preceding siblings ...)
2024-04-08 17:54 ` [bug#70285] [PATCH 3/3] services: cuirass: Remove use-substitutes? configuration option Ahmad Draidi via Guix-patches via
@ 2024-05-02 1:37 ` Ahmad Draidi via Guix-patches via
2024-05-02 1:37 ` [bug#70285] [PATCH v2 2/3] services: cuirass: Add new configuration options Ahmad Draidi via Guix-patches via
2024-05-02 1:37 ` [bug#70285] [PATCH v2 3/3] services: cuirass: Remove use-substitutes? configuration option Ahmad Draidi via Guix-patches via
3 siblings, 2 replies; 10+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2024-05-02 1:37 UTC (permalink / raw)
To: 70285; +Cc: Ahmad Draidi, ludo
Currently, "extra-options" is passed to both "cuirass register" and "cuirass
web" processes. This makes it impractical since the extra parameters have to
be intended for and supported by both processes.
* gnu/services/cuirass.scm (<cuirass-configuration>): Add a web-extra-options
field.
(cuirass-shepherd-service): Replace extra-options with web-extra-options for
cuirass web.
* doc/guix.texi (Continuous Integration): Document the changes.
Change-Id: Iba79c559ea8267aaf8f25248f3d18ed7b352cb60
---
v2 changes: None
doc/guix.texi | 5 ++++-
gnu/services/cuirass.scm | 7 +++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3f5d4e7f0d..f93fe7e474 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34465,7 +34465,10 @@ Continuous Integration
packages locally.
@item @code{extra-options} (default: @code{'()})
-Extra options to pass when running the Cuirass processes.
+Extra options to pass when running the @code{cuirass register} process.
+
+@item @code{web-extra-options} (default: @code{'()})
+Extra options to pass when running the @code{cuirass web} process.
@end table
@end deftp
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index bcdbffa2f3..b09d5601d4 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -120,6 +120,8 @@ (define-record-type* <cuirass-configuration>
(fallback? cuirass-configuration-fallback? ;boolean
(default #f))
(extra-options cuirass-configuration-extra-options
+ (default '()))
+ (web-extra-options cuirass-configuration-web-extra-options
(default '())))
(define (cuirass-shepherd-service config)
@@ -142,7 +144,8 @@ (define (cuirass-shepherd-service config)
(use-substitutes? (cuirass-configuration-use-substitutes? config))
(one-shot? (cuirass-configuration-one-shot? config))
(fallback? (cuirass-configuration-fallback? config))
- (extra-options (cuirass-configuration-extra-options config)))
+ (extra-options (cuirass-configuration-extra-options config))
+ (web-extra-options (cuirass-configuration-web-extra-options config)))
`(,(shepherd-service
(documentation "Run Cuirass.")
(provision '(cuirass))
@@ -192,7 +195,7 @@ (define (cuirass-shepherd-service config)
"--parameters="
parameters))
'())
- #$@extra-options)
+ #$@web-extra-options)
#:user #$user
#:group #$group
base-commit: 8bf41c80ef13ea57e834f4e23d649bd99a3e08fc
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#70285] [PATCH v2 2/3] services: cuirass: Add new configuration options.
2024-05-02 1:37 ` [bug#70285] [PATCH v2 1/3] services: cuirass: Use separate extra options for cuirass web process Ahmad Draidi via Guix-patches via
@ 2024-05-02 1:37 ` Ahmad Draidi via Guix-patches via
2024-05-02 1:37 ` [bug#70285] [PATCH v2 3/3] services: cuirass: Remove use-substitutes? configuration option Ahmad Draidi via Guix-patches via
1 sibling, 0 replies; 10+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2024-05-02 1:37 UTC (permalink / raw)
To: 70285; +Cc: Ahmad Draidi, ludo
* gnu/services/cuirass.scm (<cuirass-configuration>): Add ttl and threads
fields.
(cuirass-shepherd-service): Handle the new options.
* doc/guix.texi (Continuous Integration): Document them.
Change-Id: I4387fbd7bf6766f4a54801f35c7ed82ce4eb9645
---
v2 changes: Switch ttl field to seconds integer
doc/guix.texi | 6 ++++++
gnu/services/cuirass.scm | 17 +++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index f93fe7e474..1f97a2796e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34427,6 +34427,12 @@ Continuous Integration
Number of seconds between the poll of the repositories followed by the
Cuirass jobs.
+@item @code{ttl} (default: @code{2592000})
+Duration to keep build results' GC roots alive, in seconds.
+
+@item @code{threads} (default: @code{#f})
+Number of kernel threads to use for Cuirass. The default value should be appropriate for most cases.
+
@item @code{parameters} (default: @code{#f})
Read parameters from the given @var{parameters} file. The supported
parameters are described here (@pxref{Parameters,,, cuirass, Cuirass}).
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index b09d5601d4..f430c38a69 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -101,6 +101,10 @@ (define-record-type* <cuirass-configuration>
(default "cuirass"))
(interval cuirass-configuration-interval ;integer (seconds)
(default 60))
+ (ttl cuirass-configuration-ttl ;integer
+ (default 2592000))
+ (threads cuirass-configuration-threads ;integer
+ (default #f))
(parameters cuirass-configuration-parameters ;string
(default #f))
(remote-server cuirass-configuration-remote-server
@@ -133,6 +137,8 @@ (define (cuirass-shepherd-service config)
(user (cuirass-configuration-user config))
(group (cuirass-configuration-group config))
(interval (cuirass-configuration-interval config))
+ (ttl (cuirass-configuration-ttl config))
+ (threads (cuirass-configuration-threads config))
(parameters (cuirass-configuration-parameters config))
(remote-server (cuirass-configuration-remote-server config))
(database (cuirass-configuration-database config))
@@ -159,6 +165,17 @@ (define (cuirass-shepherd-service config)
"--specifications" #$config-file
"--database" #$database
"--interval" #$(number->string interval)
+ #$@(if ttl
+ (list (string-append
+ "--ttl="
+ (number->string ttl)
+ "s"))
+ '())
+ #$@(if threads
+ (list (string-append
+ "--threads="
+ (number->string threads)))
+ '())
#$@(if parameters
(list (string-append
"--parameters="
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [bug#70285] [PATCH v2 3/3] services: cuirass: Remove use-substitutes? configuration option.
2024-05-02 1:37 ` [bug#70285] [PATCH v2 1/3] services: cuirass: Use separate extra options for cuirass web process Ahmad Draidi via Guix-patches via
2024-05-02 1:37 ` [bug#70285] [PATCH v2 2/3] services: cuirass: Add new configuration options Ahmad Draidi via Guix-patches via
@ 2024-05-02 1:37 ` Ahmad Draidi via Guix-patches via
1 sibling, 0 replies; 10+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2024-05-02 1:37 UTC (permalink / raw)
To: 70285; +Cc: Ahmad Draidi, ludo
As of Cuirass commit 9a1452ee021c9f773424961cfeef47ca0b7c5c5a, this option
seems to be unused and kept for back compatibility there.
* gnu/services/cuirass.scm (<cuirass-configuration>): Remove use-substitutes?
field.
(cuirass-shepherd-service): Remove the option.
* doc/guix.texi (Continuous Integration): Remove option documentation.
Change-Id: I933550ce76eecdf918b07891aa8212fd30a7c87e
---
v2 changes: None
doc/guix.texi | 4 ----
gnu/services/cuirass.scm | 4 ----
2 files changed, 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 1f97a2796e..0ddf75693a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -34459,10 +34459,6 @@ Continuous Integration
specifications records. The specification record is described in the
Cuirass manual (@pxref{Specifications,,, cuirass, Cuirass}).
-@item @code{use-substitutes?} (default: @code{#f})
-This allows using substitutes to avoid building every dependencies of a job
-from source.
-
@item @code{one-shot?} (default: @code{#f})
Only evaluate specifications and build derivations once.
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index f430c38a69..f68b4dc5a2 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -117,8 +117,6 @@ (define-record-type* <cuirass-configuration>
(default "localhost"))
(specifications cuirass-configuration-specifications)
;gexp that evaluates to specification-alist
- (use-substitutes? cuirass-configuration-use-substitutes? ;boolean
- (default #f))
(one-shot? cuirass-configuration-one-shot? ;boolean
(default #f))
(fallback? cuirass-configuration-fallback? ;boolean
@@ -147,7 +145,6 @@ (define (cuirass-shepherd-service config)
(config-file (scheme-file
"cuirass-specs.scm"
(cuirass-configuration-specifications config)))
- (use-substitutes? (cuirass-configuration-use-substitutes? config))
(one-shot? (cuirass-configuration-one-shot? config))
(fallback? (cuirass-configuration-fallback? config))
(extra-options (cuirass-configuration-extra-options config))
@@ -182,7 +179,6 @@ (define (cuirass-shepherd-service config)
parameters))
'())
#$@(if remote-server '("--build-remote") '())
- #$@(if use-substitutes? '("--use-substitutes") '())
#$@(if one-shot? '("--one-shot") '())
#$@(if fallback? '("--fallback") '())
#$@extra-options)
--
2.41.0
^ permalink raw reply related [flat|nested] 10+ messages in thread