You can't manually enforce the order of local and plugin-based hooks
See original GitHub issueDescription & Context
Some hooks come from plugins (like kedro-mlflow
), whereas some may come from local hooks (like those). Currently, if many plugins and local hooks implement e.g. after_pipeline_run
, there is no way to manually enforce order in which all those functions will be invoked.
This causes problems such as this one.
Also, while writing this post I realized another problem, which is using the name “hook” for both hook functions (e.g. after_pipeline_run
hook function) and hook classes (e.g. DataCatalogHook
class)
Steps to Reproduce
Available in the linked post above.
Expected Result
I assume we should be able enforce the order of hooks, assign them some priority or rules.
Your Environment
- kedro 0.18.3
- Python 3.9.14
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Rules of Hooks - React
Hooks are JavaScript functions, but you need to follow two rules when using them. We provide a linter plugin to enforce these rules...
Read more >The last guide to the useEffect Hook you'll ever need
Understanding how the useEffect Hook works, and why it requires a wholesale shift in mindset, is essential to writing modern React code.
Read more >The WordPress Hooks Bootcamp: How to Use Actions, Filters ...
Learn WordPress Hooks in depth. Master Actions, Filters, and Custom Hooks by creating your own extensible plugin. Level up your WordPress ...
Read more >Packer.nvim - GitHub
A use-package inspired plugin manager for Neovim. ... If you are on Windows 10, you need developer mode enabled in order to use...
Read more >Git Hooks | Atlassian Git Tutorial
Hooks can reside in either local or server-side repositories, and they are ... own local hooks, so you can't use them as a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome. I guess that solves most cases (including mine), with the exception of those that require different orders for different hook functions.
@foxale I think this is supported already, although we don’t have docs to spill this out clearly.
One thing we may consider is to do the auto-register hook before the project hooks, but this is up for discussion.