Commit graph

16501 commits

Author SHA1 Message Date
Mark Felder
b50261262e Fix publisher job migration error 2024-07-30 11:48:10 -04:00
feld
355b028c23 Merge branch 'hackney-pool-timeout' into 'develop'
Align Hackney and Gun connection pool timeouts

See merge request pleroma/pleroma!4197
2024-07-30 15:33:17 +00:00
feld
a90838accf Merge branch 'federation/increase' into 'develop'
Increase federator outgoing job parallelism

See merge request pleroma/pleroma!4196
2024-07-30 15:31:18 +00:00
feld
18469f3b1d Merge branch 'oban/simpler-publish' into 'develop'
Publisher job simplification

See merge request pleroma/pleroma!4194
2024-07-30 15:23:28 +00:00
Mark Felder
49f46220ff Align Hackney and Gun connection pool timeouts 2024-07-30 11:11:30 -04:00
Mark Felder
a6119210b7 Increase federator outgoing job parallelism 2024-07-30 11:06:55 -04:00
Mark Felder
1bce582f0d Fix migration crashing due to Oban not running
We can use Pleroma.Repo to fetch the jobs
2024-07-30 10:58:10 -04:00
feld
4e24445b50 Merge branch 'oban/transmog' into 'develop'
Remove unused Oban queue

See merge request pleroma/pleroma!4195
2024-07-30 14:14:40 +00:00
Mark Felder
66649e1dcd Remove unused Oban queue 2024-07-30 09:49:09 -04:00
Mark Felder
05d4989795 Insert replacement jobs in the new format if any remain undelivered
The old jobs remain and will fail gracefully
2024-07-29 14:00:46 -04:00
feld
c9042763b0 Merge branch 'oban/backup' into 'develop'
Backups Refactoring

See merge request pleroma/pleroma!4158
2024-07-29 16:07:35 +00:00
Mark Felder
b48fd89a41 Revert unintended change to the Logger metadata tag name 2024-07-29 10:03:22 -04:00
Mark Felder
8893ad9899 Fix cancelling jobs 2024-07-29 09:59:35 -04:00
Mark Felder
74072622e0 Remove actor and actor_id from the job as it can be inferred by the activity 2024-07-29 09:52:13 -04:00
Mark Felder
59309a9eff Publisher job simplification
Publisher jobs now store the the activity id instead of inserting duplicate JSON data in the Oban queue for each delivery.
2024-07-28 21:04:36 -04:00
feld
6876761837 Merge branch 'fix/optimistic-inbox' into 'develop'
Fix Optimistic Inbox for failed signatures

See merge request pleroma/pleroma!4193
2024-07-25 21:18:04 +00:00
Mark Felder
21cf321f74 Quiet Dialyzer
It is angry we are making a fake %Plug.Conn{} to pass through Signature.validate_signature/1. We can work around it by making the code support a map, but then we lose the benefit of being able to use put_req_header/3
2024-07-25 16:36:34 -04:00
Mark Felder
c19d55cabb Safer string concatenation 2024-07-25 16:18:45 -04:00
Mark Felder
84b15ac111 Improve specs and matching 2024-07-25 16:18:31 -04:00
Mark Felder
775f45cfe2 Merge remote-tracking branch 'origin/develop' into oban/backup 2024-07-25 14:43:40 -04:00
Mark Felder
a964368e31 Add test to fetch and validate an activity that originally failed signature 2024-07-25 14:34:55 -04:00
Mark Felder
1b9c887dbb Extract validate_signature/2 from the HTTPSignaturePlug
This logic only exists in the Plug, so attempting to validate the signature by calling the library function HTTPSignature.validate_conn/2 directly will never work because we do not attempt to construct the (request-target) and @request-target headers with both the commonly misinterpreted and correct implementation of this field. Therefore all attempts to validate a signature from an Oban Job will fail.
2024-07-25 12:54:27 -04:00
Mark Felder
1a482a73c3 Fix Optimistic Inbox for failed signatures
When signatures fail on incoming activities we put the job into Oban to be processed later instead of doing the user fetching and validation inline which is expensive and increases latency on the incoming POST request. Unfortunately we did not retain the :method, :request_path, and :query_string parameters from the conn so the signature validation and Oban Job would always fail.

