-
Notifications
You must be signed in to change notification settings - Fork 334
Out of sync error versioning #4869
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
Conversation
e377eee to
2df261e
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 introduces versioning for the MLS "out of sync" error functionality to ensure backward compatibility with older API versions. The out-of-sync check is disabled for API versions below V13, preventing breaking changes for clients using older API versions.
Key changes:
- Adds a new
EnableOutOfSyncChecktype to control whether out-of-sync checks are performed - Introduces
APIVersioncombinator to pass API version information to handlers - Updates MLS message and commit bundle handlers to conditionally apply out-of-sync checks based on API version
- Extends federation API to include
enableOutOfSyncCheckfield for cross-backend compatibility
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
libs/wire-api/src/Wire/API/MLS/OutOfSync.hs |
New module defining EnableOutOfSyncCheck data type with default value DisableOutOfSyncCheck |
libs/wire-api/src/Wire/API/VersionInfo.hs |
Adds APIVersion servant combinator and getVersionHeader helper function for extracting version from requests |
libs/wire-api/src/Wire/API/Routes/SpecialiseToVersion.hs |
Extends version specialization to support APIVersion combinator |
libs/wire-api/src/Wire/API/Routes/Public/Galley/MLS.hs |
Adds APIVersion to MLS message and commit bundle API routes |
libs/wire-api-federation/src/Wire/API/Federation/API/Galley.hs |
Adds optional enableOutOfSyncCheck field to MLSMessageSendRequest for federation support |
services/galley/src/Galley/API/MLS/Message.hs |
Implements version-based logic with enableOutOfSyncCheckFromVersion function and updates handlers to accept version parameter |
services/galley/src/Galley/API/MLS/OutOfSync.hs |
Modifies checkConversationOutOfSync to respect EnableOutOfSyncCheck input |
services/galley/src/Galley/API/Federation.hs |
Updates federation handlers to propagate enableOutOfSyncCheck from incoming requests using default when not provided |
services/galley/test/integration/API/MLS.hs |
Updates test utilities to set enableOutOfSyncCheck = Nothing for federated message send requests |
services/galley/test/integration/API/MLS/Util.hs |
Updates test helper to include enableOutOfSyncCheck field |
integration/test/Test/Channels.hs |
Adds comprehensive test coverage for version-based behavior in both local and federated scenarios |
libs/wire-api/wire-api.cabal |
Registers new Wire.API.MLS.OutOfSync module |
changelog.d/3-bug-fixes/out-of-sync-error-versioning |
Documents the bug fix for older backends |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
https://wearezeta.atlassian.net/browse/WPB-21877
Checklist
changelog.d