jcoffey-dev 787def06fd Add owner/admin-only log retention deletion to Settings
New api/logretention package: GET /logs/retention/preview and
DELETE /logs/retention, both gated to RoleAdmin (Owner satisfies it
too), issue purpose-built parameterized statements against ClickHouse's
logs table (a count and a synchronous ALTER TABLE ... DELETE mutation)
rather than routing through querylang/executor's SELECT-only SQLRunner.

Settings gets a new "Log retention" section, visible only to an owner
or admin, that previews how many records a chosen age cutoff would
remove before showing an explicit confirm/cancel panel -- no delete
happens without that second step.

Scoped to core's single-tenant ClickHouse table; enterprise/'s
per-tenant routing and Tantivy's lack of a bulk-delete primitive are
disclosed gaps in api/logretention/store.go's doc comment, not silently
assumed to already work.
2026-08-21 14:49:18 -07:00
2026-08-16 20:30:45 -07:00
S
Description
Imported from github.com during the 2026-09-20 standup (local dir: cairnobs)
AGPL-3.0
2.1 MiB
Languages
Go 72.5%
Svelte 12.1%
Rust 8%
TypeScript 4%
Shell 1.3%
Other 2%