element-hq / element-hq/synapse

Refactor the `configure_workers_and_start.py` script used internally by Complement.

Open
#16,650 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#16650](https://github.com/matrix-org/synapse/pull/16650).

---

Base: `develop`

This pull request is intended for commit-by-commit review.

Original commit schedule, with full messages:


  1. Remove obsolete `"app"` from worker templates


  2. Convert worker templates into dataclass


  3. Use a lambda for the worker name rather than search and replace later


  4. Collapse WORKERS_CONFIG by removing entries with defaults


  5. Convert listener_resources and endpoint_patterns to Set[str]


  6. Tweak comments


  7. Add `merge_into`


  8. Remove special logic for adding stream_writers: just make it part of the extra config template


  9. Rename function to add_worker_to_instance_map given reduction of scope


  10. Add `sharding_allowed` to the WorkerTemplate rather than having a separate function for that


  11. Use `merge_into` when adding workers to the shared config


  12. Promote mark_filepath to constant


  13. Add a --generate-only option


Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.