public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>,
	Alexander Zeidler <a.zeidler@proxmox.com>
Subject: Re: [pbs-devel] applied-series: [PATCH proxmox-backup v3 00/10] notifications: cleanup in preparation of overridable templates
Date: Wed, 2 Apr 2025 15:27:16 +0200	[thread overview]
Message-ID: <b747eae5-0a10-4219-b32e-9ac692443be6@proxmox.com> (raw)
In-Reply-To: <f6dbcec7-1d88-428f-9001-a9625dd5e302@proxmox.com>



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



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


  reply	other threads:[~2025-04-02 13:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28 10:22 [pbs-devel] " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 01/10] notifications: move make notifications module a dir-style module Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 02/10] notifications: add type for GC notification template data Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 03/10] notifications: add type for ACME " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 04/10] notifications: add type for APT " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 05/10] notifications: add type for prune " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 06/10] notifications: add type for sync " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 07/10] notifications: add type for tape backup " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 08/10] notifications: add type for tape load " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 09/10] notifications: add type for verify " Lukas Wagner
2025-03-28 10:22 ` [pbs-devel] [PATCH proxmox-backup v3 10/10] notifications: remove HTML template for test notification Lukas Wagner
2025-04-02 12:45 ` [pbs-devel] applied-series: [PATCH proxmox-backup v3 00/10] notifications: cleanup in preparation of overridable templates Thomas Lamprecht
2025-04-02 13:27   ` Lukas Wagner [this message]
2025-04-02 14:33     ` Thomas Lamprecht
2025-04-03 10:50       ` Lukas Wagner

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=b747eae5-0a10-4219-b32e-9ac692443be6@proxmox.com \
    --to=l.wagner@proxmox.com \
    --cc=a.zeidler@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=t.lamprecht@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal