Commit be94f69
feat(libdd-common): recognize PCF Garden container IDs (#2025)
## What
- Add a dedicated `PCF_UUID_SOURCE` regex (8-4-4-4-4 hex) alongside the existing `UUID_SOURCE` (8-4-4-4-12).
- Wire it into `CONTAINER_REGEX` so Garden cgroup paths resolve to their container ID.
- Add unit cases for Garden paths plus a regression guard ensuring standard UUIDs are not truncated, and a `cgroup.pcf` fixture.
## Why
PCF / Garden containers expose a non-standard 28-char UUID in their cgroup paths. Without a dedicated source, the parser either misses them entirely or risks truncating standard UUIDs if the existing source is loosened.
## Testing
- Covered by the new cases in `container_id::tests::test_extract_container_id` (Garden paths, fixture file, regression guard, length boundary).
Co-authored-by: yann.hamdaoui <yann.hamdaoui@datadoghq.com>1 parent b6ea82e commit be94f69
2 files changed
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | | - | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
95 | 109 | | |
96 | 110 | | |
97 | 111 | | |
| |||
118 | 132 | | |
119 | 133 | | |
120 | 134 | | |
| 135 | + | |
121 | 136 | | |
122 | 137 | | |
123 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments