Commit graph

72 commits

Author SHA1 Message Date
phiresky
69ead52eb8 lint 2024-07-11 15:35:20 +02:00
phiresky
bef7190b56 allow out of order receives in test 2024-07-11 15:33:46 +02:00
phiresky
dd9c89e4ef different data every time so activities are distinguishable 2024-07-11 00:54:38 +02:00
phiresky
a40fea3e76 fix send 100 test 2024-07-10 16:52:57 +02:00
phiresky
40b3c1a24d add test to federate 100 events 2024-07-09 23:58:08 +02:00
phiresky
0f5b69cffc ci fix 2024-06-29 19:29:35 +02:00
phiresky
76c6487390 federation tests: ensure server stop after test and random activity id 2024-06-29 19:21:15 +02:00
phiresky
e3fef895a1 add debug to make localhost urls not valid in ap crate, add some debug logs 2024-06-25 17:13:44 +02:00
phiresky
2e2345e6f7 Merge remote-tracking branch 'origin/main' into federation-send-parallel 2024-06-24 16:35:57 +02:00
a3c8761bed
Revert "Remove unneeded error "last successful id is higher than latest id" (fixes #4363) (#4486)" (#4806)
This reverts commit c895e57086.
2024-06-14 08:15:12 -04:00
phiresky
101901b8e0 fix clippy 2024-05-31 13:34:41 +02:00
phiresky
7ee63f4da8 run federation tests twice 2024-05-31 11:12:53 +02:00
phiresky
5538794d7c move comment 2024-05-30 14:40:58 +02:00
phiresky
9d87921ebb comment 2024-05-30 13:24:13 +02:00
phiresky
2acdc78d81 remove crashable, comment 2024-05-30 13:21:26 +02:00
phiresky
175133f0cd comment about reverse ordering 2024-05-30 13:02:19 +02:00
phiresky
cdff275803
Update crates/federate/src/send.rs
Co-authored-by: dullbananas <dull.bananas0@gmail.com>
2024-05-30 12:44:35 +02:00
phiresky
a0b0a7a0d9 lint fix 2024-05-30 12:38:17 +02:00
phiresky
ffb99cd036 Merge remote-tracking branch 'origin/main' into federation-send-parallel 2024-05-30 12:26:55 +02:00
phiresky
10d3b7d698 fix after merge 2024-05-30 12:23:37 +02:00
phiresky
e8a7bb07a3
fix both permanent stopping of federation queues and multiple creation of the same federation queues (#4754)
Co-authored-by: Nutomic <me@nutomic.com>
2024-05-30 05:08:27 -04:00
phiresky
7d80a3c7d6
replace instanceid with domain (#4753) 2024-05-29 23:10:25 +02:00
Dessalines
abcfa266af
Fixing slowness in saved post fetching. #4756 (#4758)
* Fixing slowness in saved post fetching. #4756

* Also fix comment_view.rs
2024-05-29 17:03:42 -04:00
phiresky
7cb4e8222c Merge branch 'fix-dupe-activity-sending' into federation-send-parallel 2024-05-29 15:38:53 +02:00
phiresky
13ff059f83 fix both permanent stopping of federation queues and multiple creation of the same federation queues 2024-05-29 15:16:54 +02:00
af034f3b5e
Unit tests and cleanup for outgoing federation code (#4733)
* test setup

* code cleanup

* cleanup

* move stats to own file

* basic test working

* cleanup

* processes test

* more test cases

* fmt

* add file

* add assert

* error handling

* fmt

* use instance id instead of domain for stats channel
2024-05-27 09:34:58 -04:00
dullbananas
ec77c00ef8
Fix lost separation caused by comment width change (#4739)
* Update post_view.rs

* Update structs.rs

* Update worker.rs

* Update worker.rs
2024-05-23 14:05:35 -04:00
d8dc38eb06
Upgrade dependencies (#4740) 2024-05-23 10:55:20 -04:00
c96017c009
Configure max comment width in clippy (#4738)
* Configure max comment width in clippy

* update default config
2024-05-23 08:46:26 -04:00
6b46a70535
Extra logging to debug duplicate activities (ref #4609) (#4726)
* Extra logging to debug duplicate activities (ref #4609)

* Fix logging for api tests

* fmt
2024-05-21 14:47:06 -04:00
phiresky
a7c7abd428 improve msg 2024-04-30 17:38:03 +02:00
Dessalines
d075acce43
Make all single-fetch database calls return an Option. (#4617)
- Diesel ordinarily throws an error when no results are returned for a
  single fetch, which is a bit confusing. This PR ensures that the
  missing value cases are all caught, and wrapped with new LemmyErrors,
  rather than diesel errors.
- Fixes #4601
2024-04-16 14:48:15 +02:00
phiresky
c1932f9009 off by one issue 2024-04-15 21:05:14 +02:00
phiresky
5e986ef5dd move federation concurrent config to config file 2024-04-15 19:44:59 +02:00
phiresky
e719bafc9b extract sending task code to separate file 2024-04-15 19:25:40 +02:00
phiresky
7eedcb7be2 cleanup 2024-04-15 18:45:57 +02:00
phiresky
a3d705f0d6 split inbox functions into separate file 2024-04-15 18:39:07 +02:00
phiresky
a66aec69dd inbox_urls return vec 2024-04-15 18:05:46 +02:00
phiresky
987174a6c1 lint and set force_write true when a request fails 2024-04-15 17:59:26 +02:00
phiresky
491daabaf2 federation: some comments 2024-04-13 23:48:32 +02:00
phiresky
539f06af97 federation: parallel sending 2024-04-13 23:18:28 +02:00
1d0a6ac08f
Avoid breaking api change, reduce api cache duration (#4610)
* Dont mark site.public_key as `serde(skip)` to avoid breaking change (fixes #4605)

* Reduce cache duration for api
2024-04-09 10:10:20 -04:00
087684658a
Cache result of LocalSite::read to avoid unnecessary db calls (#4585)
* Cache result of LocalSite::read to avoid unnecessary db calls

* single const for cache duration

* clippy

* revert apub send changes

* clippy

* fmt
2024-04-03 17:38:31 -04:00
Dessalines
0f77951e05
Upgrading deps. (#4537)
* Upgrading deps.

* Addressing PR comments
2024-03-18 10:36:49 +01:00
c895e57086
Remove unneeded error "last successful id is higher than latest id" (fixes #4363) (#4486) 2024-03-01 11:31:37 -05:00
SleeplessOne1917
4b4b99aa78
Allow community mods to see votes in addition to admins (#4392)
* Allow community mods to see votes in addition to admins

* Use Post instead of PostView

---------

Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
2024-01-23 18:47:28 -05:00
b58da11fb7
Mark instance as alive after successful activity send (fixes #4039) (#4377)
* Mark instance as alive after successful activity send (fixes #4039)

* clippy

* Instance::update

* domain

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2024-01-19 09:40:12 -05:00
4ca63c5641
Move apub context to join-lemmy.org (fixes #4234) (#4302)
* Move apub context to join-lemmy.org (fixes #4234)

* Dont store federation context in sent_activity table

* include basic activitypub context

* update lib

* ci
2024-01-05 15:42:46 +01:00
phiresky
0e6669f617
no endless loop if queue too recent (#4349) 2024-01-04 13:28:26 -05:00
phiresky
024ab7d530
Fix federate loop (#4330)
* make activity channel infallible

* clippy

* federate: make cancellabletask loop itself
2024-01-03 13:30:06 -05:00