Commit Graph

62 Commits (dfccf3efa50a1f75b46bfb54746aa9c00ec6910e)

Author SHA1 Message Date
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
Nutomic 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
Nutomic d8dc38eb06
Upgrade dependencies (#4740) 2024-05-23 10:55:20 -04:00
Nutomic 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
Nutomic 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
Nutomic 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
Nutomic 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
Nutomic 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
Nutomic 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
Nutomic 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
SleeplessOne1917 4ef00e068f
Prevent crates that shouldn't be published from being published (#4309)
* Prevent crates that shouldn't be published from being published

* Make dependent crates publishable

* Make dependent crates publishable

* fix toml formatting

* Removing publish=true

* Removing versioned deps.

---------

Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-12-20 09:11:58 -05:00
phiresky 6790b54d4d
make activity channel infallible (#4295) 2023-12-18 13:17:10 -05:00
phiresky 7353be5b68
federate-less-noisy (#4263) 2023-12-14 07:25:04 -05:00
Nutomic c7ee53026f
Upgrade dependencies (#4248)
* Upgrade dependencies

* clippy
2023-12-12 08:56:33 -05:00
Dessalines 2b5a31b411
Upgrading deps. (#4196)
* Upgrading deps.

* Try to use native node-fetch function.

* Fixing image upload tests.
2023-11-24 10:29:41 +01:00
dullbananas 30f7135f32
Use rust 1.74.0 in CI and move clippy lints to Cargo.toml (#4170)
* ci rust 1.74.0

* do it

* Update .woodpecker.yml

* Update Cargo.toml

* Update lint.sh

* Update lib.rs

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-11-21 08:51:22 -05:00
cetra3 1c03a86c17
Upgrade activitypub to `0.5.0-beta.5` (#4179)
* Remove anyhow test

* Update lock

* Fix lints hopefully!
2023-11-21 10:26:12 +01:00
phiresky b9b65c9c18
add federation queue state to get_federated_instances api (#4104)
* add federation queue state to get_federated_instances api

* feature gate

* move retry sleep function

* move stuff around
2023-11-06 16:07:04 -05:00
Nutomic 9007d49324
Remove unused deps (#4111)
* Remove unused deps

* Adding cargo-machete to woodpecker.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
2023-10-31 11:11:12 +01:00
Dessalines bd9739b5b7
Upgrading deps. (#4103) 2023-10-25 05:32:21 -04:00