Commit c6fe97b
authored
feat(jobs): add controller diagnostics and per-module E2E config pooling (#440)
Add a `diagnostics` module to the jobs controller that collects a structured
snapshot of job/step/task state for debugging stuck or failing jobs. Log
snapshots at DEBUG level in the scheduler and reconciler, with a
`include_job_logs_in_diagnostics` config flag (default off) to gate raw log
inclusion since logs may contain secrets or PII.
Refactor the E2E harness to support per-module config selection via an
`e2e_config()` pytest mark. Config layers (YAML files + inline overlays) are
resolved to a canonical hash and pooled, so modules sharing the same effective
config reuse one running services instance and it is torn down as soon as the
last consumer finishes. Extract all service lifecycle logic from conftest.py
into a new `services_pool.py` module.
Add `e2e/configs/local-subprocess.yaml` and a new `test_jobs_auth.py` suite
that enables auth and exercises job principal propagation end-to-end using
unsigned JWTs. Add unit tests for diagnostics, scheduler priority ordering,
subprocess backend, and timestamp contracts.
Signed-off-by: Ryan S <267728323+ironcommit@users.noreply.github.com>1 parent d9e1851 commit c6fe97b
27 files changed
Lines changed: 1981 additions & 326 deletions
File tree
- docs/set-up
- e2e
- configs
- packages/nmp_testing
- src/nmp/testing
- tests/unit
- services/core/jobs
- src/nmp/core/jobs
- api/v2/jobs
- app
- controllers
- backends
- tests
- controllers
- integration
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| 425 | + | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments