[pve-devel] [RFC] towards automated integration testing

2023-10-13 Thread Lukas Wagner
Hello, I am currently doing the groundwork that should eventually enable us to write automated integration tests for our products. Part of that endeavor will be to write a custom test runner, which will - setup a specified test environment - execute test cases in that environment - create

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-16 Thread Lukas Wagner
Thank you for the feedback! On 10/16/23 13:20, Stefan Hanreich wrote: On 10/13/23 15:33, Lukas Wagner wrote: - Additionally, it should be easy to run these integration tests locally on a developer's workstation in order to write new test cases, as well as troubleshooting and debu

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-16 Thread Lukas Wagner
Thanks for the summary from our discussion and the additional feedback! On 10/16/23 15:57, Thomas Lamprecht wrote: - create some sort of test report As Stefan mentioned, test-output can be good to have. Our buildbot instance provides that, and while I don't look at them in 99% of the builds

Re: [pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-10-17 Thread Lukas Wagner
Ping - would be great to get some reviews on this to get this merged for the next release. On 9/18/23 13:14, Lukas Wagner wrote: This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows PVE to talk to SMTP server directly, without

Re: [pve-devel] [PATCH v2 many 00/11] notifications: feed system mails into proxmox_notify

2023-10-17 Thread Lukas Wagner
Ping - would be great to get some reviews on this to get this merged for the next release. On 10/2/23 10:06, Lukas Wagner wrote: The aim of this patch series is to adapt `proxmox-mail-forward` so that it forwards emails that were sent to the local root user through the `proxmox_notify` crate

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-17 Thread Lukas Wagner
On 10/17/23 08:35, Thomas Lamprecht wrote: Is the order of test-cases guaranteed by toml parsing, or how are intra- fixture dependencies ensured? Good point. With rollbacks in between test cases it probably does not matter much, but on 'real hardware' with no rollback this could definitely

Re: [pve-devel] [RFC] towards automated integration testing

2023-10-18 Thread Lukas Wagner
On 10/17/23 18:28, Thomas Lamprecht wrote: Am 17/10/2023 um 14:33 schrieb Lukas Wagner: On 10/17/23 08:35, Thomas Lamprecht wrote:  From top of my head I'd rather do some attribute based dependency annotation, so that one can depend on single tests, or whole fixture on others single

Re: [pve-devel] [PATCH v3 many 0/7] notifications: add SMTP endpoint

2023-10-19 Thread Lukas Wagner
On 10/17/23 09:27, Lukas Wagner wrote: Ping - would be great to get some reviews on this to get this merged for the next release. On 9/18/23 13:14, Lukas Wagner wrote: This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows

Re: [pve-devel] [PATCH v2 many 00/11] notifications: feed system mails into proxmox_notify

2023-10-19 Thread Lukas Wagner
On 10/17/23 09:28, Lukas Wagner wrote: Ping - would be great to get some reviews on this to get this merged for the next release. On 10/2/23 10:06, Lukas Wagner wrote: The aim of this patch series is to adapt `proxmox-mail-forward` so that it forwards emails that were sent to the local root

[pve-devel] [PATCH proxmox 06/27] notify: let a matcher always match if it has no matching directives

2023-11-07 Thread Lukas Wagner
This should be a bit more intuitive to users than the current behavior, which is 'always match' for mode==all and 'never match' for mode==any. The current behavior originates in the neutral element of the underlying logical operation (and, or). Signed-off-by: Lukas Wagner ---

[pve-devel] [PATCH proxmox 05/27] notify: matcher: introduce common trait for match directives

2023-11-07 Thread Lukas Wagner
This allows us to make the match-checking code a bit shorter. Signed-off-by: Lukas Wagner --- proxmox-notify/src/matcher.rs | 92 +-- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/proxmox-notify/src/matcher.rs b/proxmox-notify/src/matcher.rs

[pve-devel] [PATCH pve-ha-manager 10/27] env: switch to matcher-based notification system

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/PVE/HA/Env/PVE2.pm | 10 ++ src/PVE/HA/NodeStatus.pm | 11 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index ea9e6e4..fcb60a9 100644 --- a/src/PVE/HA/Env/PVE2.pm +++ b

[pve-devel] [PATCH proxmox 02/27] notify: factor out notification content into its own type

2023-11-07 Thread Lukas Wagner
field for metadata, which will be useful for notification filtering. This decouples template rendering and filtering, which enables us to be very precise about which metadata fields we allow to be used in filters. Signed-off-by: Lukas Wagner --- proxmox-notify/examples/render.rs| 4 +- prox

[pve-devel] [PATCH pve-guest-common 09/27] vzdump: deprecate mailto/mailnotification/notification-{target, policy}

2023-11-07 Thread Lukas Wagner
The first two will be migrated to the notification system, the second were part for the first attempt for the new notification system. The first attempt only ever hit pvetest, so we simply tell the user to not use the two params. Signed-off-by: Lukas Wagner --- src/PVE/VZDump/Common.pm | 16

[pve-devel] [PATCH proxmox 01/27] notify: introduce Error::Generic

2023-11-07 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778

[pve-devel] [PATCH proxmox-widget-toolkit 26/27] notification ui: unprotected mailto-root target

2023-11-07 Thread Lukas Wagner
A default notification config will now be created in pve-manager's postinst hook - which is not magic in any way and can be modified and deleted as desired. Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/

[pve-devel] [PATCH proxmox-widget-toolkit 21/27] notification ui: add target selector for matcher

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/window/NotificationFilterEdit.js | 145 +++ 1 file changed, 145 insertions(+) diff --git a/src/window/NotificationFilterEdit.js b/src/window/NotificationFilterEdit.js index 703a9e2..bcde4fa 100644 --- a/src/window

[pve-devel] [PATCH proxmox-widget-toolkit 23/27] notification ui: remove notification groups

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/Schema.js | 5 - src/panel/NotificationConfigView.js | 4 - src/panel/NotificationGroupEditPanel.js | 174 4 files changed, 184 deletions(-) delete

[pve-devel] [PATCH pve-manager 11/27] api: notification: remove notification groups

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 267 +- 1 file changed, 4 insertions(+), 263 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..b34802c8 100644 --- a/PVE/API2/Cluster

[pve-devel] [PATCH proxmox-widget-toolkit 22/27] notification ui: remove filter setting for targets

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile| 1 - src/form/NotificationFilterSelector.js | 58 - src/panel/GotifyEditPanel.js| 9 src/panel/NotificationGroupEditPanel.js | 9 src/panel/SendmailEditPanel.js

[pve-devel] [PATCH proxmox-perl-rs 07/27] notify: adapt to new matcher-based notification routing

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 167 +-- 1 file changed, 50 insertions(+), 117 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..4fbd705 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs

[pve-devel] [PATCH proxmox 04/27] notify: add calendar matcher

2023-11-07 Thread Lukas Wagner
This allows matching by a notification's timestamp: matcher: foo match-calendar mon..fri 8-12 Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/matcher.rs | 6 +++ proxmox-notify/src/lib.rs | 4 ++ proxmox-notify/src/matcher.rs | 65 +++ 3

[pve-devel] [PATCH many 00/27] overhaul notification system, use matchers instead of filters

2023-11-07 Thread Lukas Wagner
kup jobs as deprecated in UI - while also migrating automatically to the new system (create an endpoint/matcher when creating/updating a backup job) proxmox: Lukas Wagner (6): notify: introduce Error::Generic notify: factor out notification content into its own type notify: rep

[pve-devel] [PATCH pve-cluster 08/27] notify: adapt to matcher based notification system

2023-11-07 Thread Lukas Wagner
This commit removes the target paramters from all notify calls. Also, the default 'mail-to-root' target is not added automatically any more - this target will be added by an dpkg hook in the future. Signed-off-by: Lukas Wagner --- src/PVE/Notif

[pve-devel] [PATCH pve-manager 16/27] api: replication: adapt to matcher-based notification system

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index d61518ba..0dc944c9 100644 --- a/PVE/API2/Replication.pm +++ b/PVE/API2/Replication.pm

[pve-devel] [PATCH pve-manager 18/27] test: fix vzdump notification test

2023-11-07 Thread Lukas Wagner
The signature of the PVE::Notify functions have changed, this commit adapts the mocked functions so that the tests work again. Signed-off-by: Lukas Wagner --- test/vzdump_notification_test.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test

[pve-devel] [PATCH pve-manager 20/27] ui: dc: config: show notification panel again

2023-11-07 Thread Lukas Wagner
Rework should be done now. Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index 0dea1c67..74a84e91 100644 --- a/www/manager6/dc/Config.js +++ b/www

[pve-devel] [PATCH pve-manager 15/27] api: apt: adapt to matcher-based notifications

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/APT.pm | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index a213fc59..da75a4dc 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -286,8 +286,6 @@ __PACKAGE__

[pve-devel] [PATCH pve-manager 17/27] debian: postinst: create notifications.cfg if it does not exist

2023-11-07 Thread Lukas Wagner
We only warn on failure so that the postinst script does not fail in case pmxcfs is not running. Signed-off-by: Lukas Wagner --- debian/postinst | 28 1 file changed, 28 insertions(+) diff --git a/debian/postinst b/debian/postinst index 4c9a1f25..7dad2b1a 100755

[pve-devel] [PATCH pve-manager 14/27] vzdump: adapt to new matcher based notification system

2023-11-07 Thread Lukas Wagner
To ease the migration from old-style mailto/mailnotification paramters for backup jobs, the code will add a ephemeral sendmail endpoint and a matcher. Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 8 +--- PVE/VZDump.pm | 40 +++- 2 files

[pve-devel] [PATCH pve-manager 19/27] ui: vzdump: remove left-overs from target/policy based notifications

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 81 --- .../form/NotificationPolicySelector.js| 1 - www/manager6/window/Backup.js | 35 +--- 3 files changed, 15 insertions(+), 102 deletions(-) diff --git a/www

[pve-devel] [PATCH proxmox-widget-toolkit 27/27] noficiation: matcher edit: make 'field' an editable combobox

2023-11-07 Thread Lukas Wagner
For now with fixed options that are shared between most notification events - later, once we have a notification registry, this should be filled dynamically. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 11 ++- 1 file changed, 10 insertions(+), 1 deletion

[pve-devel] [PATCH proxmox-widget-toolkit 25/27] notification: matcher: add UI for matcher editing

2023-11-07 Thread Lukas Wagner
This modifies the old filter edit window in the following ways: - Split content into multiple panels - Name and comment in the first tab - Match rules in a tree-structure in the second tab - Targets to notify in the third tab Signed-off-by: Lukas Wagner --- Notes: The code

[pve-devel] [PATCH proxmox-widget-toolkit 24/27] notification ui: rename filter to matcher

2023-11-07 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile | 2 +- src/data/model/NotificationConfig.js | 2 +- src/panel/NotificationConfigView.js | 26 +-- ...lterEdit.js => NotificationMatcherEdit.js} | 14 +- 4 files changed,

