-
Notifications
You must be signed in to change notification settings - Fork 334
WPB-22959 Refactor TeamFeatureStore #4983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
d449b57 to
ea108b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Preparation for https://wearezeta.atlassian.net/browse/WPB-22959
Move logic from
TeamFeatureStoreinterpreter toFeatureConfigSubsystem.Checklist
changelog.d