Mark Felder
655ac98478
Merge remote-tracking branch 'origin/develop' into fix/debug-logs
2024-06-20 09:00:39 -04:00
Mark Felder
e1e099d3bf
Set console logs to :info for Elixir 1.15+
2024-06-19 23:26:12 -04:00
Mark Felder
17d04ccc8b
RichMedia backfill processing through Oban
2024-06-19 23:20:22 -04:00
Mark Felder
85b81cc933
Remove Logger from ConfigDB descriptions
2024-06-19 10:32:15 -04:00
Mark Felder
e628d00a81
Disable Ecto logging in tests
...
The debug logs are very noisy and can be enabled during analysis of a specific error believed to be SQL-related
2024-06-18 15:25:18 +00:00
Mark Felder
a734efeff8
Formatting
2024-06-12 15:21:43 -04:00
Lain Soykaf
41434ffcec
Tests: Don't spawn processes in tests.
2024-06-12 15:20:04 -04:00
Haelwenn (lanodan) Monnier
c389ea0f42
Fix compatibility with Loggers in Elixir 1.15+
2024-06-12 15:18:47 -04:00
d7468558b8
Merge remote-tracking branch 'origin/develop' into fork
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-06-04 18:36:25 +02:00
Mark Felder
cfc8d7aade
IPFS uploader: dialyzer fixes
...
lib/pleroma/uploaders/ipfs.ex:43:no_return
Function put_file/1 has no local return.
________________________________________________________________________________
lib/pleroma/uploaders/ipfs.ex:49:call
The function call will not succeed.
Pleroma.HTTP.post(
binary(),
_mp :: %Tesla.Multipart{
:boundary => binary(),
:content_type_params => [binary()],
:parts => [
%Tesla.Multipart.Part{
:body => binary(),
:dispositions => [any()],
:headers => [any()]
},
...
]
},
[],
[{:params, [{:"cid-version", <<49>>}]}]
)
will never return since the success typing is:
(binary(), binary(), [{binary(), binary()}], Keyword.t()) ::
{:error, _}
| {:ok,
%Tesla.Env{
:__client__ => %Tesla.Client{
:adapter => nil | {_, _} | {_, _, _},
:fun => _,
:post => [any()],
:pre => [any()]
},
:__module__ => atom(),
:body => _,
:headers => [{_, _}],
:method => :delete | :get | :head | :options | :patch | :post | :put | :trace,
:opts => [{_, _}],
:query => [{_, _}],
:status => nil | integer(),
:url => binary()
}}
and the contract is
(Pleroma.HTTP.Request.url(), String.t(), Pleroma.HTTP.Request.headers(), :elixir.keyword()) ::
{:ok, Tesla.Env.t()} | {:error, any()}
2024-05-30 15:14:27 -04:00
a0eff7cc94
Merge remote-tracking branch 'origin/develop' into fork
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-28 16:35:22 +02:00
Lain Soykaf
f5978da676
HTTPSignaturePlugTest: Rewrite to use mox.
2024-05-28 14:00:25 +04:00
Lain Soykaf
3b4be5daa2
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-secure-mode
2024-05-28 12:31:12 +04:00
lain
25903a4996
Merge branch 'auth-fetch-exception' into 'develop'
...
HTTPSignaturePlug: Add :authorized_fetch_mode_exceptions
See merge request pleroma/pleroma!4007
2024-05-28 04:42:35 +00:00
lain
8ff0c32903
Merge branch 'httpfixes' into 'develop'
...
Some HTTP and connection pool improvements
See merge request pleroma/pleroma!4124
2024-05-28 04:38:01 +00:00
Lain Soykaf
687ac4a850
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception
2024-05-27 23:09:17 +04:00
feld
38db406ce4
Merge branch 'simpler-oban-queues' into 'develop'
...
Oban queue simplification
See merge request pleroma/pleroma!4123
2024-05-27 19:02:53 +00:00
lain
121791882f
Merge branch 'explicitly-allow-unsafe-2' into 'develop'
...
Explicitly allow unsafe 2
See merge request pleroma/pleroma!4125
2024-05-27 18:43:05 +00:00
lain
3316a7ab70
Merge branch 'qdrant-search-2' into 'develop'
...
Search: Basic Qdrant/Ollama search
See merge request pleroma/pleroma!4109
2024-05-27 18:41:20 +00:00
Lain Soykaf
81e44ced0c
HTTPSecurityPlug: Fix tests
2024-05-27 22:13:20 +04:00
Mark Felder
ba511a30b9
RichMedia use of ConcurrentLimiter was removed in the refactor
2024-05-27 14:12:38 -04:00
Mark Felder
6b8c15a4a1
Remove MediaProxyWarmingPolicy config for ConcurrentLimiter as we are not using it
2024-05-27 14:11:42 -04:00
feld
42150d5581
Merge branch 'logger-metadata' into 'develop'
...
Logger metadata
See merge request pleroma/pleroma!3990
2024-05-27 17:53:33 +00:00
Mark Felder
0847d9ebaf
Oban queue simplification
2024-05-27 13:48:17 -04:00
Lain Soykaf
1c699144d2
HttpSecurityPlug: Don't allow unsafe-eval by default
2024-05-27 21:26:40 +04:00
a3ea7c9f06
Merge remote-tracking branch 'origin/develop' into fork
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-27 18:49:49 +02:00
feld
10b7efa98c
Merge branch 'anti-mention-spam-mrf' into 'develop'
...
Anti-mention Spam MRF
See merge request pleroma/pleroma!4072
2024-05-27 16:46:31 +00:00
Mark Felder
cab6372d7a
Make user age limit configurable
...
Switch to milliseconds for consistency with other configuration options in codebase
2024-05-27 12:31:29 -04:00
Mark Felder
0bddca361d
DNSRBL in an MRF
2024-05-27 12:23:36 -04:00
Lain Soykaf
d3e85da0fd
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception
2024-05-27 19:27:02 +04:00
lain
e93ae96e13
Merge branch 'nsfw-api-mrf' into 'develop'
...
NSFW API Policy
See merge request pleroma/pleroma!3471
2024-05-27 15:20:43 +00:00
Mark Felder
6708f154a4
Rework Gun connection pool sizes to make better use of the default 250 connections
2024-05-27 11:18:58 -04:00
Mark Felder
a50c657427
Add a dedicated connection pool for Rich Media
...
Sharing this pool with regular Media is problematic as Rich Media will connect to many different
domains and thrash the pool, but regular Media will have predictable connections to the webservers
hosting media for the fediverse servers you peer with.
2024-05-27 11:17:02 -04:00
Lain Soykaf
4325b1aec3
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into nsfw-api-mrf
2024-05-27 17:49:31 +04:00
Lain Soykaf
3055c1598b
IPFSTest: Fix configuration mocking
2024-05-27 17:22:18 +04:00
Lain Soykaf
825b4122a5
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into pleroma-ipfs_uploader
2024-05-27 16:23:40 +04:00
Lain Soykaf
f4c04e6b2d
QdrantSearch: Add health checks.
2024-05-27 14:21:55 +04:00
Lain Soykaf
08e9d995f8
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into qdrant-search-2
2024-05-27 13:50:22 +04:00
Mark Felder
61a3b79316
Search backend healthcheck process
2024-05-25 16:07:47 -04:00
Lain Soykaf
c67506ba68
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into auth-fetch-exception
2024-05-20 18:21:46 +04:00
Lain Soykaf
c139a9f38c
B Config: Set default Qdrant embedder to our fastembed-api server
2024-05-19 12:39:54 +04:00
Lain Soykaf
72ec261a69
B QdrantSearch: Switch to OpenAI api
2024-05-19 12:17:46 +04:00
7a03e49c4d
Merge remote-tracking branch 'origin/develop' into fork
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 18:10:03 +02:00
8c3f306c62
Revert to pleroma' card parser
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 17:54:13 +02:00
aceff8c128
Remove duplicated code
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-05-14 16:44:33 +02:00
Lain Soykaf
cd7e2138d1
Search: Basic Qdrant/Ollama search
2024-05-14 14:13:37 +04:00
Mark Felder
d21aa1a77c
Respect the TTL returned in OpenGraph tags
2024-05-07 19:54:56 -04:00
Mark Felder
df0734fcbf
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-05-07 19:54:56 -04:00
Mark Felder
ede414094f
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-05-07 19:54:56 -04:00
637f5bc431
Fix type in description
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-04-27 20:29:23 +02:00
5a6be1dd6e
Merge remote-tracking branch 'origin/develop' into fork
2024-03-21 00:00:28 +01:00
Mark Felder
462d5aa5cb
logger: remove request_id metadata which is not useful
2024-03-19 20:53:40 -04:00
Mark Felder
99cee755d8
Show Logger metadata in dev
2024-03-19 12:15:10 -04:00
Mark Felder
40823462e7
Logger metadata for request path and authenticated user
2024-03-19 12:15:10 -04:00
Mark Felder
7dfd148ff8
Logger metadata for inbound federation requests
2024-03-19 12:15:10 -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
923803a533
Tests: Explicitly set db pool size and max cases to the same value.
2024-03-19 10:34:37 +04:00
8b92459345
Merge remote-tracking branch 'origin/develop' into HEAD
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-18 22:00:35 +01: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
95bcd5d28f
Merge branch 'force-mention' into 'develop'
...
Add ForceMention mrf
See merge request pleroma/pleroma!4082
2024-03-17 12:32:14 +00:00
53a73aada2
Merge branch 'multitenancy' into fork
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-14 23:29:24 +01:00
0f33698747
Merge remote-tracking branch 'origin/develop' into fork
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-12 23:08:40 +01:00
bd33a7ac8f
Remove stuff I don't need to stay closer to upstream
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-12 16:07:29 +01:00
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
9cfa4e67b1
Add ForceMention mrf
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-03-01 18:16:09 +01:00
acb9e46074
Add some missing fields to instanceV2
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-27 13:25:26 +01:00
Mark Felder
202721e80c
Remove Cowboy-specific HTTP options
...
These were only used in dev and served no specific purpose. The equivalent settings for Bandit are under a key called :http1_options and the default values are set to 10_000.
2024-02-15 09:55:03 -05:00
Mark Felder
64ad451a7b
Websocket refactor to use Phoenix.Socket.Transport
...
This will make us compatible with Cowboy and Bandit
2024-02-14 15:27:07 -05:00
marcin mikołajczak
81414cc413
Merge branch 'translateLocally' into 'main'
...
Support translateLocally translation provider
See merge request soapbox-pub/rebased!302
2024-02-14 08:45:50 +00:00
eb1995d7c6
Add test for translateLocally
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-02-13 20:10:10 +01:00
913465f3d2
Merge remote-tracking branch 'origin/develop' into multitenancy-v2
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-01-24 16:59:21 +01:00
Mark Felder
eb4dd50f53
Use config to control inclusion of test emoji
2024-01-22 18:37:13 -05:00
Mark Felder
653b14e1c7
Use config to control Uploader callback timeout
2024-01-22 18:37:13 -05:00
Mark Felder
2330100371
Use config to control starting all HTTP pools in test env
2024-01-20 19:10:57 -05:00
Mark Felder
17877f612e
Use config to control streamer registry
2024-01-20 18:51:20 -05:00
Mark Felder
4bb57d4f25
Use config to control background migrators
2024-01-20 18:47:25 -05:00
Mark Felder
c7eda0b24a
Use config to control loading of custom modules
2024-01-20 18:43:53 -05:00
Mark Felder
029aaf3d74
Use config to control max_restarts
2024-01-20 18:41:04 -05:00
Mark Felder
1d816222e0
Remove support for multiple federation publisher modules
...
This also unravels some needless indirection.
2023-12-28 11:55:19 -05:00
017e35fbf1
Fix some more typos
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-28 00:17:04 +01:00
Alex Gleason
2eb5c453ad
Allow configuring the origin of the service actor
2023-12-24 00:02:50 -06:00
9fc6676d8c
Merge remote-tracking branch 'origin/develop' into instance-contact-account
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-12-22 13:54:44 +01:00
Mark Felder
928bda2e43
Fix invalid string comparison for OTP versions and replace with config
...
Old way was wrong for multiple reasons. If we do this as a config value it fixes :slave.start/3 being picked up as a compile warning on OTP26.
Also if we want to do any real clustering we'll need something like this to support OTP25 and older.
2023-12-20 23:13:33 +00:00
Haelwenn (lanodan) Monnier
1fc53c3077
config/description.exs: Remove quack
...
Was already removed in f40ccce7e9
2023-12-20 16:24:42 -05:00
Mark Felder
cd3abe0b4c
Fix more Logger warn -> warning
2023-12-20 16:23:57 -05:00
Haelwenn (lanodan) Monnier
086ba59d03
HTTPSignaturePlug: Add :authorized_fetch_mode_exceptions
2023-12-16 19:25:51 +01:00
Lain Soykaf
cca6c20eb6
Revert "EmailTest: use config mock"
...
This reverts commit dca41cc4a3
.
2023-12-12 19:35:19 +04:00
Lain Soykaf
dca41cc4a3
EmailTest: use config mock
2023-12-12 15:25:52 +04:00
Lain Soykaf
190120fd79
Tests: More test fixes
2023-12-12 14:03:46 +04:00
Lain Soykaf
00def0875b
RichMediaTest: Use mocked config
2023-12-12 13:28:11 +04:00
Lain Soykaf
22c4d89dbb
ScheduledActivity: Use config mocking
2023-12-12 12:48:55 +04:00
Lain Soykaf
90a47ca050
S3 Test: Remove global state dependencies
2023-12-11 09:25:05 +04:00
Lain Soykaf
06fc196772
Backup: Fix config
2023-12-10 19:46:25 +04:00
Lain Soykaf
6e3267d1bd
Tests: Fix all the tests.
2023-12-10 19:19:56 +04:00
Lain Soykaf
c068a218ea
Backup Tests: Split out async tests, use mox.
2023-12-10 18:57:46 +04:00
Lain Soykaf
e5beab7f16
Config/Test: Don't start promex during testing.
2023-12-10 17:18:18 +04:00
c4a89058ca
Use service domains like Takahe
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-11-29 00:10:31 +01:00
96747ece8d
Merge remote-tracking branch 'origin/develop' into multitenancy
2023-11-28 13:50:56 +01:00
lain
ef7bda61ad
Merge branch 'promex' into 'develop'
...
Switch to PromEx for prometheus metrics
See merge request pleroma/pleroma!3967
2023-11-28 07:50:16 +00:00
c78495900e
Merge remote-tracking branch 'origin/develop' into merge-pleroma
...
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-11-17 22:53:06 +01:00