k.rennerandClaude Opus 4.7 d72fb21415 influxdb(seed): drop update-domain rows + resume via staging sentinel
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>
2026-05-05 04:42:53 +02:00
S
Description
No description provided
38 MiB
master
Latest
2026-01-31 15:05:31 +00:00
Languages
Go 35.7%
Shell 24.3%
Python 22.4%
Jinja 5.1%
HCL 4.8%
Other 7.6%