[pbs-devel] applied-series: [PATCH proxmox-backup v3 00/10] notifications: cleanup in preparation of overridable templates

Lukas Wagner l.wagner at proxmox.com
Wed Apr 2 15:27:16 CEST 2025



On  2025-04-02 14:45, Thomas Lamprecht wrote:
> Am 28.03.25 um 11:22 schrieb Lukas Wagner:> When the notification system was brought to PBS, the template strings
>> were moved to the template files as they were, without any changes.
>> The original templates were an implementation detail which were not
>> exposed to the user in any way.
>> They were bit inconsistent with regards to how template variables were
>> named (e.g. '{{datastore}}', '{{store}}', '{{job.store}}' for
>> referring to a datastore), as well es how variables/helpers 
>> were accessed ({{ var }} vs {{var}}).
>>
>> With [#6143] on the horizon, notification templates, template variables
>> and template helpers become part of our public API and as such
>> we should provide some stability guarantees for them.
> 
> Series seems alright to me, I'm just wondering a bit how that guarantee
> will look like? But probably better part of the series that is actually
> implementing [#6143].

I would suggest:
  - no backward-incompatible changes in minor upgrades
  - for breaking changes in major upgrades, implement some best-effort 
    checks in pbsXtoY/pveXtoY which check any custom templates for
    anything that will be changed/removed


Incompatible changes are:
  - removing variables
  - changing type/representation of variables (e.g. switching from number of bytes to KiB, etc.)
  - removing helpers
  - non-trivial changes to a helper's behavior
  - incompatible changes to the rendering engine (e.g. switching from Handlebars to something else)

Backward-compatible changes would be:
  - adding new template variables
  - adding new template helpers
  - adding new, optional parameters to existing helpers
  - trivial changes to helpers (hypothetical example: "1KiB" -> "1 KiB" for `{{ human-bytes 1024 }}`)


What do you think?

-- 
- Lukas





More information about the pbs-devel mailing list