public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 2/4] api2: DataStoreListItem add maintenance info
Date: Tue, 19 Apr 2022 13:19:27 +0200	[thread overview]
Message-ID: <1650366281.ioxite7lfe.astroid@nora.none> (raw)
In-Reply-To: <20220415072817.14768-3-h.laimer@proxmox.com>

On April 15, 2022 9:28 am, Hannes Laimer wrote:
> Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
> ---
>  pbs-api-types/src/datastore.rs | 5 +++++
>  src/api2/admin/datastore.rs    | 1 +
>  2 files changed, 6 insertions(+)
> 
> diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs
> index 01e2319a..0fc5622e 100644
> --- a/pbs-api-types/src/datastore.rs
> +++ b/pbs-api-types/src/datastore.rs
> @@ -330,6 +330,9 @@ impl DataStoreConfig {
>              optional: true,
>              schema: SINGLE_LINE_COMMENT_SCHEMA,
>          },
> +        maintenance: {
> +            type: bool,
> +        }

this breaks remote scanning (of old remotes on new systems) - in this 
case annotating it with a (serde) default of false seems sensible (if 
the field is missing, it can only be because the other side doesn't have 
maintenance mode yet, so it can be treated as 'no maintenance mode'). in 
other cases wrapping a newly introduced field in an Option<> might make 
more sense.

in general when changing API things (including return value schema) 
backwards-compatibility should be kept in mind, even though we don't 
have clusters in PBS we do have:
- sync/pull/remote between different versions of PBS
- pbs-client accessing pbs-server with version mismatch
- qemu-lib accessing pbs-server with version mismatch
- third-party clients accessing pbs-server

none of that should break with regular upgrades unless there is a very 
good reason.




  reply	other threads:[~2022-04-19 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15  7:28 [pbs-devel] [PATCH proxmox-backup 0/4] improve ui for maintenance mode Hannes Laimer
2022-04-15  7:28 ` [pbs-devel] [PATCH proxmox-backup 1/4] ui: add summary mask when in " Hannes Laimer
2022-04-25  6:27   ` Thomas Lamprecht
2022-04-15  7:28 ` [pbs-devel] [PATCH proxmox-backup 2/4] api2: DataStoreListItem add maintenance info Hannes Laimer
2022-04-19 11:19   ` Fabian Grünbichler [this message]
2022-04-25  6:31   ` Thomas Lamprecht
2022-04-15  7:28 ` [pbs-devel] [PATCH proxmox-backup 3/4] ui: update icon in datastore list when in maintenance mode Hannes Laimer
2022-04-15  7:28 ` [pbs-devel] [PATCH proxmox-backup 4/4][optional] ui: update datastore list more often Hannes Laimer

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=1650366281.ioxite7lfe.astroid@nora.none \
    --to=f.gruenbichler@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