[pve-devel] [PATCH pve-manager 13/27] ui: dc: remove unneeded notification events panel

2023-11-07 Thread Lukas Wagner
The notification event settings are replaced by notification matchers, which will combine the notification routing and filtering into a single concept. Signed-off-by: Lukas Wagner --- www/manager6/Makefile | 4 - www/manager6/dc/Config.js | 17 +- www/manager6/dc

[pve-devel] [PATCH pve-manager 12/27] api: notification: add new matcher-based notification API

2023-11-07 Thread Lukas Wagner
This renames filters -> matchers and adds new configuration options needed by matchers (e.g. match-field, match-calendar, etc.) Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 195 ++ 1 file changed, 88 insertions(+), 107 deletions(-) diff --

[pve-devel] [PATCH proxmox 03/27] notify: replace filters and groups with matcher-based system

2023-11-07 Thread Lukas Wagner
needed to allow a smooth transition from the old system to the new system, since the old system was already available on pvetest. Signed-off-by: Lukas Wagner --- Notes: Sorry for the large commit, many of these changes interact with each other and it would have been significantly more

[pve-devel] [PATCH access-control 1/2] acl: allow more nesting for /mapping acl paths

2023-11-07 Thread Lukas Wagner
This will be needed for ACL paths for the notification system, which will get separate namespaces for targets and matchers: /mapping/notification/targets/ as well as /mapping/notification/matchers/ Signed-off-by: Lukas Wagner --- src/PVE/AccessControl.pm | 1 + 1 file changed, 1 insertion

