Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Fiona Ebner
Am 19.04.24 um 12:09 schrieb Fiona Ebner:
>>
> 
> Versioned breaks required:
> - new pve-cluster will break old pve-manager and old pve-ha-manager
> - new libproxmox-rs-perl/libpve-rs-perl will break old pve-cluster
> 

Since I got myself confused for a moment when re-installing and it never
hurts to avoid confusion: the relevant package is libpve-notify-perl
(which lives in the pve-cluster repo)


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



Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Lukas Wagner


On  2024-04-19 13:22, Fabian Grünbichler wrote:
> On April 19, 2024 12:09 pm, Fiona Ebner wrote:
>> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>>> Bumps/dependencies:
>>>   - proxmox_notify
>>>   - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_notify)
>>>   - libpve-notify-perl  (needs bumped 
>>> libproxmox-rs-perl/libpve-rs-perl)
>>>   - pve-ha-manager (needs bumped libpve-notify-perl)
>>>   - pve-manager (needs bumped libpve-notify-perl)
>>>   - proxmox-mail-forward (optional. should not be affected by any 
>>> changes, but I think
>>> it should be also be bumped for any larger proxmox_notify changes 
>>> to avoid any
>>> weird hidden regressions due to mismatches of proxmox_notify
>>>
>>
>> Versioned breaks required:
>> - new pve-cluster will break old pve-manager and old pve-ha-manager
>> - new libproxmox-rs-perl/libpve-rs-perl will break old pve-cluster
>>
>> Still not too sure about putting the templates in
>> /usr/share/proxmox-ve/, but maybe @Thomas or @Fabian can chime in on that.
> 
> without in-depth look at all the changes in this series, I think it
> would make most sense for the package shipping (most?) templates to
> "own" the dir where they are shipped. that seems to be pve-manager, so
> maybe /usr/share/pve-manager would be an okay fit?
> 

Okay, I think I'll just use pve-manager then.

Thanks!

-- 
- Lukas


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


Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Fabian Grünbichler
On April 19, 2024 12:09 pm, Fiona Ebner wrote:
> Am 09.04.24 um 15:25 schrieb Lukas Wagner:
>> Bumps/dependencies:
>>   - proxmox_notify
>>   - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_notify)
>>   - libpve-notify-perl  (needs bumped 
>> libproxmox-rs-perl/libpve-rs-perl)
>>   - pve-ha-manager (needs bumped libpve-notify-perl)
>>   - pve-manager (needs bumped libpve-notify-perl)
>>   - proxmox-mail-forward (optional. should not be affected by any 
>> changes, but I think
>> it should be also be bumped for any larger proxmox_notify changes to 
>> avoid any
>> weird hidden regressions due to mismatches of proxmox_notify
>> 
> 
> Versioned breaks required:
> - new pve-cluster will break old pve-manager and old pve-ha-manager
> - new libproxmox-rs-perl/libpve-rs-perl will break old pve-cluster
> 
> Still not too sure about putting the templates in
> /usr/share/proxmox-ve/, but maybe @Thomas or @Fabian can chime in on that.

without in-depth look at all the changes in this series, I think it
would make most sense for the package shipping (most?) templates to
"own" the dir where they are shipped. that seems to be pve-manager, so
maybe /usr/share/pve-manager would be an okay fit?

or, if we want to avoid having "pve-manager" there, we could of course
also create /usr/share/pve or /usr/lib/pve or one of those with
"proxmox" instead of "pve", and have that owned by pve-manager..

I dislike proxmox-ve
- it might not be the case that it is always installed, which means
  potential pitfalls for such non-standard systems or if we ever make it
  optional like we did for PMG/PBS (granted, not very likely, but
  still..)
- normally the /usr/share/$package dir should only be used by $package


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



Re: [pve-devel] [PATCH many 00/19] notifications: move template strings to template files; PBS preparations

2024-04-19 Thread Fiona Ebner
Am 09.04.24 um 15:25 schrieb Lukas Wagner:
> The notification system uses handlebar templates to render the subject
> and the body of notifications. Previously, the template strings were
> defined inline at the call site. This patch series extracts the templates
> into template files and installs them at
>   /usr/share/proxmox-ve/templates/default
> 
> where they stored as -{body,subject}.{txt,html}.hbs
> 
> The 'default' part in the path is a preparation for translated
> notifications and/or overridable notification templates.
> Future work could provide notifications translated to e.g. German
> in `templates/de` or similar. This will be a first for having
> translated strings on the backend-side, so there is need for further
> research.
> 
> The patches for `proxmox` also include some preparatory patches for
> the upcoming integration of the notification system into PBS. They
> are not needed for PVE, but I included them here since Folke and I
> tested the PVE changes with them applied. IMO they should just be
> applied with the same version bump.
> The list of optional, preparatory patches is:
>   notify: give each notification a unique ID
>   notify: api: add get_targets
>   notify: derive `api` for Deleteable*Property
>   notify: derive Deserialize/Serialize for Notification struct
>   notify: pbs context: include nodename in default sendmail author
>   notify: renderer: add relative-percentage helper from PBS
> 
> Folke kindly did some off-list testing before this was posted, hence
> his T-bs were included.
> 
> Bumps/dependencies:
>   - proxmox_notify
>   - libproxmox-rs-perl/libpve-rs-perl (needs bumped proxmox_notify)
>   - libpve-notify-perl  (needs bumped 
> libproxmox-rs-perl/libpve-rs-perl)
>   - pve-ha-manager (needs bumped libpve-notify-perl)
>   - pve-manager (needs bumped libpve-notify-perl)
>   - proxmox-mail-forward (optional. should not be affected by any 
> changes, but I think
> it should be also be bumped for any larger proxmox_notify changes to 
> avoid any
> weird hidden regressions due to mismatches of proxmox_notify
> 

Versioned breaks required:
- new pve-cluster will break old pve-manager and old pve-ha-manager
- new libproxmox-rs-perl/libpve-rs-perl will break old pve-cluster

Still not too sure about putting the templates in
/usr/share/proxmox-ve/, but maybe @Thomas or @Fabian can chime in on that.

While I'm rather unfamiliar with the code and not much into Rust,
everything looked good to me (just a few nits). So, with a grain of salt:

Reviewed-by: Fiona Ebner 


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