1868 Commits

Author SHA1 Message Date
Kegan Dougal
e4cedaabcd Merge branch 'main' into kegan/poll-retry-loop-bad-create-event 2023-09-14 09:29:44 +01:00
David Robertson
fa227b79d3
Stop loading timelines if you hit missing_previous 2023-09-13 19:17:53 +01:00
David Robertson
3150c17cde
Test helper driver-by comment 2023-09-13 19:17:53 +01:00
David Robertson
a65a69b7bc
Set missing_parents field in the DB 2023-09-13 19:17:53 +01:00
David Robertson
df01e50438
Pass TimelineResponse struct around 2023-09-13 19:17:53 +01:00
David Robertson
16796db033
Add syncv3_events.missing_previous 2023-09-13 19:17:53 +01:00
Quentin Gliech
af5e8579b2 Better propagate request context
This properly propagates the go Context on down to all HTTP calls, which means that outgoing request have the OTLP trace context.
This also adds the Jaeger propagator to the list of OTEL propagators, so that Synapse properly gets the incoming trace context.
It also upgrades all the OTEL libraries
2023-09-13 19:41:52 +02:00
Till
2a8e48c821
Merge pull request #297 from matrix-org/s7evink/dupeleave
Fix duplicate leave events
2023-09-13 15:40:10 +02:00
Till
0a07eb1dbd
Apply suggestions from code review
Co-authored-by: kegsay <kegan@matrix.org>
2023-09-13 14:53:11 +02:00
David Robertson
6f3f556842
Revert "Add syncv3_events.missing_previous"
This reverts commit b8841008142c94498855a35a5ab477904f442b73.
2023-09-13 12:18:47 +01:00
David Robertson
b884100814
Add syncv3_events.missing_previous 2023-09-13 12:18:31 +01:00
Till Faelligen
64fc8d7fe3
Copy and paste test to also test rejecting invites 2023-09-13 13:04:28 +02:00
Till Faelligen
264dfbef02
Remove debug logging 2023-09-13 12:43:21 +02:00
Till Faelligen
50ee689ffc
AlwaysProcess only if it was an invite or a kick 2023-09-13 12:38:03 +02:00
David Robertson
e83a9d6218
Unit test the cache reload emission logic 2023-09-12 19:04:16 +01:00
David Robertson
1cc2c35885
Use the txn's connection!! 2023-09-12 18:11:44 +01:00
David Robertson
115ae1d0a5
Don't warn about missing receivers
Happens a lot of the time, e.g. if we know that a non-proxy user has
joined the room.
2023-09-12 17:34:32 +01:00
David Robertson
897410e4fc
Check to see if we redacted a current state event 2023-09-12 17:34:08 +01:00
David Robertson
6f37ac04df
Let the dispatcher dispatch to the global cache 2023-09-12 16:25:14 +01:00
David Robertson
0d4e8c6df9
Remove debug and improve comments 2023-09-12 16:25:10 +01:00
Kegan Dougal
397e52cd9c Bump to 1.20 2023-09-12 15:16:40 +01:00
Kegan Dougal
7c80b5424a Prioritise retriable errors over unretriable errors
Bump to Go 1.20 for errors.Join and added introspection to
errors.As to inspect []error.
2023-09-12 14:57:40 +01:00
Kegan Dougal
471bb8c898 bugfix: don't wedge pollers when they get bad state blocks
We returned an error in Initialise when there is no create event
in the state block. If this happens, the poller automatically retries
the same request, tightlooping as the data is always going to cause
the same error. Instead, return an `internal.DataError` which is a way
of expressly telling the pollers to continue and advance the since token.

With regression test.

NB: This regression test also caught a potential bug which this PR could
have introduced. This PR lets the since token skip over bad responses, but
we want to make damn sure we process EVERYTHING ELSE in that response. In
particular, we could have skipped over large sections of `parseRoomsResponse`
as we would bail early on errors. This is now fixed to bail only after processing
the entire joined rooms map.
2023-09-12 14:16:21 +01:00
David Robertson
0bc33f3451
Fix the displayname test handling 2023-09-12 12:22:56 +01:00
David Robertson
1b14ac3d1f
Fix heroes pointer nonsense 2023-09-12 12:19:42 +01:00
David Robertson
f47267b574
WIP more tests 2023-09-11 20:16:23 +01:00
David Robertson
57d8c1deba
Expose Domain on CSAPI 2023-09-11 20:16:12 +01:00
David Robertson
636d85b650
Fix bad fmt strings 2023-09-08 18:37:12 +01:00
David Robertson
6628cd33d4
Reload global metadata 2023-09-08 18:18:26 +01:00
David Robertson
6df13a160f
Fix test: correctly set alias 2023-09-08 18:18:26 +01:00
David Robertson
773a28cf14
Make circularSlice generic 2023-09-08 18:17:13 +01:00
David Robertson
afe589921e
Invalidation: don't bother propagating a snapshot 2023-09-08 18:17:13 +01:00
Till Faelligen
58669244e6
Update test 2023-09-08 14:01:22 +02:00
Till Faelligen
93b150de7c
Add failing test 2023-09-08 12:03:36 +02:00
David Robertson
c1cc0eba25
Tell global and user caches to invalidate 2023-09-07 20:41:11 +01:00
David Robertson
f4555f3c22
Emit Invalidation payloads 2023-09-07 20:41:11 +01:00
David Robertson
777cb357fe
Factor out AccumulateResult struct 2023-09-07 20:41:11 +01:00
David Robertson
be78e6f6e4
Define V2InvalidateRoom 2023-09-07 18:45:32 +01:00
David Robertson
7ccc488f02
Redaction E2E test case 2023-09-07 18:39:37 +01:00
David Robertson
956ef54d2d
creationContent -> reqBody
It is not the creation content (i.e. the content of the m.room.create event).
2023-09-07 18:34:08 +01:00
Till
6ad321d86c
Merge pull request #292 from matrix-org/s7evink/nopresencesync
Filter out presence events from /sync requests
2023-09-07 17:24:41 +02:00
Kegan Dougal
d2140471e0 v0.99.10 v0.99.10 2023-09-07 13:58:32 +01:00
kegsay
c14871323d
Merge pull request #291 from matrix-org/kegan/redact-unsigned-because
bugfix: set unsigned.redacted_because field on redaction
2023-09-07 13:57:08 +01:00
Till
4f8f8db55b
Merge pull request #289 from matrix-org/s7evink/moretracing
Add a bit more tracing, temporary Prometheus metric
2023-09-07 13:55:06 +02:00
Till Faelligen
f02826632b
Rename field 2023-09-07 13:37:54 +02:00
Till Faelligen
215da69b45
Filter out presence events from /sync requests 2023-09-07 12:05:44 +02:00
Till
ce4b99c300
Merge pull request #290 from matrix-org/s7evink/setpresence
`set_presence=offline` to reduce load on upstream homeservers
2023-09-07 11:45:12 +02:00
Till Faelligen
c4fb0017a3
set_presence=offline to reduce load on upstream homeservers 2023-09-07 11:28:31 +02:00
Kegan Dougal
9209c61691 bugfix: set unsigned.redacted_because field on redaction
Element X relies on this field being set.
2023-09-07 10:16:00 +01:00
Till Faelligen
337844715f
Unregister metric 2023-09-07 10:15:44 +02:00