This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
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.
Clean up
ShardedWorkerHandlingConfig
#9466Clean up
ShardedWorkerHandlingConfig
#9466Changes from all commits
931b9a9
6b93ad3
35b8416
13af8a2
173c79e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
It looks like the logic for sharding federation sender and push is identical, can we abstract this somehow?
I think something like
self.send_federation = self._handle_shared_config("send_federation", "federation_sender_instances", "synapse.app.federation_sender")
might do it?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'm slightly in two minds about this. On the one had, yes, on the other we should never have more than these two, and so I think it might actually be clearer just writing it out rather than factoring it out and passing a bunch of stuff in etc 🤷
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.
If there isn't additional workers that we'll need to apply this to than that sounds OK.
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.
Yeah, this only for working around the old style config options, new stuff shouldn't have that problem
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.
This happens if you're using
send_federation
, but this config is being parsed on a non-federation sender worker. Is that correct?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.
Yes, exactly.
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 wonder if it would help us remember to add these if we used
validators
on theWriterLocations
attributes?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.
Yeah, though I'm not sure how easy it is to make
ConfigError
out of validation failures?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.
There's a few places that we raise a
ConfigError
from another exception, but not sure if it is worth refactoring that here. 🤷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'm a bit confused why we need to provide this? Does the test config default to starting push?
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.
start_pushers
should be false in the config file, then previously it got set to true duringgeneric_worker.start
(which doesn't get run from here) and now gets set to true in the worker config class (which does get run)