Commit 3dab818
committed
fix(admin): cache an aggregate health entry per integration
Integrations whose `manifest.healthCheck` is an array (e.g. fuel runs
DE / AT / FR / ES probes; several overlay-* and transit-* declare
multiple) wrote per-sub-check results to the cache under composite
ids like `fuel:Tankerkoenig (DE)`, never under the bare integration
id. The /admin/integrations list looks up the bare id via
getCachedHealthStatus(integration.id) and got back `undefined`, so
IntegrationStatusDot's `hasHealthCheck && health === null` branch
fired and rendered orange "Unconfigured" even after a manual sweep.
In executeAllIntegrationHealthChecks, after running the per-sub-check
probes for a multi-check integration, synthesize an aggregate
ServiceStatus under the bare integration id with this rollup:
any sub-check `down` → bare id `down`
else any sub-check `up` → bare id `up`
else (all `unconfigured`) → bare id `unconfigured`
Single-check integrations are unaffected — their existing single result
already lives under the bare id. The per-integration
GET /api/admin/integrations/:id/health response still returns the raw
sub-check array; only the cache lookup at the bare id changes.1 parent e7198c2 commit 3dab818
1 file changed
Lines changed: 60 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
249 | 265 | | |
250 | 266 | | |
251 | 267 | | |
| |||
263 | 279 | | |
264 | 280 | | |
265 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
266 | 325 | | |
267 | 326 | | |
268 | 327 | | |
| |||
0 commit comments