Commit 05227d7
authored
feat(core): add id, start and end time to lifecycle hooks (#32583)
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->
<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->
<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->
## Current Behavior
Pre and post hooks lack corellation Id which might make it difficult to
culculate stats for task using pre and post hooks.
Additionally, post hook does not expose the duration or time span for
the task. Using pre/post hook might not be precise enough.
## Expected Behavior
Hooks expose the unique taskId so we can corellate pre hook of a task to
the post hook of the same task. Post hook should expose start and end
time of the task run.
## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->
Resolves discussion
[31076](#31076)1 parent 65a216b commit 05227d7
File tree
5 files changed
+21
-13
lines changed- packages/nx/src
- command-line/release
- project-graph/plugins
- tasks-runner
5 files changed
+21
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
275 | 277 | | |
| 278 | + | |
276 | 279 | | |
277 | 280 | | |
278 | 281 | | |
279 | 282 | | |
| 283 | + | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
| |||
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
| 306 | + | |
302 | 307 | | |
303 | 308 | | |
304 | 309 | | |
| |||
307 | 312 | | |
308 | 313 | | |
309 | 314 | | |
| 315 | + | |
310 | 316 | | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| 320 | + | |
| 321 | + | |
314 | 322 | | |
315 | 323 | | |
316 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| 199 | + | |
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| 204 | + | |
| 205 | + | |
202 | 206 | | |
203 | 207 | | |
204 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 25 | | |
34 | 26 | | |
35 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | 136 | | |
139 | 137 | | |
140 | 138 | | |
| |||
439 | 437 | | |
440 | 438 | | |
441 | 439 | | |
| 440 | + | |
442 | 441 | | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
| 448 | + | |
448 | 449 | | |
449 | 450 | | |
450 | 451 | | |
| |||
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| 465 | + | |
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
| |||
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
| 477 | + | |
475 | 478 | | |
476 | 479 | | |
477 | 480 | | |
478 | 481 | | |
| 482 | + | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | 486 | | |
| |||
0 commit comments