[PATCH consfigurator v2 2/2] GPG: handle missing file separately to subprocess errors
Russell Sim
rsl at simopolis.xyz
Tue Oct 4 15:28:15 BST 2022
Sean Whitton <spwhitton at spwhitton.name> writes:
> On Sun 25 Sep 2022 at 08:38PM +02, Russell Sim wrote:
>
>> There is a special case when running on remote machines where we might want to
>> handle missing data sources and skip them, so we must raise the
>> MISSING-DATA-SOURCE condition if the source is missing.
>>
>> Providing this functionality for READ-STORE created a discrepancy where
>> SUBPROCESS-ERROR's were wrapped differently depending on if you called
>> PUT-STORE or READ-STORE. Handling the missing case explicitly allows us to
>> pass the GPG-ERROR directly without needing to re-wrap it in the case where
>> the file is missing.
>
> I'm struggling to understand the purpose of this patch based on your
> description. Could you give a few examples, perhaps?
Without this patch then all the useful information from the subprocess
is discarded and the condition is replaced with a MISSING-DATA-SOURCE
condition, which has no slot for the stdout.
> I don't know exactly what you mean when you say "remote machine", but it
> seems worth noting that data sources are never accessed except in the
> root Lisp -- see the long comment in CONTINUE-DEPLOY*-PROGRAM.
Ah, that was the source of my confusion, that comment mentions how
things were done and how they are done. That tripped me up.
This is combined with documentation for REGISTER-DATA-SOURCE string that
also mentions special behaviour for the MISSING-DATA-SOURCE condition.
But judging by the CONTINUE-DEPLOY*-PROGRAM comment, this special
behaviour doesn't exist?
Is there any reason to raise this MISSING-DATA-SOURCE condition if its'
not handled in any special way? I could remove it entirely from
GPG-FILE-AS-STRING?
Do you see a future for the MISSING-DATA-SOURCE condition? I don't have
enough knowledge of the code base to make a call on that yet.
More information about the sgo-software-discuss
mailing list