[pve-devel] [PATCH manager 2/2] api: notifications: give targets and matchers their own ACL namespace

2023-11-07 Thread Lukas Wagner
Right now, matchers and targets share a single namespace due to limitations of the section-config parser. This will probably be fixed some time in the future. As a preparation for that we need to ensure that the ACL tree has separate namespaces for both. Signed-off-by: Lukas Wagner --- This

[pve-devel] [PATCH docs] notifications: update docs to for matcher-based notifications

2023-11-08 Thread Lukas Wagner
Target groups and filters have been replaced by notification matchers. The matcher can match on certain notification properties and route the notification to a target in case of a match. This patch updates the docs to reflect these changes. Signed-off-by: Lukas Wagner --- notifications.adoc

[pve-devel] [PATCH v4 debcargo-conf 01/11] cherry-pick chumsky 0.9.2 from debian unstable

2023-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/chumsky/debian/changelog | 5 +++ src/chumsky/debian/copyright | 39 + src/chumsky/debian/copyright.debcargo.hint | 51 ++ src/chumsky/debian/debcargo.toml | 2 + 4 files changed, 97

[pve-devel] [PATCH v4 many 00/11] notifications: add SMTP endpoint

2023-11-08 Thread Lukas Wagner
l/pve-devel/2023-August/058956.html [2] https://lists.proxmox.com/pipermail/pve-devel/2023-October/059299.html [3] https://lists.proxmox.com/pipermail/pve-devel/2023-November/059818.html [4] https://lists.proxmox.com/pipermail/pve-devel/2023-November/059843.html [5] https://lists.proxmox.com/piperm

[pve-devel] [PATCH v4 pve-docs 11/11] notifications: document 'comment' option for targets/matchers

2023-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index acbdfae..e8ed51b 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -67,6 +67,7 @@ accomodate multiple recipients. set, the plugin

[pve-devel] [PATCH v4 pve-manager 08/11] notify: add API routes for smtp endpoints

2023-11-08 Thread Lukas Wagner
code. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 323 ++ 1 file changed, 323 insertions(+) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index 6ff6d89e..81a8c5af 100644 --- a/PVE/API2/Cluster/Notifications.pm

[pve-devel] [PATCH v4 proxmox-perl-rs 07/11] notify: add bindings for smtp API calls

2023-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 106 +++ 1 file changed, 106 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 4fbd705..8a6d76e 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -15,6 +15,10

[pve-devel] [PATCH v4 proxmox 06/11] notify: add api for smtp endpoints

2023-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs| 33 +++ proxmox-notify/src/api/smtp.rs | 356 +++ proxmox-notify/src/endpoints/smtp.rs | 8 - 3 files changed, 389 insertions(+), 8 deletions(-) create mode 100644 proxmox-notify/src/api

[pve-devel] [PATCH v4 proxmox 03/11] sys: email: add `forward`

2023-11-08 Thread Lukas Wagner
This new function forwards an email to new recipients. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index 8b3a1b6..c94f634

[pve-devel] [PATCH v4 proxmox 04/11] notify: add mechanisms for email message forwarding

2023-11-08 Thread Lukas Wagner
attempt to transform the HTML into readable plain text. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml| 2 ++ proxmox-notify/src/endpoints/gotify.rs | 3 ++ proxmox-notify/src/endpoints/sendmail.rs | 5 +++ proxmox

[pve-devel] [PATCH v4 debcargo-conf 02/11] update lettre to 0.11.1

2023-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/lettre/debian/changelog | 10 +++ .../debian/patches/downgrade_fastrand.patch | 13 .../debian/patches/downgrade_idna.patch | 13 src/lettre/debian/patches/downgrade_url.patch | 13 .../patches

[pve-devel] [PATCH v4 pve-docs 10/11] notifications: document SMTP endpoints

2023-11-08 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- notifications.adoc | 47 ++ 1 file changed, 47 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 764ec72..acbdfae 100644 --- a/notifications.adoc +++ b/notifications.adoc @@ -67,6 +67,7

[pve-devel] [PATCH v4 proxmox-widget-toolkit 09/11] panel: notification: add gui for SMTP endpoints

2023-11-08 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/Makefile | 2 + src/Schema.js| 5 + src/panel/EmailRecipientPanel.js | 88 +++ src/panel/SendmailEditPanel.js | 58 +- src/panel/SmtpEditPanel.js | 183 +++ 5

[pve-devel] [PATCH v4 proxmox 05/11] notify: add 'smtp' endpoint

2023-11-08 Thread Lukas Wagner
or that is shared between sendmail and smtp endpoints has been moved to a new `endpoints::common::mail` module. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml | 4 +- proxmox-notify/src/config.rs

Re: [pve-devel] [PATCH v4 many 00/11] notifications: add SMTP endpoint

2023-11-09 Thread Lukas Wagner
On 11/8/23 16:52, Dietmar Maurer wrote: This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows PVE to talk to SMTP server directly, without using the system's MTA (postfix). Isn't this totally unreliable? What if the server resp

Re: [pve-devel] [PATCH v4 many 00/11] notifications: add SMTP endpoint

2023-11-09 Thread Lukas Wagner
On 11/9/23 13:16, Dietmar Maurer wrote: On 11/8/23 16:52, Dietmar Maurer wrote: This patch series adds support for a new notification endpoint type, smtp. As the name suggests, this new endpoint allows PVE to talk to SMTP server directly, without using the system's MTA (postfix). Isn't this to

