synapse/tests
Eric Eastwood 0f971ca68e
Update get_pdu to return the original, pristine EventBase (#13320)
Update `get_pdu` to return the untouched, pristine `EventBase` as it was originally seen over federation (no metadata added). Previously, we returned the same `event` reference that we stored in the cache which downstream code modified in place and added metadata like setting it as an `outlier`  and essentially poisoned our cache. Now we always return a copy of the `event` so the original can stay pristine in our cache and re-used for the next cache call.

Split out from https://github.com/matrix-org/synapse/pull/13205

As discussed at:

 - https://github.com/matrix-org/synapse/pull/13205#discussion_r918365746
 - https://github.com/matrix-org/synapse/pull/13205#discussion_r918366125

Related to https://github.com/matrix-org/synapse/issues/12584. This PR doesn't fix that issue because it hits [`get_event` which exists from the local database before it tries to `get_pdu`](7864f33e28/synapse/federation/federation_client.py (L581-L594)).
2022-07-20 15:58:51 -05:00
..
api Allow rate limiters to passively record actions they cannot limit (#13253) 2022-07-13 19:09:42 +00:00
app
appservice
config
crypto
events
federation Update get_pdu to return the original, pristine EventBase (#13320) 2022-07-20 15:58:51 -05:00
handlers Rate limit joins per-room (#13276) 2022-07-19 11:45:17 +00:00
http Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
logging More type hints for synapse.logging (#13103) 2022-06-30 13:05:06 +00:00
module_api
push Don't include appservice users when calculating push rules (#13332) 2022-07-20 12:06:13 +01:00
replication Speed up get_unread_event_push_actions_by_room (#13005) 2022-06-15 15:17:14 +00:00
rest Rate limit joins per-room (#13276) 2022-07-19 11:45:17 +00:00
scripts
server_notices
state Fix typechecks against twisted trunk (#13061) 2022-06-15 11:49:58 +01:00
storage Use a real room in the notification rotation tests. (#13260) 2022-07-15 08:22:43 -04:00
test_utils
util
__init__.py
server.py annotate tests.server.FakeChannel (#13136) 2022-07-04 18:08:56 +01:00
test_distributor.py
test_event_auth.py Add support for room version 10 (#13220) 2022-07-13 11:36:02 -07:00
test_federation.py Rip out auth-event reconciliation code (#12943) 2022-07-14 21:52:26 +00:00
test_mau.py
test_metrics.py
test_phone_home.py
test_server.py Rate limit joins per-room (#13276) 2022-07-19 11:45:17 +00:00
test_state.py Don't pull out the full state when storing state (#13274) 2022-07-15 12:59:45 +00:00
test_terms_auth.py Remove unnecessary json.dumps from tests (#13303) 2022-07-17 22:28:45 +01:00
test_test_utils.py
test_types.py Fix destination_is errors seen in sentry. (#13041) 2022-06-14 18:28:26 +01:00
test_visibility.py Rename test case method to add_hashes_and_signatures_from_other_server (#13255) 2022-07-12 18:46:32 +00:00
unittest.py Rate limit joins per-room (#13276) 2022-07-19 11:45:17 +00:00
utils.py Rate limit joins per-room (#13276) 2022-07-19 11:45:17 +00:00