public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Gabriel Goller <g.goller@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v4] fix #4343: updated `view_task_result` to bail on task failure
Date: Wed, 27 Sep 2023 18:24:03 +0200	[thread overview]
Message-ID: <4538cc96-e812-48b0-98b6-a95c6dd2ad5a@proxmox.com> (raw)
In-Reply-To: <9c7b7ca7-f14e-45f9-b2eb-c24a411f9ed3@proxmox.com>

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@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...).

thanks!




      reply	other threads:[~2023-09-27 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 15:32 Gabriel Goller
2023-09-27 15:44 ` Thomas Lamprecht
2023-09-27 16:24   ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4538cc96-e812-48b0-98b6-a95c6dd2ad5a@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal