-
Notifications
You must be signed in to change notification settings - Fork 333
WPB-240: Generate and fan out events about stopping to federate #3397
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
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.
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.
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) |
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.
Feels like this should be an effect, instead of accessed directly, but I'm not sure what we want to do.
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.
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 |
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.
Shouldn't we void here instead of the call sites?
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.
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? |
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.
TODO or Futurework?
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.
Futurework, I think.
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