Add a preTaskExecution Hook
#33352
Gijsdeman
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, Nx provides a
preTasksExecutionhook that runs once before all tasks in arun-manycommand are executed. While this is useful for global setup, it is too coarse-grained for some workflows. In arun-manycontext, each task is conceptually independent, yet there is no lifecycle event that runs before each one individually. As a result, it is impossible to perform per-task setup, instrumentation, or environment preparation in a structured way.Suggested Change
Introduce a
preTaskExecutionhook that runs before each individual task begins. This would complementpreTasksExecutionandpostTasksExecutionby enabling finer-grained control and consistency in the task lifecycle. The new hook should receive a context object that includes theTaskbeing executed, allowing it to access task-specific information.Beta Was this translation helpful? Give feedback.
All reactions