Skip to content

v1.3.40.1 -- Raw strip writes '' (hotfix)

Hotfix on v1.3.40.0. argosVersion 1.3.40.0 -> 1.3.40.1.

The first retention purge after the v1.3.40.0 deploy failed on prod at 10:33 UTC: raw strip: constraint failed: NOT NULL constraint failed: log_entries.raw. The column is TEXT NOT NULL DEFAULT '' and the strip wrote NULL; the test table had been created without the constraint. Because the run returned the error at the end, the age and cap purges of that run were done but reported as failed, and every 6 h run would have failed the same way.

Fix: UPDATE ... SET raw = '' selecting raw <> ''; the test table now carries the real definition; logs-pipeline.sh fails when the last logged purge failed. Everything that reads "stripped" already tested for an empty string (GET /api/logs/{id}).

Strike 12 and dbtest

The test that covered the strip created log_entries by hand, without the constraint: strike 12 of the upstream-behaviour pattern, "test with an invented schema instead of the real one". internal/db/dbtest.Open now applies the real migrations in memory with the runner main uses; six tests moved to it, the remaining hand-made schemas are listed in the CHANGELOG as a 40.x hygiene item, and CLAUDE.md carries the rule.

After on prod: deployed 10:45:17Z, healthy in 10 s; the first purge no longer failed on the constraint but its strip stalled the panel (quadratic re-scan, /api/hosts p99 51 s); mitigated at 10:56 UTC and fixed in v1.3.40.2. Superseded; no tag.