Project

General

Profile

Bug #31646

Subscription API does not work well with inheritance

Added by Lukas Zapletal 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Adam raised an interesting point, this does not work properly for ObservableModel or ObservableJob:

class A < ApplicationJob
  include Foreman::ObservableJob
  set_hook :hook_a

class B < A
  include Foreman::ObservableJob
  set_hook :hook_b
end

B.perfrom_now

The code currently triggers both A and B hooks while it should only trigger B. To solve that, we need to change the design and add tests to verify this. I am creating separate ticket because I did not want to work on this in other PR.


Related issues

Related to Foreman - Tracker #30290: Foreman webhooks integration storyNew

History

#1 Updated by Lukas Zapletal 11 months ago

Also available in: Atom PDF