Commit Graph

32 Commits (main)

Author SHA1 Message Date
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
1 month ago
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
1 month ago
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
2 months ago
Dessalines 0f77951e05
Upgrading deps. (#4537)
* Upgrading deps.

* Addressing PR comments
2 months ago
Nutomic c895e57086
Remove unneeded error "last successful id is higher than latest id" (fixes #4363) (#4486) 3 months ago
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>
4 months ago
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>
4 months ago
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
5 months ago
phiresky 0e6669f617
no endless loop if queue too recent (#4349) 5 months ago
phiresky 024ab7d530
Fix federate loop (#4330)
* make activity channel infallible

* clippy

* federate: make cancellabletask loop itself
5 months ago
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>
5 months ago
phiresky 6790b54d4d
make activity channel infallible (#4295) 5 months ago
phiresky 7353be5b68
federate-less-noisy (#4263) 5 months ago
Nutomic c7ee53026f
Upgrade dependencies (#4248)
* Upgrade dependencies

* clippy
5 months ago
Dessalines 2b5a31b411
Upgrading deps. (#4196)
* Upgrading deps.

* Try to use native node-fetch function.

* Fixing image upload tests.
6 months ago
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>
6 months ago
cetra3 1c03a86c17
Upgrade activitypub to `0.5.0-beta.5` (#4179)
* Remove anyhow test

* Update lock

* Fix lints hopefully!
6 months ago
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
7 months ago
Nutomic 9007d49324
Remove unused deps (#4111)
* Remove unused deps

* Adding cargo-machete to woodpecker.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
7 months ago
Dessalines bd9739b5b7
Upgrading deps. (#4103) 7 months ago
phiresky 2c283d90ca Revert "Revert "re-remove debug comments""
This reverts commit 6d519ef376.
8 months ago
phiresky dec25f9ee8 ensure overlap 8 months ago
phiresky 6d519ef376 Revert "re-remove debug comments"
This reverts commit ae37ca0137.
8 months ago
phiresky ae37ca0137 re-remove debug comments 8 months ago
phiresky a808d3208a use max(id) instead of seq max value to prevent uncommitted transactions from causing skipped activities 8 months ago
phiresky 1a0c866b51 logging temporary 8 months ago
phiresky a59a94492d more debug log 8 months ago
phiresky 9e886fba4a delay shorter 8 months ago
phiresky b09ffa7197 instead of changing fed delays in debug mode, change them via env variable 8 months ago
phiresky dca43dcfd9 fix a bug where after an hour community follows would be overwritten completely by an incremental upgrade 8 months ago
Dessalines 4f1240487e Fixing high CPU usage on federation worker recheck. Fixes #3958 8 months ago
phiresky 375d9a2a3c
Persistent, performant, reliable federation queue (#3605)
* persistent activity queue

* fixes

* fixes

* make federation workers function callable from outside

* log federation instances

* dead instance detection not needed here

* taplo fmt

* split federate bin/lib

* minor fix

* better logging

* log

* create struct to hold cancellable task for readability

* use boxfuture for readability

* reset submodule

* fix

* fix lint

* swap

* remove json column, use separate array columns instead

* some review comments

* make worker a struct for readability

* minor readability

* add local filter to community follower view

* remove separate lemmy_federate entry point

* fix remaining duration

* address review comments mostly

* fix lint

* upgrade actitypub-fed to simpler interface

* fix sql format

* increase delays a bit

* fixes after merge

* remove selectable

* fix instance selectable

* add comment

* start federation based on latest id at the time

* rename federate process args

* dead instances in one query

* filter follow+report activities by local

* remove synchronous federation

remove activity sender queue

* lint

* fix federation tests by waiting for results to change

* fix fed test

* fix comment report

* wait some more

* Apply suggestions from code review

Co-authored-by: SorteKanin <sortekanin@gmail.com>

* fix most remaining tests

* wait until private messages

* fix community tests

* fix community tests

* move arg parse

* use instance_id instead of domain in federation_queue_state table

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: SorteKanin <sortekanin@gmail.com>
8 months ago