Make it more clear how shared_extra_conf is combined in our Docker configuration scripts
#19323
+10
−4
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.
Make it more clear how
shared_extra_confis combined in our Docker configuration scriptsOriginal context for why it was changed this way: matrix-org/synapse#14921 (comment)
Previously, this code made me question two things:
worker_config["shared_extra_conf"]in the templates?shared_extra_confhere. It's not used in theworker.yaml.j2template so all of this seemed a bit pointless.shared_extra_confitself is pointless and it's being done as a convenient place to mix the objects to get things right inshared_config(confusing).shared_configstarts out as an empty object, my first glance made me think we we're just updating with an empty object and then just re-assigning. But because we're in a loop, we actually accumulate theshared_extra_conffrom each worker.I'm not sure whether I'm capturing my confusion well enough here but basically, this made me spend time trying to figure out what/why we're doing things this way and we can use a more clear pattern to accomplish the same thing.
This change is spawning from looking at the
docker/configure_workers_and_start.pyscript in order to add a metrics listener (upcoming PR).Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.