[pve-devel] [PATCH manager] debian: postinst: copy notifications.cfg from /usr/share/pve-manager

2023-11-09 Thread Lukas Wagner
... instead of using a heredoc in postinst script. Signed-off-by: Lukas Wagner --- Requires "debian: postinst: create notifications.cfg if it does not exist "[1] from the "overhaul notification system, use matchers instead of filters" patch series [1] https://lists.proxm

Re: [pve-devel] [PATCH access-control 1/2] acl: allow more nesting for /mapping acl paths

2023-11-10 Thread Lukas Wagner
On 11/10/23 09:18, Thomas Lamprecht wrote: Am 07/11/2023 um 13:46 schrieb Lukas Wagner: This will be needed for ACL paths for the notification system, which will get separate namespaces for targets and matchers: /mapping/notification/targets/ as well as /mapping/notification/matchers/ Not

[pve-devel] [PATCH v3 pve-docs 5/5] notifications: add documentation for system mail forwarding

2023-11-10 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - Dropped paragraph about target/policy, since we now do routing in matchers notifications.adoc | 16 1 file changed, 16 insertions(+) diff --git a/notifications.adoc b/notifications.adoc index 764e

[pve-devel] [PATCH v3 proxmox-mail-forward 4/5] update d/control

2023-11-10 Thread Lukas Wagner
proxmox-schema and proxmox-section config is not required anymore. add new dependency to proxmox-notify. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - new in v3 debian/control | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/contro

[pve-devel] [PATCH v3 proxmox-mail-forward 3/5] feed forwarded mails into proxmox_notify

2023-11-10 Thread Lukas Wagner
subject and text body. On PBS, where proxmox-notify is not yet fully integrated, we simply add a default target/matcher to an empty config. That way the behavior should be unchanged - mails will be forwarded to root@pam. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - Update

[pve-devel] [PATCH v3 proxmox 1/5] notify: add PVE/PBS context

2023-11-10 Thread Lukas Wagner
: Lukas Wagner --- Notes: Changes v2 -> v3: - no changes proxmox-notify/Cargo.toml| 3 +- proxmox-notify/src/context.rs| 21 - proxmox-notify/src/context/common.rs | 27 ++ proxmox-notify/src/context/mod.rs| 36 proxmox-notify/src/cont

[pve-devel] [PATCH v3 proxmox-perl-rs 2/5] pve-rs: notify: remove notify_context for PVE

2023-11-10 Thread Lukas Wagner
The context has now been moved to `proxmox-notify` due to the fact that we also need it in `proxmox-mail-forward` now. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - No changes pve-rs/Cargo.toml| 2 +- pve-rs/src/lib.rs| 7 ++- pve-rs/

[pve-devel] [PATCH v3 many 0/5] notifications: feed system mails into proxmox_notify

2023-11-10 Thread Lukas Wagner
x.com/pipermail/pve-devel/2023-November/059899.html [6] https://lists.proxmox.com/pipermail/pve-devel/2023-November/059900.html proxmox: Lukas Wagner (1): notify: add PVE/PBS context proxmox-notify/Cargo.toml| 3 +- proxmox-notify/src/context.rs| 21 - proxmox-noti

Re: [pve-devel] [PATCH many 00/27] overhaul notification system, use matchers instead of filters

