summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-06Remove unused mocksMark Felder
2024-08-06ChangelogMark Felder
2024-08-06Use a struct to hold the prepared data passed to publish_one/1Mark Felder
2024-08-06Force cc to an empty list if undefinedMark Felder
2024-08-06Test that cc on a published Follow is an empty listMark Felder
2024-08-06Test Factory: ensure remote users have a valid inboxMark Felder
Without a valid inbox we can't generate the publish_one Oban jobs
2024-08-06Remove test, logic was flawedMark Felder
Before splitting the publish_one/1 function into two parts for testing purposes we had logic that checked the keys of params for :unreachable_since and if it was absent it did not set the instance as reachable. There is also a test to validate that when unreachable_since is nil, we set it as reachable. However the default value of :unreachable_since when an instance is reachable is nil. The test appears to be testing a scenario that does not exist in the real world, and with this refactor we will always have an :unreachable_since key. We were attempting to update the reachability upon every successful federation because we always include it when we generate the publish_one jobs.
2024-08-06Split Federator.publish_one/1 into a second function called prepare_one/1Mark Felder
2024-08-06Use the normal Oban test assertionsMark Felder
2024-08-05Merge branch 'get-statuses-param' into 'develop'Haelwenn
Support `id` param in `GET /api/v1/statuses` See merge request pleroma/pleroma!4204
2024-08-03Support `id` param in `GET /api/v1/statuses`marcin mikołajczak
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-02Merge branch 'gun/snooze' into 'develop'feld
Gun: Publisher job behavior improvement See merge request pleroma/pleroma!4202
2024-08-02Gun: Publisher job behavior improvementMark Felder
Gun's connection pool also returns an error if duplicate workers are launched simultaneously. Snooze on this error as well, and lower the snooze to 3 seconds with the optimism that the connection will still be open by then and the delivery can be completed quickly. The original setting of 30 seconds is pretty high and means there's an unnatural lag between deliveries of activities destined to the same server that were created at nearly the same time. This configuration should be more efficient.
2024-08-02Merge branch 'stable' into 'develop'lain
Stable See merge request pleroma/pleroma!4201
2024-08-01Merge branch 'release/2.7.0' into 'stable'lain
v2.7.0 See merge request pleroma/pleroma!4179
2024-08-01Mix: Update version to 2.7.0Lain Soykaf
2024-08-01Frontend: Update to 2.7.0Lain Soykaf
2024-08-01Prepare changelogLain Soykaf
2024-07-31Merge branch 'fix/disclose_client' into 'develop'feld
Fix User.disclose_client never working correctly See merge request pleroma/pleroma!4199
2024-07-31Fix User.disclose_client never working correctlyMark Felder
Our test environment cheats by constructing a conn with a custom oauth_access/2 function. This assigns a :token to the conn but due to the way it is constructed it has the :user preloaded. When the OAuth Plug fetches a token it does not preload the user, so the check for user.disclose_client was always nil and assumed to be false. Preloading the :user ensures the test environment matches reality.
2024-07-30Merge branch 'fix-migration' into 'develop'feld
Fix publisher job migration error See merge request pleroma/pleroma!4198
2024-07-30Fix publisher job migration errorMark Felder
2024-07-30Merge branch 'hackney-pool-timeout' into 'develop'feld
Align Hackney and Gun connection pool timeouts See merge request pleroma/pleroma!4197
2024-07-30Merge branch 'federation/increase' into 'develop'feld
Increase federator outgoing job parallelism See merge request pleroma/pleroma!4196
2024-07-30Merge branch 'oban/simpler-publish' into 'develop'feld
Publisher job simplification See merge request pleroma/pleroma!4194
2024-07-30Align Hackney and Gun connection pool timeoutsMark Felder
2024-07-30Increase federator outgoing job parallelismMark Felder
2024-07-30Fix migration crashing due to Oban not runningMark Felder
We can use Pleroma.Repo to fetch the jobs
2024-07-30Merge branch 'oban/transmog' into 'develop'feld
Remove unused Oban queue See merge request pleroma/pleroma!4195
2024-07-30Remove unused Oban queueMark Felder
2024-07-29Insert replacement jobs in the new format if any remain undeliveredMark Felder
The old jobs remain and will fail gracefully
2024-07-29Merge branch 'oban/backup' into 'develop'feld
Backups Refactoring See merge request pleroma/pleroma!4158
2024-07-29Revert unintended change to the Logger metadata tag nameMark Felder
2024-07-29Fix cancelling jobsMark Felder
2024-07-29Remove actor and actor_id from the job as it can be inferred by the activityMark Felder
2024-07-28Publisher job simplificationMark Felder
Publisher jobs now store the the activity id instead of inserting duplicate JSON data in the Oban queue for each delivery.
2024-07-25Merge branch 'fix/optimistic-inbox' into 'develop'feld
Fix Optimistic Inbox for failed signatures See merge request pleroma/pleroma!4193
2024-07-25Quiet DialyzerMark Felder
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-25Safer string concatenationMark Felder
2024-07-25Improve specs and matchingMark Felder
2024-07-25Merge remote-tracking branch 'origin/develop' into oban/backupMark Felder
2024-07-25Add test to fetch and validate an activity that originally failed signatureMark Felder
2024-07-25Extract validate_signature/2 from the HTTPSignaturePlugMark Felder
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-25Fix Optimistic Inbox for failed signaturesMark Felder
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-24Merge branch 'oban/rich-media-hardening' into 'develop'feld
Harden Rich Media parsing against very slow or malicious URLs See merge request pleroma/pleroma!4192
2024-07-24Document the new timeout settingMark Felder
2024-07-24Harden Rich Media parsing against very slow or malicious URLsMark Felder
2024-07-24Increase Oban.Pruner max_age to 15 minsMark Felder
2024-07-24Fix RichMedia negative cache entriesMark Felder
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-24Consider errors during HTTP GET and HEAD to be unrecoverable and insert a ↵Mark Felder
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.