Commit 5b4e409
fix(validate): handle a genuinely missing conflated.parquet cleanly (#766)
#722's own verification checklist asked to "confirm validate correctly
fails on a deliberately-bad case (e.g. an artificially tiny --mem-limit
that should trip the OOM check)" -- never actually done until now.
Ran it for real: a 32m --mem-limit against v0.8.2 on Hetzner, which
OOM-killed the container (confirmed twice in dmesg) before it ever got
past import_atp, so no conflated.parquet was ever uploaded.
That crashed `validate` outright: check_nonempty (and check_match_rate
in the advisory checks) call read_parquet() unconditionally, and
DuckDB raises duckdb.IOException (an HTTP 404 against the S3 test
bucket) rather than returning an empty result for a URL with nothing
at it -- an unhandled traceback instead of a clean failure report,
even though the underlying script still exited non-zero either way.
Fixes both:
- check_nonempty now catches duckdb.IOException and reports a clean
failed CheckResult instead of propagating the exception.
- run_hard_checks uses that result to skip (not attempt) the five
other hard checks that also read the same file -- each would fail
with an identical, redundant "could not read" result for the exact
same reason. The four log/dmesg-based checks after those don't
depend on the parquet file at all, so they still run -- and are
exactly what explains *why* there's no output (here: check_no_oom,
which correctly reported the real kill).
- check_match_rate (advisory) gets the same try/except, reporting
"skipped" -- same semantic as its existing regional-extract skip
right above it, not a failure (advisory checks never fail validate).
Verified against the real broken run's downloaded logs: validate now
prints a clean [FAIL]/[SKIP] report (non-empty output, run completed,
cgroup signal, no OOM, and ATP geometry floor correctly FAIL; the five
parquet-dependent checks correctly SKIP; match rate correctly SKIPs
too) and exits 1, instead of crashing with a traceback.
Verified: uv run pytest from scripts/ (81 passed, 3 new: missing-output
cases for check_nonempty, run_hard_checks, and check_match_rate).
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent 3cc4108 commit 5b4e409
2 files changed
Lines changed: 115 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
126 | 139 | | |
127 | 140 | | |
128 | 141 | | |
| |||
323 | 336 | | |
324 | 337 | | |
325 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
326 | 373 | | |
327 | 374 | | |
328 | 375 | | |
| |||
338 | 385 | | |
339 | 386 | | |
340 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
341 | 395 | | |
342 | 396 | | |
343 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
149 | 163 | | |
| |||
350 | 364 | | |
351 | 365 | | |
352 | 366 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
358 | 383 | | |
359 | 384 | | |
360 | 385 | | |
| |||
458 | 483 | | |
459 | 484 | | |
460 | 485 | | |
461 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
462 | 514 | | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 515 | + | |
| 516 | + | |
469 | 517 | | |
470 | 518 | | |
471 | 519 | | |
| |||
0 commit comments