The execution order of hooks depends on the insertion order of hooks into the hook definition object. Most of the time hooks are defined and use in a single job file and this does not cause any issue. However, if you'd like to start from an existing hook definitions object (i.e. a base job) and insert additional hooks at some insertion points to customize the job it is not currently easily possible. Indeed, you should recreate a completely new definition object in order to control the right insertion order.
It should be useful to provide some utility functions to do so. Note that removing a hook does not suffer this problem as you can simply erase the key in the definition object, order does not matter here.
The execution order of hooks depends on the insertion order of hooks into the hook definition object. Most of the time hooks are defined and use in a single job file and this does not cause any issue. However, if you'd like to start from an existing hook definitions object (i.e. a base job) and insert additional hooks at some insertion points to customize the job it is not currently easily possible. Indeed, you should recreate a completely new definition object in order to control the right insertion order.
It should be useful to provide some utility functions to do so. Note that removing a hook does not suffer this problem as you can simply erase the key in the definition object, order does not matter here.