public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method
@ 2026-10-19 13:36 Fiona Ebner
  2026-10-19 13:36 ` [PATCH ha-manager 1/2] rules: fix call to parent classes " Fiona Ebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-10-19 13:36 UTC (permalink / raw)
  To: pve-devel

Fix the call to the parent method in the HA rule base plugin's
register() implementation to avoid future accidents and add a note to
remember a versioned breaks in the SectionConfig's implementation.

ha-manager:

Fiona Ebner (1):
  rules: fix call to parent classes register() method

 src/PVE/HA/Rules.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


pve-common:

Fiona Ebner (1):
  section config: register: add note about potential ha-manager breakage

 src/PVE/SectionConfig.pm | 3 +++
 1 file changed, 3 insertions(+)


Summary over all repositories:
  2 files changed, 4 insertions(+), 1 deletions(-)

-- 
Generated by git-murpp 0.5.0




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH ha-manager 1/2] rules: fix call to parent classes register() method
  2026-10-19 13:36 [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Fiona Ebner
@ 2026-10-19 13:36 ` Fiona Ebner
  2026-10-19 13:36 ` [PATCH common 2/2] section config: register: add note about potential ha-manager breakage Fiona Ebner
  2026-10-19 20:31 ` applied: [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-10-19 13:36 UTC (permalink / raw)
  To: pve-devel

In the rules base plugin's register() method, the $class variable is
passed along twice to the SectionConfig's register() implementation,
which only takes a single argument. Fix it now to avoid future
fallout, if the number of arguments becomes enforced via signatures or
before a second argument is added, where this would cause problems.

Fixes: 433ed1a ("introduce rules base plugin")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/HA/Rules.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/HA/Rules.pm b/src/PVE/HA/Rules.pm
index a0a1041..14836f4 100644
--- a/src/PVE/HA/Rules.pm
+++ b/src/PVE/HA/Rules.pm
@@ -297,7 +297,7 @@ my $transformdef;
 sub register {
     my ($class) = @_;
 
-    $class->SUPER::register($class);
+    $class->SUPER::register();
 
     # store order in which plugin types are registered
     push @$types, $class->type();
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH common 2/2] section config: register: add note about potential ha-manager breakage
  2026-10-19 13:36 [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Fiona Ebner
  2026-10-19 13:36 ` [PATCH ha-manager 1/2] rules: fix call to parent classes " Fiona Ebner
@ 2026-10-19 13:36 ` Fiona Ebner
  2026-10-19 20:31 ` applied: [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-10-19 13:36 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 src/PVE/SectionConfig.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/PVE/SectionConfig.pm b/src/PVE/SectionConfig.pm
index 2edf5ae..66375ac 100644
--- a/src/PVE/SectionConfig.pm
+++ b/src/PVE/SectionConfig.pm
@@ -263,6 +263,9 @@ For example:
 
 =cut
 
+# ha-manager without commit "rules: fix call to parent classes register() method" accidentally
+# passed a second argument, so needs a versioned Breaks before enforcing callers to use a single
+# argument or adding a second argument to the method.
 sub register {
     my ($class) = @_;
 
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* applied: [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method
  2026-10-19 13:36 [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Fiona Ebner
  2026-10-19 13:36 ` [PATCH ha-manager 1/2] rules: fix call to parent classes " Fiona Ebner
  2026-10-19 13:36 ` [PATCH common 2/2] section config: register: add note about potential ha-manager breakage Fiona Ebner
@ 2026-10-19 20:31 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2026-10-19 20:31 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Mon, 19 Oct 2026 15:36:20 +0200, Fiona Ebner wrote:
> Fix the call to the parent method in the HA rule base plugin's
> register() implementation to avoid future accidents and add a note to
> remember a versioned breaks in the SectionConfig's implementation.
> 
> ha-manager:
> 
> Fiona Ebner (1):
>   rules: fix call to parent classes register() method
> 
> [...]

Applied, thanks!

[ha-manager] applied to git/pve-ha-manager.git (master)
[1/1] rules: fix call to parent classes register() method
      commit: 36e82fa8dc7986089928d6de578861202be82a49

[common] applied to git/pve-common.git (master)
[1/1] section config: register: add note about potential ha-manager breakage
      commit: 857352381150f4e1b9e1944463db9b76a9ecd724




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-19 20:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 13:36 [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Fiona Ebner
2026-10-19 13:36 ` [PATCH ha-manager 1/2] rules: fix call to parent classes " Fiona Ebner
2026-10-19 13:36 ` [PATCH common 2/2] section config: register: add note about potential ha-manager breakage Fiona Ebner
2026-10-19 20:31 ` applied: [PATCH-SERIES ha-manager/common 0/2] rules: fix call to parent class' register() method Thomas Lamprecht

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