feat(fusillade)!: drop the plaintext API key columns (DW-1013)

Merged
TO
9d ago
+526-951

Part 7 of 7 for DW-1005 (DW-1013). Merge only after the release containing #2172 (16.5.0) is fully deployed.

What changes

  • dwctl migration 20261105123212_drop_api_keys_secret: secret_hash SET NOT NULL (instant with the validated check), drop the check, drop api_keys.secret, refresh stale column and index comments.
  • fusillade migration 20261105123212_drop_stored_api_keys: recreate active_request_templates, request_templates_all and request_templates without api_key, then drop request_templates_g2.api_key.
  • fusillade migration 20261105143830_drop_batches_api_key: drops batches.api_key on its own, so its lock isn't held with the template locks.
  • fusillade-core (breaking): api_key removed from RequestTemplate and every request/batch input type; create_flex/create_background require the API key id. RequestData.api_key stays as the in-memory per-dispatch credential.
  • Retained response snapshots stop carrying api_key; older ones still decode.
  • docs/migrations.md: from 16.6.0, roll back no further than 16.5.0.

Rollout

16.5.0 neither reads nor writes these columns, so its pods keep working while the migrations run.

Not removed

  • DROP COLUMN doesn't rewrite rows: old bytes stay in table pages, WAL and backups until rows are rewritten (VACUUM FULL / pg_repack) and backups expire.
  • Retained-response payloads written before 16.5.0 keep template.api_key until their daily partitions are retired (retained_response_retirement_enabled). Rewriting that table (~706 GB) to scrub them costs far more than retirement.

Testing

Targeted tests for the touched areas, the down-migration test, and just lint rust pass locally; CI runs the full suite.