summary refs log tree commit diff
path: root/docs/code_style.md (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-10-18Add a test for backfill ignoring events we already haveAndrew Morgan1-1/+104
And explicitly ensure that it ignores get_event_cache for now.
2022-10-18Fix up docstringAndrew Morgan1-1/+1
2022-10-18Add missing 'continue'Andrew Morgan1-0/+1
2022-10-17Add debug logs to figure out why an event was filtered (#14095)Eric Eastwood2-1/+32
Spawned while investigating https://github.com/matrix-org/synapse/issues/13944 This way we might get some more context whenever an `403 Forbidden - body: {"errcode":"M_FORBIDDEN","error":"You don't have permission to access that event."}` error is produced. `log_config.yaml` ```yaml loggers: synapse: level: INFO synapse.visibility: level: DEBUG ```
2022-10-17Cache Rust build cache when building docker images (#14130)Erik Johnston3-1/+5
2022-10-17Bump click from 8.1.1 to 8.1.3 (#14201)dependabot[bot]3-5/+6
2022-10-17Support filtering the /messages API by relation type (MSC3874). (#14148)Patrick Cloke9-177/+212
Gated behind an experimental configuration flag.
2022-10-17Bump psycopg2 from 2.9.3 to 2.9.4 (#14200)dependabot[bot]2-12/+13
2022-10-17Bump bcrypt from 3.2.0 to 4.0.1 (#14186)dependabot[bot]2-15/+23
2022-10-17Use Pydantic when PUTting room aliases (#14179)David Robertson3-31/+47
2022-10-17Invalidate rooms for user caches when receiving membership events (#14155)Nick Mills-Barrett2-0/+5
This should fix a race where the event notification comes in over replication before the state replication, leaving a window during which a sync may get an incorrect list of rooms for the user.
2022-10-17Fix dead link to admin registration API (#14189)David Robertson2-1/+2
* Fix dead link to admin registration API * Changelog
2022-10-17Remove not needed `replication` listener in docker compose example (#14107)Dirk Klimpel4-25/+2
2022-10-171.69.0 v1.69.0Erik Johnston3-3/+15
2022-10-15Stop getting missing `prev_events` after we already know their signature is ↵Eric Eastwood7-2/+386
invalid (#13816) While https://github.com/matrix-org/synapse/pull/13635 stops us from doing the slow thing after we've already done it once, this PR stops us from doing one of the slow things in the first place. Related to - https://github.com/matrix-org/synapse/issues/13622 - https://github.com/matrix-org/synapse/pull/13635 - https://github.com/matrix-org/synapse/issues/13676 Part of https://github.com/matrix-org/synapse/issues/13356 Follow-up to https://github.com/matrix-org/synapse/pull/13815 which tracks event signature failures. With this PR, we avoid the call to the costly `_get_state_ids_after_missing_prev_event` because the signature failure will count as an attempt before and we filter events based on the backoff before calling `_get_state_ids_after_missing_prev_event` now. For example, this will save us 156s out of the 185s total that this `matrix.org` `/messages` request. If you want to see the full Jaeger trace of this, you can drag and drop this `trace.json` into your own Jaeger, https://gist.github.com/MadLittleMods/4b12d0d0afe88c2f65ffcc907306b761 To explain this exact scenario around `/messages` -> backfill, we call `/backfill` and first check the signatures of the 100 events. We see bad signature for `$luA4l7QHhf_jadH3mI-AyFqho0U2Q-IXXUbGSMq6h6M` and `$zuOn2Rd2vsC7SUia3Hp3r6JSkSFKcc5j3QTTqW_0jDw` (both member events). Then we process the 98 events remaining that have valid signatures but one of the events references `$luA4l7QHhf_jadH3mI-AyFqho0U2Q-IXXUbGSMq6h6M` as a `prev_event`. So we have to do the whole `_get_state_ids_after_missing_prev_event` rigmarole which pulls in those same events which fail again because the signatures are still invalid. - `backfill` - `outgoing-federation-request` `/backfill` - `_check_sigs_and_hash_and_fetch` - `_check_sigs_and_hash_and_fetch_one` for each event received over backfill - ❗ `$luA4l7QHhf_jadH3mI-AyFqho0U2Q-IXXUbGSMq6h6M` fails with `Signature on retrieved event was invalid.`: `unable to verify signature for sender domain xxx: 401: Failed to find any key to satisfy: _FetchKeyRequest(...)` - ❗ `$zuOn2Rd2vsC7SUia3Hp3r6JSkSFKcc5j3QTTqW_0jDw` fails with `Signature on retrieved event was invalid.`: `unable to verify signature for sender domain xxx: 401: Failed to find any key to satisfy: _FetchKeyRequest(...)` - `_process_pulled_events` - `_process_pulled_event` for each validated event - ❗ Event `$Q0iMdqtz3IJYfZQU2Xk2WjB5NDF8Gg8cFSYYyKQgKJ0` references `$luA4l7QHhf_jadH3mI-AyFqho0U2Q-IXXUbGSMq6h6M` as a `prev_event` which is missing so we try to get it - `_get_state_ids_after_missing_prev_event` - `outgoing-federation-request` `/state_ids` - ❗ `get_pdu` for `$luA4l7QHhf_jadH3mI-AyFqho0U2Q-IXXUbGSMq6h6M` which fails the signature check again - ❗ `get_pdu` for `$zuOn2Rd2vsC7SUia3Hp3r6JSkSFKcc5j3QTTqW_0jDw` which fails the signature check
2022-10-14Bump types-bleach from 4.1.4 to 5.0.3 (#14188)dependabot[bot]2-3/+4
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2022-10-15Bump types-pillow from 9.2.2 to 9.2.2.1 (#14187)dependabot[bot]2-20/+21
* Bump types-pillow from 9.2.2 to 9.2.2.1 Bumps [types-pillow](https://github.com/python/typeshed) from 9.2.2 to 9.2.2.1. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-pillow dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2022-10-14Strip whitespace from worker types in Dockerfile-workers (#14165)realtyem2-4/+3
2022-10-14Accept threaded receipts for events related to the root event. (#14174)Patrick Cloke5-8/+247
The root node of a thread (and events related to it) are considered "part of a thread" when validating receipts. This allows clients which show the root node in both the main timeline and the threaded timeline to easily send receipts in either. Note that threaded notifications are not created for these events, these events created notifications on the main timeline.
2022-10-141.69.0rc4 v1.69.0rc4Erik Johnston6-5/+23
2022-10-14Fix background update to use an index (#14181)Erik Johnston2-11/+52
2022-10-14Advertise support for Matrix 1.4. (#14184)Patrick Cloke3-1/+3
All features / changes in Matrix 1.4 are now supported in Synapse.
2022-10-14Fix changelog for #14171 to match #13394/#14175.Patrick Cloke1-1/+1
2022-10-14Don't require optional `invite_room_state` field on fed v2 invite (#14083)Andrew Morgan2-1/+2
2022-10-14Do not allow a None-limit on PaginationConfig. (#14146)Patrick Cloke16-50/+29
The callers either set a default limit or manually handle a None-limit later on (by setting a default value). Update the callers to always instantiate PaginationConfig with a default limit and then assume the limit is non-None.
2022-10-14Set LD_PRELOAD to load jemalloc in Dockerfile-workers. (#14182)realtyem2-1/+12
2022-10-14Stabilize the threads API. (#14175)Patrick Cloke7-29/+35
Stabilize the threads API (MSC3856) by supporting (only) the v1 path for the endpoint. This also marks the API as safe for workers since it is a read-only API.
2022-10-14Properly invalidate get_thread_id cache. (#14163)Patrick Cloke2-0/+2
This was missed in 2b6d41ebd685fb546e52acdbcb0024dfcf5a5db1 (#13824).
2022-10-14Revert "Disable push of docker images"Erik Johnston1-1/+1
This reverts commit f3f303aa22b9681c21468fb0bdce1b21d1bdbd92.
2022-10-14Fix docker workflowErik Johnston1-3/+5
2022-10-14Disable push of docker imagesErik Johnston1-1/+1
2022-10-13Fix docker build OOMing in CI for arm64 builds (#14173)Er