public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>,
	Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 1/2] api types: version: add helper for min version checks
Date: Thu, 28 Nov 2024 14:50:20 +0100	[thread overview]
Message-ID: <487f125e-88d3-46e6-827d-5e665298b91d@proxmox.com> (raw)
In-Reply-To: <95f86bb4-96c9-4bf4-8343-b6996ce72479@proxmox.com>

Am 28.11.24 um 14:49 schrieb Christian Ebner:
> On 11/28/24 14:18, Thomas Lamprecht wrote:
>> Am 28.11.24 um 14:14 schrieb Christian Ebner:
>>> On 11/28/24 14:10, Thomas Lamprecht wrote:
>>>> Why not impl the Ord trait here instead?
>>>>
>>>> Then the call-site could be
>>>>
>>>> let supports_prune_delete_stats = api_version >= ApiVersion::new(3, 2, 11, String::new());
>>>
>>> Ah, yes that's way nicer and allows also for exact version matching.
>>>
>>>> And maybe a separate type for the triple without the commit hash on which you
>>>> also impl the same and then avoid that slightly confusing String::new() hack.
>>>
>>> Acked, will send a new version incorporating your feedback, thanks!
>>>
>>
>> Note that while I'm quite sure of the first thing the last thing was just a
>> idea from top of my head, not sure how much it improves,  but maybe having
>> a separate VersionTriple or SemanticVersion type might make a few things nicer
>> to use.
> 
> Okay, well I was rather opting for dropping the `repoid` from 
> `ApiVersion` instead of introducing another type, as that is currently 
> not used and was just included for completeness. The `repoid` can 
> already be obtained directly from the `ApiVersionInfo`, returned by the 
> version api endpoint so this information is redundant anyways.

It sounds like you checked out surrounding code more closely, I did not,
so it's probably better to go with your idea for now.


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


  reply	other threads:[~2024-11-28 13:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28 12:49 Christian Ebner
2024-11-28 12:49 ` [pbs-devel] [PATCH proxmox-backup 2/2] sync: push: use min version helper for api compatibility checks Christian Ebner
2024-11-28 13:10 ` [pbs-devel] [PATCH proxmox-backup 1/2] api types: version: add helper for min version checks Thomas Lamprecht
2024-11-28 13:14   ` Christian Ebner
2024-11-28 13:18     ` Thomas Lamprecht
2024-11-28 13:49       ` Christian Ebner
2024-11-28 13:50         ` Thomas Lamprecht [this message]
2024-11-28 16:09 ` Christian Ebner

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=487f125e-88d3-46e6-827d-5e665298b91d@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=c.ebner@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