[DOP-28167] Slots on worker handlers support inheritance#287
Closed
[DOP-28167] Slots on worker handlers support inheritance#287
Conversation
384b018 to
6512a4a
Compare
6512a4a to
ca0afdf
Compare
marashka
reviewed
Oct 29, 2025
Contributor
marashka
left a comment
There was a problem hiding this comment.
You're right, but inheritance also inherits connected hooks, and we don't need this for open liniage, we want to have separate liniage logic for each database.
Check this out:
`from onetl.hooks import hook, slot, support_hooks
@support_hooks
class SomeTestHook:
@slot
def test_method(self):
return "Hello"
class NewHook(SomeTestHook):
pass
@SomeTestHook.test_method.bind
@hook
def open_liniage_event_1(self):
print("Hook event 1")
@NewHook.test_method.bind
@hook
def open_liniage_even_2(self):
print("Hook event 2")
SomeTestHook().test_method()`
Member
Author
|
Oh, I see |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Actually, onETL hooks can detect that they were called from inherited class, and not from main class.
Related issue number
Checklist
docs/changelog/next_release/<pull request or issue id>.<change type>.rstfile added describing change(see CONTRIBUTING.rst for details.)