d72fb21415cb1cffcbe53e4dd4fc20b35a3dd355
Job has been running 2h+ on per-day chunking with one new failure
mode: HA's `update` domain entities carry `release_summary_str` fields
containing multi-line markdown release notes. `influx write --format
csv` rejects the line:
Error: failed to write data: 400 Bad Request: unable to parse
'state,domain=update,entity_id=studio_code_server_update,...,
release_summary_str="## What's changed\n...
(InfluxDB's annotated-CSV nominally handles RFC4180 quoted multi-line
strings; the v2.7 `influx write --format csv` parser doesn't.) Per-day
chunking surfaces this as a one-day failure rather than corrupting a
larger window.
The script then dies via pipefail; kubelet OnFailure restarts the
container; loop replays from 2018 (no checkpointing); same bad day
fails again; backoffLimit gets eaten by retracing empty days that
already-succeeded.
Two fixes:
1. Filter out `domain == "update"` before pivot — these entries are
metadata toggles (update-available y/n, version strings, release
notes) not real time-series, safe to drop wholesale. `_field ==
"source"` filter from 614533c stays.
2. Sentinel file `/staging/last-completed-day` holds the last `$NEXT`
that succeeded. Script reads it on startup and resumes from there;
writes it after each successful chunk. A kubelet restart now picks
up where the previous attempt left off rather than retracing from
2018. The PVC survives pod restarts, so this works across the
container's full life — sentinel only resets when the Job itself
is deleted (which is also when we want to re-seed from scratch).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
38 MiB