WPB-22959 Refactor TeamFeatureStore - #4983
Merged
Merged
Conversation
battermann
marked this pull request as ready for review
January 27, 2026 10:51
battermann
force-pushed
the
WPB-22959-refactor-team-feature-store
branch
from
January 27, 2026 10:58
d449b57 to
ea108b9
Compare
battermann
changed the base branch from
develop
to
WPB-22959-generalize-migration-lock
January 27, 2026 10:59
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the team feature store architecture by moving logic from the TeamFeatureStore interpreter to the FeatureConfigSubsystem. The refactoring clarifies the separation of concerns between the storage layer (Cassandra) and the subsystem layer by moving parsing and error handling logic upward in the architecture.
Changes:
- Moved
TeamFeatureStoreErrordefinition from the Cassandra storage layer to theFeaturesConfigSubsysteminterpreter - Changed
TeamFeatureStoreoperations to return unparsedMaybe DbFeaturePatchinstead ofDbFeature cfg, with parsing now handled in the subsystem - Added
GetDbFeatureRawInternaloperation toFeaturesConfigSubsystemfor internal access to DB features
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
libs/wire-subsystems/src/Wire/TeamFeatureStore.hs |
Updated return types to use Maybe DbFeaturePatch and added type aliases |
libs/wire-subsystems/src/Wire/TeamFeatureStore/Cassandra.hs |
Simplified interpreter to remove parsing logic and error handling |
libs/wire-subsystems/src/Wire/FeaturesConfigSubsystem.hs |
Added GetDbFeatureRawInternal operation to the subsystem API |
libs/wire-subsystems/src/Wire/FeaturesConfigSubsystem/Interpreter.hs |
Moved parsing logic and TeamFeatureStoreError from storage layer, implemented new operations |
services/galley/src/Galley/App.hs |
Updated import to include all exports from FeaturesConfigSubsystem.Interpreter |
services/galley/src/Galley/API/Teams/Features/Get.hs |
Removed TeamFeatureStore dependency, simplified getAllTeamFeatures implementation |
services/galley/src/Galley/API/Teams/Features.hs |
Updated to use getDbFeatureRawInternal instead of direct storage access |
services/galley/src/Galley/API/Teams.hs |
Replaced TeamFeatureStore member constraints with FeaturesConfigSubsystem |
services/galley/src/Galley/API/LegalHold/Team.hs |
Updated to use getDbFeatureRawInternal from FeaturesConfigSubsystem |
services/galley/src/Galley/API/LegalHold.hs |
Replaced TeamFeatureStore member constraints with FeaturesConfigSubsystem |
changelog.d/5-internal/WPB-22959 |
Added changelog entry documenting the refactoring |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Base automatically changed from
WPB-22959-generalize-migration-lock
to
develop
January 28, 2026 14:28
supersven
reviewed
Jan 29, 2026
supersven
approved these changes
Jan 29, 2026
supersven
left a comment
Contributor
There was a problem hiding this comment.
The added language extension pragmas should probably be double checked. Other than that: LGTM 👍
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.
Preparation for https://wearezeta.atlassian.net/browse/WPB-22959
Move logic from
TeamFeatureStoreinterpreter toFeatureConfigSubsystem.Checklist
changelog.d