* [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional
@ 2025-11-13 11:40 Shannon Sterz
2025-11-13 12:16 ` Thomas Lamprecht
2025-11-13 12:55 ` [pbs-devel] Superseded: " Shannon Sterz
0 siblings, 2 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-11-13 11:40 UTC (permalink / raw)
To: pbs-devel
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
src/server/notifications/template_data.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/server/notifications/template_data.rs b/src/server/notifications/template_data.rs
index 0dcc5ed3..9adc4699 100644
--- a/src/server/notifications/template_data.rs
+++ b/src/server/notifications/template_data.rs
@@ -177,7 +177,7 @@ impl PackageUpdatesTemplateData {
.map(|info| UpgradablePackage {
package_name: info.package.clone(),
available_version: info.version.clone(),
- installed_version: info.old_version.clone(),
+ installed_version: info.old_version.clone().unwrap_or_default(),
})
.collect(),
}
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional
2025-11-13 11:40 [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional Shannon Sterz
@ 2025-11-13 12:16 ` Thomas Lamprecht
2025-11-13 12:45 ` Shannon Sterz
2025-11-13 12:47 ` Lukas Wagner
2025-11-13 12:55 ` [pbs-devel] Superseded: " Shannon Sterz
1 sibling, 2 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2025-11-13 12:16 UTC (permalink / raw)
To: Proxmox Backup Server development discussion, Shannon Sterz; +Cc: Lukas Wagner
Am 13.11.25 um 12:40 schrieb Shannon Sterz:
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
> src/server/notifications/template_data.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/server/notifications/template_data.rs b/src/server/notifications/template_data.rs
> index 0dcc5ed3..9adc4699 100644
> --- a/src/server/notifications/template_data.rs
> +++ b/src/server/notifications/template_data.rs
> @@ -177,7 +177,7 @@ impl PackageUpdatesTemplateData {
> .map(|info| UpgradablePackage {
> package_name: info.package.clone(),
> available_version: info.version.clone(),
> - installed_version: info.old_version.clone(),
> + installed_version: info.old_version.clone().unwrap_or_default(),
> })
> .collect(),
> }
What about adapting installed_version to reality and make it also an
option? I mean, depends a bit on how handlebars will handle such things
then, and also how willing we're adopting light breakage if it fixes
wrong historic assumptions.
Our shipped template for this default/package-updates-body.txt.hbs should
be updated in any case though, maybe special case the no installed_version,
be that None or "", and add a NEW or something like that there.
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional
2025-11-13 12:16 ` Thomas Lamprecht
@ 2025-11-13 12:45 ` Shannon Sterz
2025-11-13 12:47 ` Lukas Wagner
1 sibling, 0 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-11-13 12:45 UTC (permalink / raw)
To: Thomas Lamprecht
Cc: Thomas Lamprecht, Proxmox Backup Server development discussion
On Thu Nov 13, 2025 at 1:16 PM CET, Thomas Lamprecht wrote:
> Am 13.11.25 um 12:40 schrieb Shannon Sterz:
>> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
>> ---
>> src/server/notifications/template_data.rs | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/server/notifications/template_data.rs b/src/server/notifications/template_data.rs
>> index 0dcc5ed3..9adc4699 100644
>> --- a/src/server/notifications/template_data.rs
>> +++ b/src/server/notifications/template_data.rs
>> @@ -177,7 +177,7 @@ impl PackageUpdatesTemplateData {
>> .map(|info| UpgradablePackage {
>> package_name: info.package.clone(),
>> available_version: info.version.clone(),
>> - installed_version: info.old_version.clone(),
>> + installed_version: info.old_version.clone().unwrap_or_default(),
>> })
>> .collect(),
>> }
>
> What about adapting installed_version to reality and make it also an
> option? I mean, depends a bit on how handlebars will handle such things
> then, and also how willing we're adopting light breakage if it fixes
> wrong historic assumptions.
>
> Our shipped template for this default/package-updates-body.txt.hbs should
> be updated in any case though, maybe special case the no installed_version,
> be that None or "", and add a NEW or something like that there.
sure, also just noticed that the update scripts for pbs also need to be
adapted here. will do a v2 in a minute with these changes folded in.
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional
2025-11-13 12:16 ` Thomas Lamprecht
2025-11-13 12:45 ` Shannon Sterz
@ 2025-11-13 12:47 ` Lukas Wagner
1 sibling, 0 replies; 5+ messages in thread
From: Lukas Wagner @ 2025-11-13 12:47 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox Backup Server development discussion,
Shannon Sterz
Cc: Lukas Wagner
On Thu Nov 13, 2025 at 1:16 PM CET, Thomas Lamprecht wrote:
> Am 13.11.25 um 12:40 schrieb Shannon Sterz:
>> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
>> ---
>> src/server/notifications/template_data.rs | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/server/notifications/template_data.rs b/src/server/notifications/template_data.rs
>> index 0dcc5ed3..9adc4699 100644
>> --- a/src/server/notifications/template_data.rs
>> +++ b/src/server/notifications/template_data.rs
>> @@ -177,7 +177,7 @@ impl PackageUpdatesTemplateData {
>> .map(|info| UpgradablePackage {
>> package_name: info.package.clone(),
>> available_version: info.version.clone(),
>> - installed_version: info.old_version.clone(),
>> + installed_version: info.old_version.clone().unwrap_or_default(),
>> })
>> .collect(),
>> }
>
> What about adapting installed_version to reality and make it also an
> option? I mean, depends a bit on how handlebars will handle such things
> then, and also how willing we're adopting light breakage if it fixes
> wrong historic assumptions.
>
> Our shipped template for this default/package-updates-body.txt.hbs should
> be updated in any case though, maybe special case the no installed_version,
> be that None or "", and add a NEW or something like that there.
Yes, I think adapting the template would definitely makes sense. I
vaguely remember seeing "null" entries there at some point but didn't
investigate back then; I guess these must have been new packages.
With regards to adapting the `installed_version` member, once the
template is adapted, it probably does not make difference for the
template, since both `null` and `""` would evaluate to 'false' in the
if-statement which would need to be added. But for correctness, changing
it to be an Option<String> definitely makes sense to me.
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [pbs-devel] Superseded: Re: [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional
2025-11-13 11:40 [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional Shannon Sterz
2025-11-13 12:16 ` Thomas Lamprecht
@ 2025-11-13 12:55 ` Shannon Sterz
1 sibling, 0 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-11-13 12:55 UTC (permalink / raw)
To: Shannon Sterz; +Cc: pbs-devel
Superseded-by: https://lore.proxmox.com/all/20251113125417.376817-1-s.sterz@proxmox.com/
On Thu Nov 13, 2025 at 12:40 PM CET, Shannon Sterz wrote:
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
> src/server/notifications/template_data.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/server/notifications/template_data.rs b/src/server/notifications/template_data.rs
> index 0dcc5ed3..9adc4699 100644
> --- a/src/server/notifications/template_data.rs
> +++ b/src/server/notifications/template_data.rs
> @@ -177,7 +177,7 @@ impl PackageUpdatesTemplateData {
> .map(|info| UpgradablePackage {
> package_name: info.package.clone(),
> available_version: info.version.clone(),
> - installed_version: info.old_version.clone(),
> + installed_version: info.old_version.clone().unwrap_or_default(),
> })
> .collect(),
> }
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-13 12:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-13 11:40 [pbs-devel] [PATCH proxmox-backup] notifications: adapt to proxmox-apt making old_version optional Shannon Sterz
2025-11-13 12:16 ` Thomas Lamprecht
2025-11-13 12:45 ` Shannon Sterz
2025-11-13 12:47 ` Lukas Wagner
2025-11-13 12:55 ` [pbs-devel] Superseded: " Shannon Sterz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox