Commit graph

15981 commits

Author SHA1 Message Date
Mark Felder 81b47a6caf Fix broken Rich Media parsing when the image URL is a relative path 2024-03-19 12:12:07 -04:00
Mark Felder 083cf816bb Respect the TTL returned in OpenGraph tags 2024-03-19 12:12:07 -04:00
Mark Felder f6d62429fd Fix broken tests 2024-03-19 12:12:07 -04:00
Mark Felder 3e2b089238 Increase the :max_body for Rich Media to 5MB
Websites are increasingly getting more bloated with tricks like inlining content (e.g., CNN.com) which puts pages at or above 5MB. This value may still be too low.
2024-03-19 12:12:07 -04:00
Mark Felder 372d68a55e RichMedia refactor
Rich Media parsing was previously handled on-demand with a 2 second HTTP request timeout and retained only in Cachex. Every time a Pleroma instance is restarted it will have to request and parse the data for each status with a URL detected. When fetching a batch of statuses they were processed in parallel to attempt to keep the maximum latency at 2 seconds, but often resulted in a timeline appearing to hang during loading due to a URL that could not be successfully reached. URLs which had images links that expire (Amazon AWS) were parsed and inserted with a TTL to ensure the image link would not break.

Rich Media data is now cached in the database and fetched asynchronously. Cachex is used as a read-through cache. When the data becomes available we stream an update to the clients. If the result is returned quickly the experience is almost seamless. Activities were already processed for their Rich Media data during ingestion to warm the cache, so users should not normally encounter the asynchronous loading of the Rich Media data.

Implementation notes:

- The async worker is a Task with a globally unique process name to prevent duplicate processing of the same URL
- The Task will attempt to fetch the data 3 times with increasing sleep time between attempts
- The HTTP request obeys the default HTTP request timeout value instead of 2 seconds
- URLs that cannot be successfully parsed due to an unexpected error receives a negative cache entry for 15 minutes
- URLs that fail with an expected error will receive a negative cache with no TTL
- Activities that have no detected URLs insert a nil value in the Cachex :scrubber_cache so we do not repeat parsing the object content with Floki every time the activity is rendered
- Expiring image URLs are handled with an Oban job
- There is no automatic cleanup of the Rich Media data in the database, but it is safe to delete at any time
- The post draft/preview feature makes the URL processing synchronous so the rendered post preview will have an accurate rendering

Overall performance of timelines and creating new posts which contain URLs is greatly improved.
2024-03-19 12:12:07 -04:00
lain f775a1931b Merge branch 'transient-validators-defaults' into 'develop'
Set defaults values on transient objects (attachment, poll options) validators

See merge request pleroma/pleroma!4090
2024-03-19 12:44:13 +00:00
Lain Soykaf 4e8a1b40cb Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into transient-validators-defaults 2024-03-19 16:26:02 +04:00
lain 8a14fdbe47 Update transient-validators-defaults.change 2024-03-19 12:03:43 +00:00
lain 4e37cd85ef Merge branch 'fix-bookmark-test' into 'develop'
CI: Move changelog check to later in the pipeline

See merge request pleroma/pleroma!4095
2024-03-19 12:02:10 +00:00
Lain Soykaf 040a980277 Add changelog 2024-03-19 15:03:16 +04:00
Lain Soykaf afae3a94a4 CI: Move changelog check to later in the pipeline
No reason to not run tests.
2024-03-19 13:54:35 +04:00
Lain Soykaf 9617189e96 Tests: Actually run the bookmark folder tests. 2024-03-19 13:51:04 +04:00
lain 8e37f19883 Merge branch 'test-improvements' into 'develop'
Tests: Explicitly set db pool size and max cases to the same value.

See merge request pleroma/pleroma!4094
2024-03-19 07:44:05 +00:00
Lain Soykaf 665947ab2a Tests: Reduced the max case number to make tests more stable. 2024-03-19 11:03:05 +04:00
Lain Soykaf 3cc8414c2e Add changelog 2024-03-19 10:38:29 +04:00
Lain Soykaf 923803a533 Tests: Explicitly set db pool size and max cases to the same value. 2024-03-19 10:34:37 +04:00
lain ca5766c0a7 Merge branch 'postgres-bump' into 'develop'
Update minimum Postgres version to 11.0; disable JIT

See merge request pleroma/pleroma!4093
2024-03-19 04:46:40 +00:00
Mark Felder 357553a64a Remove usage of :persistent_term for Postgres version storage, fix test
This test should not have been passing. The search result's activity id should not be the same id as the local post.

capture_log was not being used. Removed.
2024-03-18 16:27:52 -04:00
Mark Felder b822a912ad Remove test for postgres < 11 2024-03-18 16:15:40 -04:00
Mark Felder 1413d2e517 Remove vestiges of old Postgres support 2024-03-18 15:42:15 -04:00
Mark Felder 7f97fbc1ae Update minimum Postgres version to 11.0; disable JIT
This release is where JIT was introduced and it should be disabled. Pleroma's queries do not benefit from JIT, but it can increase latency of queries.
2024-03-18 15:36:26 -04:00
lain 0e4e20315b Merge branch 'bookmark-folders' into 'develop'
Bookmark folders

See merge request pleroma/pleroma!4080
2024-03-18 14:26:19 +00:00
marcin mikołajczak 60c4cb21ea InstanceView: Update features
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18 14:02:29 +01:00
lain 2b71f4897f Merge branch 'develop' into 'bookmark-folders'
# Conflicts:
#   docs/development/API/differences_in_mastoapi_responses.md
2024-03-18 10:35:02 +00:00
lain cf0aa1238c Merge branch 'public-polls' into 'develop'
Expose nonAnonymous field from Smithereen polls

See merge request pleroma/pleroma!3962
2024-03-18 06:26:22 +00:00
lain 4f7f44ced1 Merge branch 'develop' into 'develop'
Notifications: filter on users rather than activities

See merge request pleroma/pleroma!4089
2024-03-17 20:17:04 +00:00
Matthieu Rakotojaona a48f5f860e Notifications: filter on users rather than activities 2024-03-17 20:58:59 +01:00
lain d5b64846ed Merge branch 'remove-rum-tests' into 'develop'
CI: Remove RUM tests.

See merge request pleroma/pleroma!4092
2024-03-17 16:33:26 +00:00
lain 56e456fb5b Merge branch 'fix-3241' into 'develop'
Consider a case when users.inbox is nil (Fix 3241)

Closes #3241

See merge request pleroma/pleroma!4083
2024-03-17 13:38:59 +00:00
Lain Soykaf caf855cf9c ActivityPub.Publisher: Don't try federating if a user doesn't have an inbox. 2024-03-17 16:57:45 +04:00
Lain Soykaf 0450da88b6 Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-fix-3241 2024-03-17 16:42:17 +04:00
lain 95bcd5d28f Merge branch 'force-mention' into 'develop'
Add ForceMention mrf

See merge request pleroma/pleroma!4082
2024-03-17 12:32:14 +00:00
Lain Soykaf f0cca36e07 CI: Remove RUM tests. 2024-03-17 15:39:24 +04:00
feld 0b5bba23ce Merge branch 'backups' into 'develop'
Include following/followers in backups

See merge request pleroma/pleroma!4085
2024-03-15 19:32:35 +00:00
Haelwenn (lanodan) Monnier 4ad1d02d7e
changelog.d/transient-validators-defaults.change: insert 2024-03-15 16:25:02 +01:00
Haelwenn (lanodan) Monnier 48c22a67de
QuestionOptionsValidator: set default AS types 2024-03-15 16:22:18 +01:00
Haelwenn (lanodan) Monnier 8b651fab1d
AttachmentValidator: Set "Link" as default type 2024-03-15 16:22:18 +01:00
marcin mikołajczak bb0b17f4d9 Include following/followers in backups
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-10 23:53:12 +01:00
tusooa df7a8d4efe Merge branch 'instance-contact-account' into 'develop'
Add contact account to InstanceView

See merge request pleroma/pleroma!3960
2024-03-10 13:14:19 +00:00
feld 72daf522c9 Merge branch 'fix-framegrabs' into 'develop'
Fix ffmpeg framegrabs with Exile

See merge request pleroma/pleroma!4087
2024-03-08 14:48:26 +00:00
marcin mikołajczak c0c4a9ed0d Merge remote-tracking branch 'origin/develop' into instance-contact-account
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-08 12:12:55 +01:00
tusooa 139057f346 Merge branch 'link-verification' into 'develop'
Verify profile link ownership with rel="me"

Closes #2733

See merge request pleroma/pleroma!3959
2024-03-08 00:52:09 +00:00
Mark Felder 54ff7234b9 Fix ffmpeg framegrabs with Exile 2024-03-07 17:38:21 -05:00
marcin mikołajczak 961a5dd4cd Add test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-07 16:42:22 +01:00
marcin mikołajczak b7c625db0f Merge remote-tracking branch 'origin/develop' into link-verification 2024-03-07 13:13:49 +01:00
tusooa 47ce33a90d Apply tusooa's suggestion 2024-03-07 11:55:31 +00:00
tusooa 1422082bf2 Apply ledyba's suggestion(s) to 1 file(s) 2024-03-07 04:43:56 +00:00
tusooa 8298b326a7 Merge branch 'instance-v2' into 'develop'
Add some missing fields to instanceV2

See merge request pleroma/pleroma!4081
2024-03-07 01:31:27 +00:00
Kaede Fujisaki 0242c1f691 fmt 2024-03-02 18:34:12 +09:00
Kaede Fujisaki 1311f8314e add changelog.d 2024-03-02 18:24:39 +09:00