WPB-240: Generate and fan out events about stopping to federate#3397
Merged
elland merged 284 commits intowireapp:developfrom Jul 18, 2023
Merged
WPB-240: Generate and fan out events about stopping to federate#3397elland merged 284 commits intowireapp:developfrom
elland merged 284 commits intowireapp:developfrom
Conversation
We don't know which release this will land in yet, PR is more future-proof.
(This is part of the `Opts` data structure read from a file. it's very confusing to start updating part of that on the fly, and ignoring whatever comes from the config file.)
(Double-check if we can't keep the prod code behavior intact to avoid upgrade / fed-to-fed api / client api issues.)
minimising types that are used in several common paths.
…rker They were never actual integration tests, I was just confused about why `make ci` wasn't picking up the existing tests, so I made it run them and that was a mistake and caused confusion.
elland
reviewed
Jul 18, 2023
Contributor
elland
left a comment
There was a problem hiding this comment.
Just a few open questions, but also wondering if the tests shouldn't be done in /integration instead.
| where | ||
| sendNotifications = do | ||
| maxPage <- inputs $ fromRange . currentFanoutLimit . _options -- This is based on the limits in removeIfLargeFanout | ||
| page <- embedClient $ paginate selectAllMembers (paramsP LocalQuorum () maxPage) |
Contributor
There was a problem hiding this comment.
Feels like this should be an effect, instead of accessed directly, but I'm not sure what we want to do.
Contributor
Author
There was a problem hiding this comment.
I've made a new effect for this.
| sendNotifications = do | ||
| maxPage <- inputs $ fromRange . currentFanoutLimit . _options -- This is based on the limits in removeIfLargeFanout | ||
| page <- embedClient $ paginate selectAllMembers (paramsP LocalQuorum () maxPage) | ||
| sendNotificationPage page |
Contributor
There was a problem hiding this comment.
Shouldn't we void here instead of the call sites?
Contributor
Author
There was a problem hiding this comment.
I've moved the void in front of this call.
| recipients = Intra.recipient <$> mems | ||
| event = Intra.FederationEvent $ Federation.Event Federation.FederationDelete domain | ||
| for_ (Intra.newPush ListComplete Nothing event recipients) $ \p -> do | ||
| -- TODO: Transient or not? |
elland
approved these changes
Jul 18, 2023
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 adds the initial client notifications for the local server de-federating from a remote server. Remote servers de-federating from each other are not covered in this PR.
Checklist
changelog.d