Skip to content

Conversation

@battermann
Copy link
Contributor

@battermann battermann commented Jan 27, 2026

Preparation for https://wearezeta.atlassian.net/browse/WPB-22959

Move logic from TeamFeatureStore interpreter to FeatureConfigSubsystem.

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@battermann battermann marked this pull request as ready for review January 27, 2026 10:51
@battermann battermann requested review from a team as code owners January 27, 2026 10:51
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jan 27, 2026
@battermann battermann requested a review from Copilot January 27, 2026 10:54
@battermann battermann force-pushed the WPB-22959-refactor-team-feature-store branch from d449b57 to ea108b9 Compare January 27, 2026 10:58
@battermann battermann changed the base branch from develop to WPB-22959-generalize-migration-lock January 27, 2026 10:59
Copy link
Contributor

Copilot AI left a 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 TeamFeatureStoreError definition from the Cassandra storage layer to the FeaturesConfigSubsystem interpreter
  • Changed TeamFeatureStore operations to return unparsed Maybe DbFeaturePatch instead of DbFeature cfg, with parsing now handled in the subsystem
  • Added GetDbFeatureRawInternal operation to FeaturesConfigSubsystem for 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants