[pbs-devel] [PATCH proxmox-backup v3 1/3] fix #4315: jobs: modify GroupFilter so include/exclude is tracked

Lukas Wagner l.wagner at proxmox.com
Tue Nov 28 13:52:35 CET 2023


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





More information about the pbs-devel mailing list