2023-11-13 Thread Lukas Wagner
Hi, thanks for your input. On 11/13/23 15:34, Dominik Csapak wrote: a few high level ui things (i did not look too deeply in the code, but i'll send probably some comments there too) Just as a warning, the tree code/data binding is definitely not as clean as it could be right now, a cleanup pa

[pve-devel] [PATCH v2 proxmox 03/52] notify: introduce Error::Generic

2023-11-14 Thread Lukas Wagner
... as leaf error-type for anything for which we do not necessarily want a separate enum variant. Signed-off-by: Lukas Wagner --- proxmox-notify/src/lib.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/proxmox-notify/src/lib.rs b/proxmox-notify/src/lib.rs index 7500778

[pve-devel] [PATCH v2 proxmox 08/52] notify: let a matcher always match if it has no matching directives

2023-11-14 Thread Lukas Wagner
This should be a bit more intuitive to users than the current behavior, which is 'always match' for mode==all and 'never match' for mode==any. The current behavior originates in the neutral element of the underlying logical operation (and, or). Signed-off-by: Lukas Wagner ---

[pve-devel] [PATCH v2 proxmox 06/52] notify: add calendar matcher

2023-11-14 Thread Lukas Wagner
This allows matching by a notification's timestamp: matcher: foo match-calendar mon..fri 8-12 Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/matcher.rs | 6 +++ proxmox-notify/src/lib.rs | 4 ++ proxmox-notify/src/matcher.rs | 65 +++ 3

[pve-devel] [PATCH v2 proxmox 10/52] notify: add mechanisms for email message forwarding

2023-11-14 Thread Lukas Wagner
attempt to transform the HTML into readable plain text. Signed-off-by: Lukas Wagner --- Cargo.toml | 1 + proxmox-notify/Cargo.toml| 2 ++ proxmox-notify/src/endpoints/gotify.rs | 3 ++ proxmox-notify/src/endpoints/sendmail.rs | 5 +++ proxmox

[pve-devel] [PATCH v2 proxmox 04/52] notify: factor out notification content into its own type

2023-11-14 Thread Lukas Wagner
field for metadata, which will be useful for notification filtering. This decouples template rendering and filtering, which enables us to be very precise about which metadata fields we allow to be used in filters. Signed-off-by: Lukas Wagner --- proxmox-notify/examples/render.rs| 4 +- prox

[pve-devel] [PATCH v2 pve-ha-manager 23/52] env: switch to matcher-based notification system

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/PVE/HA/Env/PVE2.pm | 10 ++ src/PVE/HA/NodeStatus.pm | 11 +-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm index ea9e6e4..fcb60a9 100644 --- a/src/PVE/HA/Env/PVE2.pm +++ b

[pve-devel] [PATCH v2 many 00/52] revamp notifications; smtp endpoints; system mail

2023-11-14 Thread Lukas Wagner
tps://lists.proxmox.com/pipermail/pve-devel/2023-November/059894.html [5] https://lists.proxmox.com/pipermail/pve-devel/2023-November/059899.html [6] https://lists.proxmox.com/pipermail/pve-devel/2023-November/059900.html debcargo-conf: Lukas Wagner (2): cherry-pick chumsky 0.9.2 from debian u

[pve-devel] [PATCH v2 pve-manager 30/52] test: fix vzdump notification test

2023-11-14 Thread Lukas Wagner
The signature of the PVE::Notify functions have changed, this commit adapts the mocked functions so that the tests work again. Signed-off-by: Lukas Wagner --- test/vzdump_notification_test.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test

[pve-devel] [PATCH v2 pve-manager 29/52] api: replication: adapt to matcher-based notification system

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Replication.pm | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/PVE/API2/Replication.pm b/PVE/API2/Replication.pm index d61518ba..0dc944c9 100644 --- a/PVE/API2/Replication.pm +++ b/PVE/API2/Replication.pm

[pve-devel] [PATCH v2 pve-manager 28/52] api: apt: adapt to matcher-based notifications

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/APT.pm | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index a213fc59..da75a4dc 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -286,8 +286,6 @@ __PACKAGE__

[pve-devel] [PATCH v2 debcargo-conf 01/52] cherry-pick chumsky 0.9.2 from debian unstable

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/chumsky/debian/changelog | 5 +++ src/chumsky/debian/copyright | 39 + src/chumsky/debian/copyright.debcargo.hint | 51 ++ src/chumsky/debian/debcargo.toml | 2 + 4 files changed, 97

[pve-devel] [PATCH v2 proxmox-widget-toolkit 36/52] notification ui: add target selector for matcher

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/window/NotificationFilterEdit.js | 145 +++ 1 file changed, 145 insertions(+) diff --git a/src/window/NotificationFilterEdit.js b/src/window/NotificationFilterEdit.js index 703a9e2..bcde4fa 100644 --- a/src/window

[pve-devel] [PATCH v2 pve-manager 24/52] api: notification: remove notification groups

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 267 +- 1 file changed, 4 insertions(+), 263 deletions(-) diff --git a/PVE/API2/Cluster/Notifications.pm b/PVE/API2/Cluster/Notifications.pm index ec666903..b34802c8 100644 --- a/PVE/API2/Cluster

[pve-devel] [PATCH v2 proxmox 14/52] notify: add 'disable' parameter for matchers and targets.

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/gotify.rs | 8 +++- proxmox-notify/src/api/matcher.rs| 6 ++ proxmox-notify/src/api/sendmail.rs | 8 proxmox-notify/src/api/smtp.rs | 6 ++ proxmox-notify/src/endpoints/gotify.rs

[pve-devel] [PATCH v2 proxmox-widget-toolkit 39/52] notification ui: rename filter to matcher

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/Makefile | 2 +- src/data/model/NotificationConfig.js | 2 +- src/panel/NotificationConfigView.js | 26 +-- ...lterEdit.js => NotificationMatcherEdit.js} | 14 +- 4 files changed,

