'guix publish' is unable to serve narinfos for dead items

  • Done
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
important
L
L
Ludovic Courtès wrote on 28 Dec 2018 22:49
(name . Bug Guix)(address . bug-guix@gnu.org)
87k1jt8gop.fsf@gnu.org
Hello,

‘render-narinfo/cached’ in ‘guix publish’ uses ‘hash-part->path’ to go
from /xyz.narinfo to, say, /gnu/store/xyz-guile-2.2.4.

The problem is that ‘hash-part->path’ is an RPC that works only if xyz
corresponds to a live item; in other cases, it returns the empty
string. Consequently, if /gnu/store/xyz-guile-2.2.4 has been GC’d,
‘guix publish’ returns 404 for /xyz.narinfo, even if it actually has the
narinfo somewhere in cache.

This defeats the intended behavior of ‘--cache’ and ‘--ttl’.

Ludo’.
L
L
Ludovic Courtès wrote on 9 Jan 2019 21:32
control message for bug #33897
(address . control@debbugs.gnu.org)
87lg3t3733.fsf@gnu.org
severity 33897 important
L
L
Ludovic Courtès wrote on 26 May 2019 01:37
Re: bug#33897: 'guix publish' is unable to serve narinfos for dead items
(address . 33897-done@debbugs.gnu.org)
87r28mnm0s.fsf@gnu.org
Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (11 lines)
> ‘render-narinfo/cached’ in ‘guix publish’ uses ‘hash-part->path’ to go
> from /xyz.narinfo to, say, /gnu/store/xyz-guile-2.2.4.
>
> The problem is that ‘hash-part->path’ is an RPC that works only if xyz
> corresponds to a live item; in other cases, it returns the empty
> string. Consequently, if /gnu/store/xyz-guile-2.2.4 has been GC’d,
> ‘guix publish’ returns 404 for /xyz.narinfo, even if it actually has the
> narinfo somewhere in cache.
>
> This defeats the intended behavior of ‘--cache’ and ‘--ttl’.

Fixed in 493375cdb23fc1416348da584f17bec7171faadd.

Ludo’.
Closed
?