GNU bug report logs -
#53384
[PATCH] services: guix-publish: Add negative-ttl parameter.
Previous Next
Reported by: Guillaume Le Vaillant <glv <at> posteo.net>
Date: Thu, 20 Jan 2022 10:06:02 UTC
Severity: normal
Tags: patch
Done: Guillaume Le Vaillant <glv <at> posteo.net>
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 53384 in the body.
You can then email your comments to 53384 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#53384
; Package
guix-patches
.
(Thu, 20 Jan 2022 10:06:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Guillaume Le Vaillant <glv <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 20 Jan 2022 10:06:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/services/base.scm (guix-publish-configuration): Add 'negative-ttl'
field.
(guix-publish-sheperd-service): Process it.
* doc/guix.texi (Base Services)[guix-publish-service-type]: Add item for
negative-ttl.
---
doc/guix.texi | 7 ++++++-
gnu/services/base.scm | 15 ++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 28eaf8338c..912a8e3c5a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -69,7 +69,7 @@ Copyright @copyright{} 2019 Ivan Petkov@*
Copyright @copyright{} 2019 Jakob L. Kreuze@*
Copyright @copyright{} 2019 Kyle Andrews@*
Copyright @copyright{} 2019 Alex Griffin@*
-Copyright @copyright{} 2019, 2020, 2021 Guillaume Le Vaillant@*
+Copyright @copyright{} 2019, 2020, 2021, 2022 Guillaume Le Vaillant@*
Copyright @copyright{} 2020 Liliana Marie Prikler@*
Copyright @copyright{} 2019, 2020, 2021, 2022 Simon Tournier@*
Copyright @copyright{} 2020 Wiktor Żelazny@*
@@ -16888,6 +16888,11 @@ cache miss. @xref{Invoking guix publish,
When it is an integer, this denotes the @dfn{time-to-live} in seconds
of the published archives. @xref{Invoking guix publish, @option{--ttl}},
for more information.
+
+@item @code{negative-ttl} (default: @code{#f})
+When it is an integer, this denotes the @dfn{time-to-live} in
+seconds for the negative lookups. @xref{Invoking guix publish,
+@option{--negative-ttl}}, for more information.
@end table
@end deftp
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 345e0ca0f7..fbd01e84d6 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2021 qblade <qblade <at> protonmail.com>
;;; Copyright © 2021 Hui Lu <luhuins <at> 163.com>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2022 Guillaume Le Vaillant <glv <at> posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -196,6 +197,7 @@ (define-module (gnu services base)
guix-publish-configuration-nar-path
guix-publish-configuration-cache
guix-publish-configuration-ttl
+ guix-publish-configuration-negative-ttl
guix-publish-service-type
gpm-configuration
@@ -1828,7 +1830,9 @@ (define-record-type* <guix-publish-configuration>
(workers guix-publish-configuration-workers ;#f | integer
(default #f))
(ttl guix-publish-configuration-ttl ;#f | integer
- (default #f)))
+ (default #f))
+ (negative-ttl guix-publish-configuration-negative-ttl ;#f | integer
+ (default #f)))
(define-deprecated (guix-publish-configuration-compression-level config)
"Return a compression level, the old way."
@@ -1863,8 +1867,8 @@ (define (config->compression-options config)
lst))))
(match-record config <guix-publish-configuration>
- (guix port host nar-path cache workers ttl cache-bypass-threshold
- advertise?)
+ (guix port host nar-path cache workers ttl negative-ttl
+ cache-bypass-threshold advertise?)
(list (shepherd-service
(provision '(guix-publish))
(requirement `(user-processes
@@ -1890,6 +1894,11 @@ (define (config->compression-options config)
#$(number->string ttl)
"s"))
#~())
+ #$@(if negative-ttl
+ #~((string-append "--negative-ttl="
+ #$(number->string negative-ttl)
+ "s"))
+ #~())
#$@(if cache
#~((string-append "--cache=" #$cache)
#$(string-append
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#53384
; Package
guix-patches
.
(Thu, 20 Jan 2022 13:24:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 53384 <at> debbugs.gnu.org (full text, mbox):
Hello Guillaume,
> * gnu/services/base.scm (guix-publish-configuration): Add 'negative-ttl'
> field.
> (guix-publish-sheperd-service): Process it.
> * doc/guix.texi (Base Services)[guix-publish-service-type]: Add item for
> negative-ttl.
This looks fine, feel free to go ahead.
Thanks,
Mathieu
Reply sent
to
Guillaume Le Vaillant <glv <at> posteo.net>
:
You have taken responsibility.
(Thu, 20 Jan 2022 14:00:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Guillaume Le Vaillant <glv <at> posteo.net>
:
bug acknowledged by developer.
(Thu, 20 Jan 2022 14:00:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 53384-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mathieu Othacehe <othacehe <at> gnu.org> skribis:
> Hello Guillaume,
>
>> * gnu/services/base.scm (guix-publish-configuration): Add 'negative-ttl'
>> field.
>> (guix-publish-sheperd-service): Process it.
>> * doc/guix.texi (Base Services)[guix-publish-service-type]: Add item for
>> negative-ttl.
>
> This looks fine, feel free to go ahead.
>
> Thanks,
>
> Mathieu
Thanks for the review.
Pushed as 1aa269d1d74a7b53ed705def5a8db79fbccb5ce3.
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 18 Feb 2022 12:24:14 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.