[pbs-devel] [PATCH proxmox-backup v4] fix #4343: updated `view_task_result` to bail on task failure

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Sep 27 18:24:03 CEST 2023

Am 27/09/2023 um 17:44 schrieb Thomas Lamprecht:
> Am 27/09/2023 um 17:32 schrieb Gabriel Goller:
>> Now we make an additional request on `api2/json/.../tasks/{upid}/status` to
>> get the `exitstatus` of the task. This allows us to `bail` and thus
>> get a non-zero exit code in the cli.
>> Signed-off-by: Gabriel Goller <g.goller at proxmox.com>
>> ---
>> changes v3:
>>  - use exit code 0 (SUCCESS) on warning
> note that v3 was applied already, so you'd need to send the changes
> on top of that, i.e., rebase this to current master.

FYI: I've done so now myself so that I can do the bump still today.
I also added a follow-up that (mostly) switches out the inner `if` with a
`match` and also fails in the case that there's no `exitstatus` returned
by the API, which should not happen for tasks that are reported as `stopped`
(I forgot to mention the last part in the commit message...).


More information about the pbs-devel mailing list