This was most obvious when Mastodon sends Deletes for users your server has never seen before.
2024-07-25 11:46:30 -04:00
feld
700c106680 Merge branch 'oban/rich-media-hardening' into 'develop'
Harden Rich Media parsing against very slow or malicious URLs

See merge request pleroma/pleroma!4192
2024-07-24 20:58:31 +00:00
Mark Felder
6598919213 Document the new timeout setting 2024-07-24 16:16:37 -04:00
Mark Felder
2314ff5981 Harden Rich Media parsing against very slow or malicious URLs 2024-07-24 15:55:30 -04:00
Mark Felder
8c5a68a62e Increase Oban.Pruner max_age to 15 mins 2024-07-24 15:52:23 -04:00
Mark Felder
97d488aea3 Fix RichMedia negative cache entries
The negative cache entry was a nil value, but that is an expected response when the cache is missing an entry so it didn't work as intended.
2024-07-24 15:45:39 -04:00
Mark Felder
5a62868106 Consider errors during HTTP GET and HEAD to be unrecoverable and insert a negative cache entry
This is for a normal HTTP error response or timeout while receiving the data. A hard error from a process crash, DNS lookup failure, etc should produce a different response than {:ok, %Tesla.Env{}} and the request/job will be retryable.
2024-07-24 15:43:49 -04:00
Mark Felder
731f7b87d2 Pad RichMediaWorker timeout to be 2s longer than the Rich Media HTTP timeout 2024-07-24 15:42:50 -04:00
Mark Felder
858fd01c01 Pleroma.HTTP: permit passing through custom Tesla Middlware for requests 2024-07-24 15:40:15 -04:00
feld
f32a837afa Merge branch 'dialyzer' into 'develop'
Fix dialyzer error

See merge request pleroma/pleroma!4190
2024-07-23 14:51:45 +00:00
Mark Felder
187897874b Make backup timeout configurable 2024-07-23 10:30:57 -04:00
Mark Felder
e5cbbaf3f0 Extend the backup job time limit to 30 minutes 2024-07-23 10:30:57 -04:00
Mark Felder
3f60d7bf64 Better random tempdir format 2024-07-23 10:30:57 -04:00
Mark Felder
ece063586b Limit backup jobs to 5 minutes 2024-07-23 10:30:57 -04:00
Mark Felder
e5a738d465 Refactor tests for Backups 2024-07-23 10:30:56 -04:00
Mark Felder
8f285a787f Refactor backups to be fully controlled by Oban 2024-07-23 10:30:40 -04:00
Mark Felder
2ee8f4f062 Fix dialyzer error
lib/pleroma/application.ex:1:pattern_match The pattern can never match the type true.
2024-07-23 10:25:39 -04:00
feld
ff663c0aeb Merge branch 'commonapi-cleanup' into 'develop'
CommonAPI Cleanup

See merge request pleroma/pleroma!4189
2024-07-22 23:36:18 +00:00
Mark Felder
c700c5db43 changelog 2024-07-22 19:23:16 -04:00
Mark Felder
12f498bc0d Fix order of args for show_reblogs/2 2024-07-22 19:19:21 -04:00
Mark Felder
3f4f567c9c Fix order of args for hide_reblogs/2 2024-07-22 19:16:00 -04:00
Mark Felder
adb93f7e5d Fix order of args for unfollow/2 2024-07-22 19:11:22 -04:00
Mark Felder
f79a16c062 Fix order of args for follow/2 2024-07-22 19:07:55 -04:00
Mark Felder
082319ff48 Fix order of args for unblock/2 2024-07-22 18:44:32 -04:00
Mark Felder
cbc5e48417 Fix order of args for block/2 2024-07-22 18:41:50 -04:00
Mark Felder
1cccc0fc21 Fix order of args for vote/3 2024-07-22 18:38:02 -04:00
Mark Felder
8127e0d8cc Fix order of args for thread_muted?/2 2024-07-22 18:25:37 -04:00
Mark Felder
4601473aaf Fix order of args for add_mute/2 2024-07-22 18:25:37 -04:00