Commit graph

326 commits

Author SHA1 Message Date
Devon Hudson 6c47069b0b
Remove duplicate db statement prepares 2022-12-22 09:47:26 -07:00
Devon Hudson e5feacbfc0
Consolidate relay db prepare statements 2022-12-22 09:42:56 -07:00
devonh 044f1d1f37
Merge branch 'main' into mailbox 2022-12-22 15:22:41 +00:00
Till Faelligen 09dff951d6
More flakey tests 2022-12-22 13:04:32 +01:00
Till Faelligen beea2432e6
Fix flakey test 2022-12-22 11:31:54 +01:00
Till d3db542fbf
Add federation peeking table tests (#2920)
As the title says, adds tests for inbound/outbound peeking federation
table tests.

Also removes some unused code
2022-12-22 10:56:20 +01:00
Devon Hudson 9f27e691fc
Remove unused code from fed send route tests 2022-12-19 15:14:53 -07:00
Devon Hudson 9f8a78774a
Merge branch 'main' into mailbox 2022-12-19 09:53:10 -07:00
Devon Hudson 001ee036d0
Change async_events api for reliable querying 2022-12-15 14:05:29 -07:00
Devon Hudson ad53326ce8
Refactor all relay specific stuff into it's own component 2022-12-14 18:41:27 -07:00
Devon Hudson f300a4d0e9
Refactor relay querying 2022-12-14 10:30:30 -07:00
Devon Hudson d1121643f4
Move fake federation database to it's own file 2022-12-13 13:43:07 -07:00
Devon Hudson ee8a1c5680
Rename mailserver to relay server 2022-12-09 13:06:16 -07:00
Devon Hudson 07a4ca968c
Hook in mailserver retrieval to pinecone demos 2022-12-06 13:59:20 -07:00
Devon Hudson 5d45b5baad
Fix panic in database GetAsyncTransaction 2022-12-06 13:56:04 -07:00
Till Faelligen ded43e0f2d
Fix issue with sending presence events to invalid servers 2022-12-06 13:27:33 +01:00
Devon Hudson fea8b5787a
Mark the possible separation line for mailservers 2022-12-05 13:14:58 -07:00
Till e245a26f6b
Enable/Disable internal metrics (#2899)
Basically enables us to use `test.WithAllDatabases` when testing
internal HTTP APIs, as this would otherwise result in Prometheus
complaining about already registered metric names.
2022-12-05 13:53:36 +01:00
Devon Hudson 1df1a597ec
Remove assume offline on broadcast received 2022-12-02 16:18:48 -07:00
Devon Hudson 98c7711b84
Merge branch 'main' into mailbox 2022-12-02 16:13:30 -07:00
Devon Hudson b60669ad63
Add federation client endpoint for async_events 2022-12-02 15:18:53 -07:00
Devon Hudson 56e9b54f31
Handle retrieving async events on request 2022-12-02 14:07:40 -07:00
Devon Hudson bfa784b224
Add initial api for getting async_events 2022-12-02 11:48:55 -07:00
Devon Hudson 9dbfcd9e06
Handle async send success/fail cases 2022-12-01 14:17:13 -07:00
Devon Hudson e26d07c779
Add test for queued edus to set server assumed offline 2022-11-30 12:42:17 -07:00
Devon Hudson 1687aac200
Store assumed offline servers in the database 2022-11-30 12:38:54 -07:00
Devon Hudson 22ec1deaca
Handle async queue sending error to not fail if any mailserver succeeds 2022-11-29 18:22:00 -07:00
Devon Hudson 266bf20a85
Try sending to async mailservers if the conditions are right 2022-11-29 18:12:18 -07:00
Devon Hudson 116bdfc511
Add doc comments for statistics 2022-11-29 17:54:48 -07:00
Devon Hudson 0c86e8269d
Query mailservers when creating a new server statistics instance 2022-11-29 17:51:04 -07:00
Devon Hudson 0520a9b0ed
Add database table for mailservers 2022-11-29 17:43:09 -07:00
Devon Hudson 2df4b0750e
Don't do regular federation if should be using mailserver 2022-11-29 15:52:21 -07:00
Devon Hudson d4dde15113
Mark server as assumed offline with configurable value 2022-11-29 15:10:16 -07:00
Devon Hudson f218daaf64
Integrate initial s&f interactions with db 2022-11-23 11:21:07 -07:00
Devon Hudson b237f2d62d
Add s&f database interactions 2022-11-22 14:28:48 -07:00
Neil Alexander 8299da5905
Fix registration for virtual hosting 2022-11-18 13:24:02 +00:00
devonh a8e7ffc7ab
Add p2p wakeup broadcast handling to pinecone demos (#2841)
Adds wakeup broadcast handling to the pinecone demos.
This will reset their blacklist status and interrupt any ongoing
federation queue backoffs currently in progress for this peer.
The end result is that any queued events will quickly be sent to the
peer if they had disconnected while attempting to send events to them.
2022-11-18 00:29:23 +00:00
Neil Alexander 16325203af
Try that again 2022-11-17 09:32:19 +00:00
Neil Alexander 607819f425
Fix /key/v2/server, add HTTP Host matching 2022-11-17 09:26:56 +00:00
Neil Alexander 163dabc498
Fix bug in a2f72dd9 2022-11-16 15:10:33 +00:00
Neil Alexander a2f72dd966
Fix slice out of bounds in federation API 2022-11-16 09:39:19 +00:00
Neil Alexander d558da1c87
Virtual host server name workaround 2022-11-16 09:34:09 +00:00
Neil Alexander deddf686b9
Tweak /key/v2/server 2022-11-16 09:16:07 +00:00
Neil Alexander 9b8bb55430
Don't get blacklisted hosts when querying joined servers (#2880)
Otherwise we just waste time/CPU.
2022-11-15 17:21:16 +00:00
Neil Alexander 6650712a1c
Federation fixes for virtual hosting 2022-11-15 15:05:23 +00:00
Neil Alexander 529df30b56
Virtual hosting schema and logic changes (#2876)
Note that virtual users cannot federate correctly yet.
2022-11-11 16:41:37 +00:00
Till 0193549201
Send presence to newly added servers (#2869)
This should make `New federated private chats get full presence
information (SYN-115)` happy.
2022-11-11 10:35:17 +01:00
Devon Hudson b9d5fd942f
Add initial test for forward_async federation endpoint 2022-11-10 18:24:21 -07:00
Till b13cb43785
Send presence to joined hosts only (#2858)
Send presence events only to rooms the user is participating, not all
servers we know about.
Should fix #2752
2022-11-04 13:23:00 +01:00
Neil Alexander a2706e6498
Refactor claimRemoteKeys 2022-10-27 15:34:26 +01:00