-
Notifications
You must be signed in to change notification settings - Fork 325
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
[WPB-183] Version federation API queue notifications #3831
Conversation
d48db58
to
dcbbd82
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.
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
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
@akshaymankar I think I addressed all the issues. Let me know if I missed anything. |
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? |
Tracked by https://wearezeta.atlassian.net/browse/WPB-183.
Checklist
changelog.d