From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Christian Ebner <c.ebner@proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH v3 proxmox-backup 2/5] api types: introduce `BackupArchiveName` type
Date: Mon, 04 Nov 2024 13:23:08 +0100 [thread overview]
Message-ID: <1730722831.b39roa1gvp.astroid@yuna.none> (raw)
In-Reply-To: <5db8c8fe-7730-48ec-b4b2-e9d671434994@proxmox.com>
On November 4, 2024 12:56 pm, Christian Ebner wrote:
> On 10/25/24 14:15, Fabian Grünbichler wrote:
>> On October 24, 2024 10:01 am, Christian Ebner wrote:
>>> Introduces a dedicated wrapper type to be used for backup archive
>>> names instead of plain strings and associated helper methods for
>>> archive type checks and archive name mappings.
>>>
>>> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
>>
>>> + } else {
>>> + Ok((format!("{archive_name}.blob"), ArchiveType::Blob))
>>
>> this last catchall here might be a bit dangerous? it basically makes the
>> introduction of a new archive type collide with any existing blobs that
>> happen to have a file name that ends with that new archive type..
>
> This is true, but we already have that exact same mapping currently in
> use (see patch 4, which drops the pre-existing helper). But that was
> arguably more limited in scope.
>
> So maybe we might keep the pre-existing helper here instead of
> implementing `parse_archive_type` for the API type directly?
yeah, that old helper was only used in a single place - the
`proxmox-backup-client restore ..` command. so I guess we need to
special case this there if we want to avoid extending that catchall
fallback to everywhere?
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-11-04 12:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-24 8:01 [pbs-devel] [PATCH v3 proxmox-backup 0/5] introduce dedcated archive name api type Christian Ebner
2024-10-24 8:01 ` [pbs-devel] [PATCH v3 proxmox-backup 1/5] datastore: move `ArchiveType` to api types Christian Ebner
2024-10-24 8:01 ` [pbs-devel] [PATCH v3 proxmox-backup 2/5] api types: introduce `BackupArchiveName` type Christian Ebner
2024-10-25 12:15 ` Fabian Grünbichler
2024-11-04 11:56 ` Christian Ebner
2024-11-04 12:23 ` Fabian Grünbichler [this message]
2024-10-24 8:01 ` [pbs-devel] [PATCH v3 proxmox-backup 3/5] client/server: use dedicated api type for all archive names Christian Ebner
2024-10-24 8:01 ` [pbs-devel] [PATCH v3 proxmox-backup 4/5] client: drop unused parse_archive_type helper Christian Ebner
2024-10-24 8:01 ` [pbs-devel] [PATCH v3 proxmox-backup 5/5] api types: add unit tests for backup archive name parsing Christian Ebner
2024-10-24 9:21 ` [pbs-devel] [PATCH v3 proxmox-backup 0/5] introduce dedcated archive name api type Gabriel Goller
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=1730722831.b39roa1gvp.astroid@yuna.none \
--to=f.gruenbichler@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.