Skip to content

Conversation

lepsa
Copy link
Contributor

@lepsa lepsa commented Jul 5, 2023

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

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

fisx and others added 30 commits May 4, 2023 23:23
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.
@lepsa lepsa changed the title DRAFT: WPB-240: Generate and fan out events about stopping to federate WPB-240: Generate and fan out events about stopping to federate Jul 18, 2023
@lepsa lepsa marked this pull request as ready for review July 18, 2023 06:11
Copy link
Contributor

@elland elland left a 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)
Copy link
Contributor

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.

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'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
Copy link
Contributor

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?

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'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?
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO or Futurework?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Futurework, I think.

@elland elland merged commit 6db29bb into wireapp:develop Jul 18, 2023
@lepsa lepsa deleted the WPB-240 branch July 18, 2023 07:31
@lepsa lepsa restored the WPB-240 branch November 28, 2023 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants