Repository navigation
WPB-29582: migrate mls key packages to PostGreSQL - #5646
Open
blackheaven wants to merge 1 commit into
Open
blackheaven wants to merge 1 commit into
blackheaven wants to merge 1 commit into
Conversation
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
2 times, most recently
from
October 23, 2026 12:30
20c88fe to
322caef
Compare
akshaymankar
requested changes
Oct 28, 2026
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
from
November 4, 2026 11:26
fa20ba2 to
eaa5b43
Compare
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
from
November 5, 2026 12:05
eaa5b43 to
ffbd9e8
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The review found an issue that should be addressed before approval.
10 open issues
OwnDomain resolves to the static env.domain1; startDynamicBackend does not change it. Consequently… · New Passing alice1 sends its Z-Client header. Because the target is Alice herself,… · New This self-claim sends alice1 as Z-Client, so Brig excludes the only client and consumes no package.… · New Brig skips the requesting client when claiming the same user's packages. Passing alice1 here… · New The delete endpoint returns HTTP 201 in both API versions (MLSKeyPackageAPI in… · New replaceKeyPackages calls the PUT endpoint whose successful response is HTTP 201, as specified by… · New This claim targets the requesting user's own client, which claimLocalKeyPackages excludes using the… · New An unmarked user keeps writing exclusively to Cassandra, but Wire.Migration.migrationLoop exits… · New This DISTINCT query is invalid for the existing Cassandra schema. V80_KeyPackageCiphersuite.hs… · New The Cassandra partition key is (user, client, cipher_suite), not user alone (see… · New
What changed in this PR
Adds PostgreSQL storage and migration support for MLS key packages, connecting Brig’s storage routing to a background-worker backfill.
Changes:
- Introduces PostgreSQL tables, serialization, and store operations.
- Adds per-user migration locking, routing, worker controls, and metrics.
- Updates deployment configuration, documentation, and migration tests.
| File | Description |
|---|---|
| services/galley/galley.integration.yaml | Updated as part of this pull request. |
| services/brig/src/Brig/CanonicalInterpreter.hs | Updated as part of this pull request. |
| services/brig/brig.integration.yaml | Updated as part of this pull request. |
| services/background-worker/test/Test/Wire/Util.hs | Updated as part of this pull request. |
| services/background-worker/test/Test/Wire/BackendNotificationPusherSpec.hs | Updated as part of this pull request. |
| services/background-worker/src/Wire/PostgresMigrations.hs | Updated as part of this pull request. |
| services/background-worker/src/Wire/BackgroundWorker/Options.hs | Updated as part of this pull request. |
| services/background-worker/src/Wire/BackgroundWorker.hs | Updated as part of this pull request. |
| services/background-worker/background-worker.integration.yaml | Updated as part of this pull request. |
| postgres-schema.sql | Updated as part of this pull request. |
| libs/wire-subsystems/wire-subsystems.cabal | Updated as part of this pull request. |
| libs/wire-subsystems/src/Wire/PostgresMigrationOpts.hs | Updated as part of this pull request. |
| libs/wire-subsystems/src/Wire/MlsKeyPackageStore/Postgres.hs | Updated as part of this pull request. |
| libs/wire-subsystems/src/Wire/MlsKeyPackageStore/Migration.hs | Updated as part of this pull request. |
| libs/wire-subsystems/src/Wire/MlsKeyPackageStore/Migrating.hs | Updated as part of this pull request. |
| libs/wire-subsystems/postgres-migrations/20261023072742-mls-key-packages.sql | Updated as part of this pull request. |
| libs/wire-api/test/unit/Test/Wire/API/Roundtrip/PostgresMarshall.hs | Updated as part of this pull request. |
| libs/wire-api/src/Wire/API/MLS/KeyPackage.hs | Updated as part of this pull request. |
| libs/wire-api/src/Wire/API/MLS/CipherSuite.hs | Updated as part of this pull request. |
| integration/test/Test/Migration/MlsKeyPackages.hs | Updated as part of this pull request. |
| integration/integration.cabal | Updated as part of this pull request. |
| hack/helm_vars/wire-server/values.yaml.gotmpl | Updated as part of this pull request. |
| hack/helm_vars/common.yaml.gotmpl | Updated as part of this pull request. |
| docs/src/developer/reference/config-options.md | Updated as part of this pull request. |
| charts/wire-server/values.yaml | Updated as part of this pull request. |
| charts/wire-server/templates/background-worker/configmap.yaml | Updated as part of this pull request. |
| changelog.d/5-internal/WPB-29582 | Updated as part of this pull request. |
Review effort: Balanced
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
3 times, most recently
from
November 17, 2026 14:08
89897e8 to
a29bfa8
Compare
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
2 times, most recently
from
November 30, 2026 09:13
f66061a to
4dbbb64
Compare
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
2 times, most recently
from
December 3, 2026 09:25
ea263f6 to
19dfce0
Compare
blackheaven
force-pushed
the
gdifolco/WPB-29582-migration-postgres-mls-key-packages
branch
from
December 3, 2026 23:29
19dfce0 to
098f3c3
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://wearezeta.atlassian.net/browse/WPB-29582
Checklist
changelog.d