Protocells Handover

Protocells Handover

Date: 2026-02-05
From: Ryan Cobb (@rcobb)
To: Florian Jedelhauser (@fjedelhauser)

Note: Ryan is out Feb 6–17 and available again Feb 18. No additional work is expected for Florian beyond his current subscription_add_ons work — this document is for context and continuity.


Context

The Protocells initiative converts static database tables (plans and subscription_add_ons) to hard-coded application code (FixedItemsModel) for the Cells architecture. The core problem is that auto-increment IDs drift across Cells—an enum-based identifier replaces them to guarantee consistency.

Deadline: Both tables must reach FixedItemsModel by milestone 19.2. However, BBM required stop constraints mean plans cleanup won't finish until 19.3 (see BBM Milestone Timeline below).


Plans Table Migration

Epic: Convert plans table to be hard-coded

What's Done

Phase Issue Description MR Milestone
Spike #571418 Analyze all dependencies on plans.id -- 18.6
1 #571419 Add name_uid enum column to plans table -- 18.6
2 #571420 Add *_name_uid columns to 5 referencing tables !213444 18.7
3 #571421 Dual-write: populate plan_name_uid on create/update !218355 18.9
4 #571448 Backfill all 5 referencing tables via BBMs !217075 18.9
  • Closed as wontfix: #571927 (remove auto-increment) and #571423 (FK constraints) — not needed since we're going straight to FixedItemsModel

BBM Milestone Timeline

The remaining plans work is gated by batched background migration guidance which enforces waiting for required stops before finalizing. This significantly constrains the timeline:

Milestone What Happens Notes
18.9 Queue backfill migrations Done — !217075 merged 2026-02-05
18.11 Required stop (docs) BBMs guaranteed to have finished on all instances by this point
18.12 Finalize migration, add NOT NULL constraints, model validation, start using the new column First milestone where we can switch reads (#571422) and begin FixedItemsModel work (#571923)
19.2 Next required stop Need this before cleaning up old BBM code
19.3 Delete old background migration code, drop old columns (#571424) Final cleanup

Open question: Self-managed instances don't really have different plans, so it's possible we could skip the required stop wait. However, the 5 referencing tables still have large volumes to backfill (14.2M + 2.9M + 1.96M rows), so the BBM finalization guidance most likely still applies. This hasn't been fully verified — worth confirming with the Cells team (@tkuah) or database reviewers.

What's Remaining

These are sequential — each depends on the previous completing, and gated by the BBM timeline above:

Phase Issue Description Target Milestone Status
5 #571422 Finalize BBM, add NOT NULL constraints, switch app code reads to plan_name_uid 18.12 (after 18.11 required stop) Unassigned
6 #571923 Convert Plan model to FixedItemsModel 18.12–19.2 Unassigned
7 #571424 Drop old columns (plan_id, hosted_plan_id), delete BBM code, drop table 19.3 (after 19.2 required stop) Unassigned

Important: No work on #571422 can land until after the 18.11 required stop. Use the time between now and 18.12 to prepare the MRs so they're ready to merge when the milestone opens.


Subscription Add-Ons Migration

Epic: Convert subscription_add_ons table to be hard-coded (Due: 2026-08-14)

Spike Completed

#15596 - Spike: Evaluate moving directly to a FixedItemsModel — Closed 2026-02-03 by @fjedelhauser

Decision: Move directly to FixedItemsModel.

Current Issue Breakdown

Issue Description Milestone Assignee Status
#588161 Add static id reference column to subscription_add_on_purchases 18.10 @fjedelhauser In dev
#588162 Backfill FixedItemsModel ids 18.10 Unassigned Blocked on #588161
#15785 Finalize backfill 19.0 Unassigned Blocked on #588162
#15784 Update AddOn to a FixedItemsModel 19.0 Unassigned Blocked on #15785
#15787 Cleanup migration code -- Unassigned Blocked on #15785
#15788 Drop subscription_add_ons table and foreign keys -- Unassigned Last step

Reference Materials

GitLab Documentation

  • Cells Static Data — FixedItemsModel pattern
  • Plan model source
  • AddOn model source

Parent Epics

  • &16840 - Convert Static data tables to be hard-coded
  • &19409 - Plans table
  • &19981 - Subscription add-ons
  • #1726 - Provision reporting

Summary of Handover

Workstream Status Next Action
Plans Backfill merged (4 of 7 phases done) Prep MRs for #571422 now; can't merge until after 18.11 required stop. Finalize + switch reads in 18.12, cleanup in 19.3
Add-ons Spike done, #588161 in dev Continue #588161 (add static id column), then follow the issue chain
Reporting DRI transferred to @fjedelhauser Weekly updates on gitlab-com/gl-infra#1726
Assignee Loading
Time tracking Loading