[pve-devel] [PATCH v2 pve-manager 31/52] ui: vzdump: remove left-overs from target/policy based notifications

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- www/manager6/dc/Backup.js | 81 --- .../form/NotificationPolicySelector.js| 1 - www/manager6/window/Backup.js | 35 +--- 3 files changed, 15 insertions(+), 102 deletions(-) diff --git a/www

[pve-devel] [PATCH v2 pve-manager 34/52] api: notification: add disable and origin params

2023-11-14 Thread Lukas Wagner
'disable' can be set to disable a matcher/target. 'origin' signals whether the configuration entry was created by the user or whether it was built-in/ built-in-and-modified. Signed-off-by: Lukas Wagner --- PVE/API2/Cluster/Notifications.pm | 113 ++

[pve-devel] [PATCH v2 proxmox 13/52] notify: add api for smtp endpoints

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- proxmox-notify/src/api/mod.rs| 33 +++ proxmox-notify/src/api/smtp.rs | 356 +++ proxmox-notify/src/endpoints/smtp.rs | 8 - 3 files changed, 389 insertions(+), 8 deletions(-) create mode 100644 proxmox-notify/src/api

[pve-devel] [PATCH v2 debcargo-conf 02/52] update lettre to 0.11.1

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- src/lettre/debian/changelog | 10 +++ .../debian/patches/downgrade_fastrand.patch | 13 .../debian/patches/downgrade_idna.patch | 13 src/lettre/debian/patches/downgrade_url.patch | 13 .../patches

[pve-devel] [PATCH v2 proxmox 09/52] sys: email: add `forward`

2023-11-14 Thread Lukas Wagner
This new function forwards an email to new recipients. Signed-off-by: Lukas Wagner --- proxmox-sys/src/email.rs | 52 +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs index 8b3a1b6..c94f634

[pve-devel] [PATCH v2 proxmox-perl-rs 20/52] notify: support 'origin' paramter

2023-11-14 Thread Lukas Wagner
This parameter shows the origin of a config entry (builtin, user-created, modified-builtin) Signed-off-by: Lukas Wagner --- common/src/notify.rs | 5 + 1 file changed, 5 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index a5ab754..8f9f38f 100644 --- a/common/src

[pve-devel] [PATCH v2 proxmox 07/52] notify: matcher: introduce common trait for match directives

2023-11-14 Thread Lukas Wagner
This allows us to make the match-checking code a bit shorter. Signed-off-by: Lukas Wagner --- proxmox-notify/src/matcher.rs | 92 +-- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/proxmox-notify/src/matcher.rs b/proxmox-notify/src/matcher.rs

[pve-devel] [PATCH v2 proxmox-widget-toolkit 43/52] panel: notification: add gui for SMTP endpoints

2023-11-14 Thread Lukas Wagner
. Signed-off-by: Lukas Wagner --- src/Makefile | 2 + src/Schema.js| 5 + src/panel/EmailRecipientPanel.js | 88 +++ src/panel/SendmailEditPanel.js | 58 +- src/panel/SmtpEditPanel.js | 183 +++ 5

[pve-devel] [PATCH v2 pve-guest-common 22/52] vzdump: deprecate mailto/mailnotification/notification-{target, policy}

2023-11-14 Thread Lukas Wagner
The first two will be migrated to the notification system, the second were part for the first attempt for the new notification system. The first attempt only ever hit pvetest, so we simply tell the user to not use the two params. Signed-off-by: Lukas Wagner --- src/PVE/VZDump/Common.pm | 16

[pve-devel] [PATCH v2 proxmox-perl-rs 19/52] notify: add 'disable' parameter

2023-11-14 Thread Lukas Wagner
This parameter disables a matcher/a target. Signed-off-by: Lukas Wagner --- common/src/notify.rs | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 8a6d76e..a5ab754 100644 --- a/common/src/notify.rs +++ b

[pve-devel] [PATCH v2 proxmox-perl-rs 17/52] notify: add bindings for smtp API calls

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 106 +++ 1 file changed, 106 insertions(+) diff --git a/common/src/notify.rs b/common/src/notify.rs index 4fbd705..8a6d76e 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs @@ -15,6 +15,10

[pve-devel] [PATCH v2 pve-cluster 21/52] notify: adapt to matcher based notification system

