GNU bug report logs -
#44193
[PATCH 0/1] 'guix publish --cache' can publish items not yet cached
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sat, 24 Oct 2020 14:50:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi!
Miguel Ángel Arruga Vivas <rosen644835 <at> gmail.com> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>> Thus, the first narinfo request for an item would always return 404;
>> one would have to wait until the item is baked to get 200 and download
>> the substitute.
>
> I'd argue that returning unconditionally the 404 is a problem. If the
> nar is getting baked, I guess that a 202[1] would be the appropriate
> answer, and I'd leave the 404 for invalid store paths[2]. This way the
> client could implement more policies: the classic timeout, but also, for
> example, it might check other servers before checking once again if
> nobody else has it, or directly wait until a 404 is reached. WDYT?
Indeed, 202 seems more appropriate (and it’s precisely half of 404, that
tells something!).
Unfortunately (guix scripts substitute) currently explicitly checks for
404 and 200 and considers anything else to be a transient error with a
default TTL (in ‘handle-narinfo-response’). So we would need to adapt
that first and then wait until some time has passed before ‘guix
publish’ can return 202. :-/
I guess we can change (guix scripts substitute) with that in mind
already. WDYT?
Ludo’.
This bug report was last modified 4 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.