[FS-1148] Resilient member adding in presence of unreachable backends (1/2)#3248
Merged
mdimjasevic merged 39 commits intodevelopfrom May 8, 2023
Merged
[FS-1148] Resilient member adding in presence of unreachable backends (1/2)#3248mdimjasevic merged 39 commits intodevelopfrom
mdimjasevic merged 39 commits intodevelopfrom
Conversation
added 23 commits
April 13, 2023 10:53
As agreed with client devs on Apr 4, 2023 in the Squad - Federation chat, the absence of the `failed_to_send` field in response to an MLS message send request has the same meaning as an empty list provided in the same field.
d2475ce to
fa0be89
Compare
battermann
reviewed
May 3, 2023
battermann
reviewed
May 3, 2023
added 3 commits
May 4, 2023 10:21
- The definition of `(<\>)` was exactly the same as `Semigroup a => Semigroup Maybe`, which I confused with the `Alternative Maybe` instance.
elland
reviewed
May 4, 2023
| Sem r LocalConversationUpdate | ||
| notifyConversationAction failEarly tag quid notifyOrigDomain con lconv targets action = do | ||
| Sem r (LocalConversationUpdate, FailedToProcess) | ||
| notifyConversationAction tag quid notifyOrigDomain con lconv targets action = do |
Contributor
There was a problem hiding this comment.
Can we use something other than bool here?
Contributor
Author
There was a problem hiding this comment.
The remaining Bool argument wasn't introduced with this PR. While in general I would consider converting it into a simple sum type that is more descriptive, I'd ask you to not consider this to be a blocker and leave that for future work, as this PR has been going on for quite some time now.
elland
reviewed
May 4, 2023
elland
reviewed
May 4, 2023
| . fmap fst | ||
| $ newUserClients | ||
| let failedAdding = | ||
| Set.toList $ |
Contributor
There was a problem hiding this comment.
We could probably simplify this.
Contributor
Author
There was a problem hiding this comment.
I thought it would be much simpler yesterday when we looked at this, but I couldn't make it so. It is a bit simpler now, though. See commit fc010ea.
elland
approved these changes
May 8, 2023
mdimjasevic
pushed a commit
that referenced
this pull request
May 11, 2023
… (1/2) (#3248) * Refactoring: use FailedToProcess * Refactoring: make UnreachableUsers a NonEmpty As agreed with client devs on Apr 4, 2023 in the Squad - Federation chat, the absence of the `failed_to_send` field in response to an MLS message send request has the same meaning as an empty list provided in the same field. * executeProposalAction: return failed-to-add users * MLS test utility: reuse code among utilities * Move and generalise mockUnreachableFor * Introduce failed to remove (via failed to fetch client info) * Propagate FailedToProcess across federation API arising from conversation updates * Fix/align an MLS integration test * Use a V4 add members endpoint in tests * Rethrow the invalid-domain exception * Rethrow federation-not-available error * Fix a golden test for LeaveConversationResponse * Golden tests for MLSMessageSendingStatus * Fix a test with an unreachable user * Test: clean up debugging leftovers * Test utility: fix wording of a haddoc * Clean up conv action federation failure handling * Move unreachability stuff into its own module
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.
This is the first part of https://wearezeta.atlassian.net/browse/FS-1148, namely of the support for a partial success of adding unreachable remote users to an MLS conversation. The PR touches surrounding code, e.g., it adds scaffolding for support of partial success to remove users too; the actual support for that is to be implemented.
A follow-up PR will implement the two-phase conversation creation with remote backends when adding participants to a conversation, per the design that came out of the refinement session on Apr 20, 2023. In that scenario remote non-creator participants will be notified (by their owning backends) of being added to the conversation only once the whole operation is finalized. This will be quite a change in its own (including a DB schema change), which justifies a separate PR.
Checklist
changelog.d