potiuk commented on code in PR #59883:
URL: https://github.com/apache/airflow/pull/59883#discussion_r2665955256
##########
shared/listeners/src/airflow_shared/listeners/spec/asset.py:
##########
Review Comment:
This is really the common pattern we should adopt:
* have comon APIs that are usable on both
* whenever you have a component-specific 'thingie" make sure to keep it in
the component and inject at explicit initialization time.
##########
shared/listeners/src/airflow_shared/listeners/spec/asset.py:
##########
Review Comment:
Same as in the other libraries -> I think you should inject specs to the
shared listener from the "user" - so in airflow core you should keep the specs
only used in the core,m and you should pass the list of specs when initializing
listener manager.
```python
self.pm.add_hookspecs(lifecycle)
self.pm.add_hookspecs(dagrun)
self.pm.add_hookspecs(asset)
self.pm.add_hookspecs(taskinstance)
self.pm.add_hookspecs(importerrors)
```
This has the nice effect that in each component you will have only those
listeners injected that make sense in the context of that component.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]