Paradaux

PAR-250

0

Revert prod account_access compat view + premature explorer deploy before next release

BacklogUrgentrianEconomy Explorer

Why this exists (incident context)

Creating a main branch and pushing it built economy-explorer:production-sha-36d7d90 and Argo CD Image Updater auto-promoted it to prod, jumping the explorer across unreleased develop work — specifically PAR-249 (account members/authorizers/viewers → consolidated account_access, migration V18). Prod's DB is still pre-V18 (account_members + account_authorizers, no account_access), so the new explorer code (lib/sql/me.ts, lib/sql/ledger.ts) queried a non-existent account_access table → /me and account/ledger pages broke for logged-in users.

Stop-gap currently in prod (must be undone)

A read-only compatibility view was created in the prod economy DB so the running 36d7d90 image works against the old schema (source of truth stays in the legacy tables; plugins untouched):

CREATE OR REPLACE VIEW account_access AS
SELECT account_id, member_uuid_bin     AS subject_uuid_bin,
       CONVERT('MEMBER'     USING utf8mb4) COLLATE utf8mb4_general_ci AS level,
       left_at    AS removed_at FROM account_members
UNION ALL
SELECT account_id, authorizer_uuid_bin AS subject_uuid_bin,
       CONVERT('AUTHORIZER' USING utf8mb4) COLLATE utf8mb4_general_ci AS level,
       revoked_at AS removed_at FROM account_authorizers;

(The COLLATE utf8mb4_general_ci is load-bearing — without it the level IN (...) comparison throws ER_CANT_AGGREGATE_3COLLATIONS.)

⚠️ Must happen BEFORE the next release

  1. DROP VIEW account_access in the prod economy DB. Migration V18 does CREATE TABLE account_access — it will collide with this view and the migration will fail if the view still exists.
  2. Decide the end-state and execute it:
    • (a) Roll the explorer back to last-good production-sha-ce48286 (pre-PAR-249), keeping prod on old code until the plugins can go live; or
    • (b) Ship the coordinated 2.3.0 release — apply V18 together with the updated Treasury/Business plugins (which read account_access) and the new explorer. Do not apply V18 alone: it drops account_members/account_authorizers, which the currently-deployed pre-PAR-249 plugins still read, and would break in-game economy account access.
  3. Pipeline hygiene so this can't recur: main currently points at 36d7d90, and Image Updater uses newest-build on ^production-sha-[0-9a-f]{7}$, so it will keep re-selecting 36d7d90. Rewind/fix main, remove/quarantine the 36d7d90 tag in Harbor, and revert the gitops apps/economy-explorer/overlays/production kustomization, so a stray push to main can't auto-deploy unreleased work to prod.

Done when

  • account_access view dropped in prod (no view shadowing the eventual V18 table).
  • Prod explorer is on a deliberately-released image (ce48286 rollback, or the full 2.3.0 cutover), not the accidental 36d7d90.
  • main / Image Updater / Harbor cleaned up so the accidental-promotion path is closed.

Related: PAR-249 (account_access consolidation / V18).

Resources

Comments

No comments yet.

Activity

  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a pull request — PR #2 open — Last major release
  • ParadauxIO linked a commit — Commit 55de8b7 — Fold the prod compat-view drop into V18 (PAR-249/PAR-250)
  • tesks created the issue