Project

General

Profile

Actions

Bug #31646

open

Subscription API does not work well with inheritance

Added by Lukas Zapletal almost 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
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 1 (1 open0 closed)

Related to Foreman - Tracker #30290: Foreman webhooks integration storyNewLukas Zapletal

Actions
Actions #1

Updated by Lukas Zapletal almost 4 years ago

Actions

Also available in: Atom PDF