-
Notifications
You must be signed in to change notification settings - Fork 333
[WPB-3633] client receives conversation deleted conversation events after federation delete event #3485
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
don't send event on remote conv delete test that 1:1 conv do not trigger event changelog
1a51a6d
to
d61ff76
Compare
-- call to brig. This is so we can ensure that domains are correctly cleaned up if a service | ||
-- falls over for whatever reason. | ||
deleteFederationRemoteGalley :: Domain -> ExceptT Brig.API.Error.Error (AppT r) () | ||
deleteFederationRemoteGalley dom = do | ||
lift . wrapClient . Data.deleteRemoteConnectionsDomain $ dom | ||
assertNoDomainsFromConfigFiles dom |
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.
the reason for this line is that if you delete a remote that's also present in the config file, it will fail silently (signal success), as read is always the union of cassandra and yaml, and yaml can't be changed here. there is a comment about this somewhere in this CRUD family.
why did you remove it?
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.
Yes, but it is in the wrong place. At this point, the federation domain has already been deleted, and we are now cleaning up the local state. There is no need to check this again here.
for_ (Map.toList remoteConvs) $ \(cnv, lUsers) -> do | ||
-- All errors, either exceptions or Either e, get thrown into IO | ||
mapError @NoChanges (const (InternalErrorWithDescription "No Changes: Could not remove a local member from a remote conversation.")) $ do | ||
E.deleteMembersInRemoteConversation (toRemoteUnsafe dom cnv) (N.toList lUsers) |
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.
this is certainly more to the point! :)
https://wearezeta.atlassian.net/browse/WPB-3633
Checklist
changelog.d