]> Untitled Git - lemmy.git/commit
Federation async (#848)
authorRiley <asonix@asonix.dog>
Wed, 1 Jul 2020 12:54:29 +0000 (07:54 -0500)
committerGitHub <noreply@github.com>
Wed, 1 Jul 2020 12:54:29 +0000 (08:54 -0400)
commita074564458b8a108b77d98e5e8ce24168656763a
tree8cfb4e463b6b2dbd3c4b3ac2f312a42542f38d64
parent4c1cb5999cad496714cec67f101be38cd281d416
Federation async (#848)

* Asyncify more

* I guess these changed

* Clean PR a bit

* Convert more away from failure error

* config changes for testing federation

* It was DNS

So actix-web's client relies on TRust DNS Resolver to figure out
where to send data, but TRust DNS Resolver seems to not play nice
with docker, which expressed itself as not resolving the name to
an IP address _the first time_ when making a request. The fix was
literally to make the request again (which I limited to 3 times
total, and not exceeding the request timeout in total)

* Only retry for connecterror

Since TRust DNS Resolver was causing ConnectError::Timeout,
this change limits the retry to only this error, returning
immediately for any other error

* Use http sig norm 0.4.0-alpha for actix-web 3.0 support

* Blocking function, retry http requests

* cargo +nightly fmt

* Only create one pictrs dir

* Don't yarn build

* cargo +nightly fmt
47 files changed:
docker/dev/docker-compose.yml
docker/federation-test/run-tests.sh
docker/federation-test/servers.sh [new file with mode: 0755]
docker/federation-test/tests.sh [new file with mode: 0755]
docker/federation/Dockerfile
docker/federation/docker-compose.yml
docker/federation/nginx.conf
server/Cargo.lock
server/Cargo.toml
server/src/api/comment.rs
server/src/api/community.rs
server/src/api/mod.rs
server/src/api/post.rs
server/src/api/site.rs
server/src/api/user.rs
server/src/apub/activities.rs
server/src/apub/comment.rs
server/src/apub/community.rs
server/src/apub/community_inbox.rs
server/src/apub/extensions/group_extensions.rs
server/src/apub/extensions/signatures.rs
server/src/apub/fetcher.rs
server/src/apub/mod.rs
server/src/apub/post.rs
server/src/apub/private_message.rs
server/src/apub/shared_inbox.rs
server/src/apub/user.rs
server/src/apub/user_inbox.rs
server/src/db/activity.rs
server/src/db/code_migrations.rs
server/src/db/comment.rs
server/src/db/community.rs
server/src/db/password_reset_request.rs
server/src/db/user.rs
server/src/lib.rs
server/src/main.rs
server/src/rate_limit/mod.rs
server/src/rate_limit/rate_limiter.rs
server/src/request.rs [new file with mode: 0644]
server/src/routes/api.rs
server/src/routes/feeds.rs
server/src/routes/nodeinfo.rs
server/src/routes/webfinger.rs
server/src/settings.rs
server/src/websocket/mod.rs
server/src/websocket/server.rs
ui/src/api_tests/api.spec.ts