From: Lukas Wagner <l.wagner@proxmox.com>
To: Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>,
Philipp Hufnagl <p.hufnagl@proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup v3 1/3] fix #4315: jobs: modify GroupFilter so include/exclude is tracked
Date: Tue, 28 Nov 2023 13:52:35 +0100 [thread overview]
Message-ID: <0ab5578c-5224-4497-bea4-56e8f78a88e9@proxmox.com> (raw)
In-Reply-To: <20231128104022.240113-2-p.hufnagl@proxmox.com>
On 11/28/23 11:40, Philipp Hufnagl wrote:
> After some discussion I canged the include/exclude behavior to first run
> all include filter and after that all exclude filter (rather then
> allowing to alternate inbetween). This is simply done by sorting the
> list (include first) before executing it.
>
> Since a GroupFilter now also features an behavior, the Struct has been
> renamed To GroupType (since simply type is a keyword). The new
> GroupFilter now has a behaviour as a flag 'is_exclude'.
>
> I considered calling it 'is_include' but a reader later then might not
> know what the opposite of 'include' is (do not include? deactivate?). I
> also considered making a new enum 'behaviour' but since there are only 2
> values I considered it over engeneered.
>
> Matching a filter will now iterate with a forech loop in order to also
> exclude matches.
>
Already discussed off-list, but it seems like the case 'no include
filters, but some exclude filters' does not yet work as expected.
Intuitively, I would expect that the excludes are 'subtracted' from ALL
groups then, but right now in that case no groups will be synced.
--
- Lukas
next prev parent reply other threads:[~2023-11-28 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-28 10:40 [pbs-devel] [PATCH proxmox-backup v3 0/3] [PATCH proxmox-backup v2 0/3] fix #4315: datastore: Exclude entries from sync Philipp Hufnagl
2023-11-28 10:40 ` [pbs-devel] [PATCH proxmox-backup v3 1/3] fix #4315: jobs: modify GroupFilter so include/exclude is tracked Philipp Hufnagl
2023-11-28 12:52 ` Lukas Wagner [this message]
2023-11-28 10:40 ` [pbs-devel] [PATCH proxmox-backup v3 2/3] ui: Show if Filter includes or excludes Philipp Hufnagl
2023-11-28 13:49 ` Dominik Csapak
2023-11-30 7:21 ` Philipp Hufnagl
2023-11-28 10:40 ` [pbs-devel] [PATCH proxmox-backup v3 3/3] docs: document new include/exclude paramenter Philipp Hufnagl
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=0ab5578c-5224-4497-bea4-56e8f78a88e9@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=p.hufnagl@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