Skip to content
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

[FS-1148] Resilient member adding in presence of unreachable backends (1/2) #3248

Merged
merged 39 commits into from
May 8, 2023

Conversation

mdimjasevic
Copy link
Contributor

@mdimjasevic mdimjasevic commented Apr 26, 2023

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

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Apr 26, 2023
@mdimjasevic mdimjasevic force-pushed the fs-1148/mls-create-conv-add-commit branch from d2475ce to fa0be89 Compare April 27, 2023 11:42
@mdimjasevic mdimjasevic changed the title [FS-1148] Resilient member adding in presence of unreachable backends [FS-1148] Resilient member adding in presence of unreachable backends (1/2) Apr 27, 2023
@mdimjasevic mdimjasevic marked this pull request as ready for review April 27, 2023 12:33
@mdimjasevic mdimjasevic requested a review from elland April 27, 2023 12:35
- The definition of `(<\>)` was exactly the same as `Semigroup a =>
Semigroup Maybe`, which I confused with the `Alternative Maybe`
instance.
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use something other than bool here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

. fmap fst
$ newUserClients
let failedAdding =
Set.toList $
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably simplify this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mdimjasevic mdimjasevic requested a review from elland May 5, 2023 10:58
@mdimjasevic mdimjasevic merged commit 4a4ba8d into develop May 8, 2023
@mdimjasevic mdimjasevic deleted the fs-1148/mls-create-conv-add-commit branch May 8, 2023 11:36
mdimjasevic added a commit that referenced this pull request May 9, 2023
smatting pushed a commit that referenced this pull request May 9, 2023
mdimjasevic added a commit that referenced this pull request May 9, 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
smatting added a commit that referenced this pull request May 11, 2023
mdimjasevic added 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
supersven pushed a commit that referenced this pull request Jul 5, 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
supersven pushed a commit that referenced this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants