[WPB-183] Version federation API queue notifications#3831
Merged
pcapriotti merged 52 commits intodevelopfrom Mar 7, 2024
Merged
[WPB-183] Version federation API queue notifications#3831pcapriotti merged 52 commits intodevelopfrom
pcapriotti merged 52 commits intodevelopfrom
Conversation
d48db58 to
dcbbd82
Compare
fisx
reviewed
Jan 24, 2024
Contributor
fisx
left a comment
There was a problem hiding this comment.
Looks good so far! I nit-picked around a little.
services/background-worker/src/Wire/BackendNotificationPusher.hs
Outdated
Show resolved
Hide resolved
services/background-worker/src/Wire/BackendNotificationPusher.hs
Outdated
Show resolved
Hide resolved
f8d8b54 to
0f3664d
Compare
mdimjasevic
commented
Jan 29, 2024
mdimjasevic
commented
Jan 29, 2024
fisx
reviewed
Jan 29, 2024
libs/wire-api-federation/src/Wire/API/Federation/BackendNotifications.hs
Outdated
Show resolved
Hide resolved
services/background-worker/src/Wire/BackendNotificationPusher.hs
Outdated
Show resolved
Hide resolved
services/background-worker/src/Wire/BackendNotificationPusher.hs
Outdated
Show resolved
Hide resolved
9eaf699 to
73f2140
Compare
bdf5e88 to
ad683dc
Compare
We cannot parse the supported versions returned by a remote federator using our own `Version` type, because this breaks forward compatibility. Instead, use integers and convert later, ignoring any version that doesn't exist locally.
Old backends are not able to parse version lists containing newer versions. This commit changes the JSON format of the response of the `api-version` federation endpoint, and leaves a hardcoded value for the legacy field that old backends are able to parse. This means that version negotiation running within an old backend will return a bogus result, but since those old backends were not actually making use of federation API versioning, that is not a problem.
It was introduced to accommodate older backends that were already claiming to support V1. However, now that the version negotiation system is bypassing the old one, there is no need for the extra version bump.
Co-authored-by: Akshay Mankar <akshay@wire.com>
4da4075 to
c0ac4e4
Compare
This prevents the background worker from getting stuck when a remote backend is running an incompatible or broken instance.
c0ac4e4 to
83dcf79
Compare
Contributor
|
@akshaymankar I think I addressed all the issues. Let me know if I missed anything. |
mdimjasevic
commented
Mar 6, 2024
Contributor
Author
|
I approve this PR, but given that I started the PR, GitHub wouldn't let me approve it through its interface. @pcapriotti , can you approve it for me? |
pcapriotti
approved these changes
Mar 6, 2024
akshaymankar
approved these changes
Mar 7, 2024
pcapriotti
added a commit
that referenced
this pull request
Mar 7, 2024
pcapriotti
added a commit
that referenced
this pull request
Mar 7, 2024
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.
Tracked by https://wearezeta.atlassian.net/browse/WPB-183.
Checklist
changelog.d