2023-11-14 Thread Lukas Wagner
This commit removes the target paramters from all notify calls. Also, the default 'mail-to-root' target is not added automatically any more - this target will be added by an dpkg hook in the future. Signed-off-by: Lukas Wagner --- src/PVE/Notif

[pve-devel] [PATCH v2 proxmox-perl-rs 18/52] pve-rs: notify: remove notify_context for PVE

2023-11-14 Thread Lukas Wagner
The context has now been moved to `proxmox-notify` due to the fact that we also need it in `proxmox-mail-forward` now. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - No changes pve-rs/Cargo.toml| 2 +- pve-rs/src/lib.rs| 7 ++- pve-rs/

[pve-devel] [PATCH v2 pve-manager 32/52] ui: dc: config: show notification panel again

2023-11-14 Thread Lukas Wagner
Rework should be done now. Signed-off-by: Lukas Wagner --- www/manager6/dc/Config.js | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/www/manager6/dc/Config.js b/www/manager6/dc/Config.js index 0dea1c67..74a84e91 100644 --- a/www/manager6/dc/Config.js +++ b/www

[pve-devel] [PATCH v2 pve-manager 27/52] vzdump: adapt to new matcher based notification system

2023-11-14 Thread Lukas Wagner
To ease the migration from old-style mailto/mailnotification paramters for backup jobs, the code will add a ephemeral sendmail endpoint and a matcher. Signed-off-by: Lukas Wagner --- PVE/API2/VZDump.pm | 8 +--- PVE/VZDump.pm | 40 +++- 2 files

[pve-devel] [PATCH v2 proxmox-perl-rs 16/52] notify: adapt to new matcher-based notification routing

2023-11-14 Thread Lukas Wagner
Signed-off-by: Lukas Wagner --- common/src/notify.rs | 167 +-- 1 file changed, 50 insertions(+), 117 deletions(-) diff --git a/common/src/notify.rs b/common/src/notify.rs index 9f44225..4fbd705 100644 --- a/common/src/notify.rs +++ b/common/src/notify.rs

[pve-devel] [PATCH v2 proxmox-widget-toolkit 41/52] notification ui: unprotected mailto-root target

2023-11-14 Thread Lukas Wagner
A default notification config will now be created in pve-manager's postinst hook - which is not magic in any way and can be modified and deleted as desired. Signed-off-by: Lukas Wagner --- src/panel/NotificationConfigView.js | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/

[pve-devel] [PATCH v2 proxmox-widget-toolkit 42/52] noficiation: matcher edit: make 'field' an editable combobox

2023-11-14 Thread Lukas Wagner
For now with fixed options that are shared between most notification events - later, once we have a notification registry, this should be filled dynamically. Signed-off-by: Lukas Wagner --- src/window/NotificationMatcherEdit.js | 11 ++- 1 file changed, 10 insertions(+), 1 deletion

[pve-devel] [PATCH v2 proxmox-mail-forward 52/52] update d/control

2023-11-14 Thread Lukas Wagner
proxmox-schema and proxmox-section config is not required anymore. add new dependency to proxmox-notify. Signed-off-by: Lukas Wagner --- Notes: Changes v2 -> v3: - new in v3 debian/control | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/contro

[pve-devel] [PATCH v2 proxmox-widget-toolkit 45/52] notification ui: add column for 'origin'

2023-11-14 Thread Lukas Wagner
elete' button should change its text to 'reset defaults' when a built-in target/matcher is selected. This will be added in another patch. Signed-off-by: Lukas Wagner --- src/data/model/NotificationConfig.js | 4 ++-- src/panel/NotificationConfigView.js | 32 ++--

[pve-devel] [PATCH v2 proxmox 11/52] notify: add PVE/PBS context

2023-11-14 Thread Lukas Wagner
: Lukas Wagner --- Notes: Changes v2 -> v3: - no changes proxmox-notify/Cargo.toml| 3 +- proxmox-notify/src/context.rs| 21 - proxmox-notify/src/context/common.rs | 27 ++ proxmox-notify/src/context/mod.rs| 36 proxmox-notify/src/cont

[pve-devel] [PATCH v2 pve-docs 50/52] notifications: change to simplified ACL structure.

2023-11-14 Thread Lukas Wagner
For now, we use a less deeply nested structure. We can always extend it if we need to. Signed-off-by: Lukas Wagner --- notifications.adoc | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/notifications.adoc b/notifications.adoc index c7bdc5a..74447e5 100644

  1   2   3   4   5   6   7   8   9   10   >