Commit graph

16146 commits

Author SHA1 Message Date
nicole mikołajczyk
b3a0833d30 Use types for filtering notifications
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
2025-10-15 09:06:43 +02:00
Oneric
23dfbd491e Merge pull request 'mix: resync inlined data' (#964) from Oneric/akkoma:resync_inlined_copies into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/964
2025-08-30 19:39:14 +00:00
Oneric
f07d6f3602 changelog: add inlined cache and remote emoji changes 2025-08-30 00:00:00 +00:00
Oneric
86988e71f0 mix/database/resync_inlined_caches: also resync reactions
Relies on the fixups from preceding commits being applied.
2025-08-30 00:00:00 +00:00
Oneric
7a77e7fbd1 db/migration: tighten prefiltering in emoji fixup 20250806
While the previous version was already plenty fast for smaller instances
there seems to be a more-than-linear slowdown for large instances.
These prefilters should (hopefully) not exclude anything in need of
fixing, but seem to already cut down significantly on the overall
processing time.
2025-08-30 00:00:00 +00:00
Oneric
89801abad5 federation/in: drop remote part from received emoji reactions
The remote part is included in federated emoji names by e.g.
Iceshrimp.NET ever since remote emoji support was added in
4d21aa1670
and as of writing it still continues to do so.
It adds no value for us though; we add the remote part automatically
based on the URL and it makes it more difficult to correctly coalesce
the original reaction (from a user for whom the moji was local)
and the subsequent reactions with the identical emoji from users of
other instances. Additionally the remote part can cause issues when
later used with our REST API.

For non-reactions this is unproblematic and thus
there’s no need to change anything there.

Use a migration to fix up existing activities.
This will cause some (further) desync from the inlined reactions
array, but will be fixable with the resync mix task and avoids
issues when running the resync without first fixing existing activities.
2025-08-30 00:00:00 +00:00
Oneric
4765b79b49 Remove deprecated :warnings_as_errors from startup
This was already removed from mix.exs in
ea5a2a9f21
but as it turns out it was also re-set
during runtime.
Since we never set it outside of CI in
the first place there’s no need to
force-disable it here.
2025-08-30 00:00:00 +00:00
Oneric
16d0250c24 mix/database: by default fix replies count after object prune
Even if --keep-threads is used, replies of
pinned posts might still be pruned as documented
for this option.
Thus keep-threads is no reason to skip reply counter recalculation.
2025-08-30 00:00:00 +00:00
Oneric
f754feb67d federation: include required actor fields in minimal user fallback
ActivityPub spec demands each actor has at least an inbox and outbox.
Furthermore, the current representation wouldn’t even be accepted by
ourselves, since our processing requires objects to be flagged with a
sensible type else we don't know what to do with it.
Including the nickname is just a peemptive measure.

There were no reports of this causing problems in real-world deployments
and at least for federation with other Akkoma instances we should have
never run into this, since we _always_ expose the full representation of
the instance actor and atm also always use the latter for fetching
remote content (which prevents us from fetching followers-only content).
Nonetheless, serving something which violates spec and we wouldn’t even
accept ourselves seems obviously bad, so fix it and add tests to prevent
this from reoccuring.

Fixes bug introduced in 8f322456a0
2025-08-27 00:00:00 +00:00
Oneric
fcf4867ddf mix/database: add task to resync inlined array duplicates
Presumably those inlined copies were added to avoid the need for queries
each time the info is needed. However, they tend to desync from the actual
activities for not yet fully understood reasons; see:
https://akkoma.dev/AkkomaGang/akkoma/issues/956

As a workaround until the root cause is identified and fixed and/or
we no longer rely on the inliend copies add a mix task to regenerate
the inlined "cache" from the authorative activity data.

Does not yet deal with inlined emoji reactions
since its format is a pain to deal with.
2025-08-27 00:00:00 +00:00
Oneric
97e1eccf89 mix/database: add task to empty inlined replies lists
Those arrays are only used on first post receipt in side effect processing
and but an useless waste of space and misleading afterwards.
2025-08-27 00:00:00 +00:00
Oneric
ce73239e08 Fix private remote replies changing reply counter
In the ActivityPub module counter changes are already limited to
only publicly-visible replies. Apply the same limitiation here.
2025-08-27 00:00:00 +00:00
Oneric
e8b8941e40 docs: add missing image
Fixes omission in 1924ec08c0
2025-08-24 00:00:00 +00:00
Oneric
f5b2569b4f Merge pull request 'Adjust telemtry buckets for phoeix router and db metrics' (#970) from Oneric/akkoma:telemetry-router-buckets into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/970
2025-08-24 11:44:33 +00:00
Oneric
fda5b6551a changelog: add missing entries 2025-08-24 00:00:00 +00:00
Oneric
48c8ec10d8 ci: drop unused conditions 2025-08-24 00:00:00 +00:00
Oneric
157b7e1d97 Fix CI runs on push/merge to develop and stable
This emulates the previous effective behaviour of only
running tests on pull requests and skipping straight
to building artefacts and docs after merge.
Pull requests which do not pass tests shouldn’t be merged in the first place.
2025-08-24 00:00:00 +00:00
Oneric
7f9823258a metrics: adjust router and db buckets
Most HTTPS requests actually fall into the single-digit millisecond
range or below on average. Even the more costly endpoints almost always
average around the lower third of the millisecond magnitude.
Only endpoints doing synchronous remote HTTP fetches (e.g. for signing
keys) occasionally spike into the order of seconds.
As is, the bucket resolution is completely unfit to reason about
anything and even just averages are better indications.

Most database queries take less than a millisecond and even in total
almost all take less than 50ms for me. Decode time is but a tiny
fraction of that and queue time usually only takes a small part of total
time too (but may spike on high load).

Shift the buckets down to be able to
give insight into all relevant cases.
In particular this allows to determine whether high averages
are the result of generally high processing times or just a few
outliers lifting the whole average up (e.g. slow network fetches).

Exact numbers are biased towards my setup for lack of other comparison
data, but at least the order of magnitude should be ok everywhere.
2025-08-24 00:00:00 +00:00
Floatingghost
b8207d929d fix CI conditions 2025-08-23 22:27:45 +01:00
floatingghost
5a7c773ca1 Update .woodpecker/test.yml 2025-08-23 21:23:24 +00:00
floatingghost
20a77b404e Update .woodpecker/test.yml 2025-08-23 21:23:12 +00:00
Oneric
7c1a08913f Merge pull request 'Provide reference Grafana dashboard and improve docs related to monitoring+perf' (#966) from Oneric/akkoma:grafana_ref into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/966
2025-08-23 16:27:18 +00:00
Oneric
be2e014c60 Merge pull request 'Allow HTTP2 for outgoing connections and untangle the adapter opt mess' (#969) from Oneric/akkoma:untangle_adapter_opts into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/969
2025-08-23 15:54:43 +00:00
Oneric
ca15f8f6c0 Merge pull request 'Don’t retry delivery to explicitly deleted inboxes' (#968) from Oneric/akkoma:delivery_to_gone into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/968
2025-08-23 15:52:28 +00:00
Oneric
c62a476289 docs/cli/database/prune_objects: add note about --limit and --prune-pinned interaction 2025-08-23 00:00:00 +00:00
Oneric
acc05ca02f http: avoid failures connecting to HTTP2 servers supporting server push 2025-08-23 00:00:00 +00:00
Oneric
4d008c6bfd docs: add general optimisation and performance advice
And recommend a default config for remote pruning.
Also rewrite misleading note about vacuuming.
2025-08-23 00:00:00 +00:00
Oneric
0dc4b843e7 http: print stacktrace when exceptions occur during fetch
This log shows up very rarely in my history,
but if it does happen it is best to get the full context.
2025-08-23 00:00:00 +00:00
Oneric
7a49dd6c59 installation/nginx: allow incoming http2 connections 2025-08-20 00:00:00 +00:00
Oneric
c94d01a0ab Refactor AdapterHelper and default Finch opts
The old code was unnecessarily complicated, full of unused and/or
duplicated functions making it hard to understand what will actually
happen and for whom at runtime.
Since we only support a single HTTP backend this can be greatly simplified.

Now everything gets default options from a single place and only
functions to modify parts actually difffering across calls are exposed.
2025-08-20 00:00:00 +00:00
Oneric
cd7bc96bc6 web/endpoint: drop unused function load_from_system_env
It’s not called anywhere in out code and
also doesn’t appear to be part of Phoenix.Endpoint’s interface
2025-08-20 00:00:00 +00:00
Oneric
c3c5277e05 Allow both HTTP1 and HTTP2 for outgoing connections
No HTTP3/QUIC support yet.
Note, allowing both here means we don't actually profit from HTTP2 multiplexing
due to Finch(? or maybe a dependency of Finch?) limitations. But it means we can
now interact with HTTP2-only instances (if such exist) and still may get minor
gains from header compression etc

Adventurous admins can change the config to allow only HTTP2,
thus profiting from multiplexing (but breaking federation with
HTTP1-only instances which are in fact observed to exist).
2025-08-20 00:00:00 +00:00
Oneric
9bcee957c5 federation/out: don't retry deliveries to known-deleted actors 2025-08-19 00:00:00 +00:00
Oneric
da4d642945 telemetry: log which states get mapped to 'unknown' 2025-08-19 00:00:00 +00:00
nikclayton
2b388523c7 docs/client: add Pachli
It explicitly intends to keep v1 filters around.
2025-08-18 00:00:00 +00:00
nikclayton
54b561ee2c docs/clients: Tusky is dropping v1-filter support
The next Tusky release is going to remove support for the v1 filters API,
see: https://codeberg.org/tusky/Tusky/pulls/5215.

Since Akkoma doesn't support the v2 API this
could cause significant issues for Akkoma users.
2025-08-18 00:00:00 +00:00
Oneric
1924ec08c0 Provide reference Grafana dashboard
And improve monitoring documentation in particular
more detailed instructions for setting up Prometheus
metric scraping and the reference Grafana dashboard.
2025-08-17 00:00:00 +00:00
Oneric
06dac6e7b5 docs: drop exact version pins on python dependencies
These old package versions cause issues in modern Python environments.
2025-08-17 00:00:00 +00:00
Weblate
c2f8d36206 Translated using Weblate (Turkish)
Currently translated at 0.1% (2 of 1004 strings)

Translated using Weblate (Turkish)

Currently translated at 100.0% (0 of 0 strings)

Added translation using Weblate (Turkish)

Co-authored-by: Anonymous <noreply@weblate.org>
Co-authored-by: Hasan Yıldız <hasanyildiz0@yaani.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: http://translate.akkoma.dev/projects/akkoma/akkoma-backend-config-descriptions/tr/
Translation: Pleroma fe/Akkoma Backend (Config Descriptions)
2025-08-04 00:25:54 +00:00
Oneric
5beb286bff Merge pull request 'config/description: hint at Swoosh defaulting to SSL' (#955) from Oneric/akkoma:confdesc-swoosh-ssl into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/955
2025-07-29 19:18:39 +00:00
Oneric
af84dcb28f config/description: hint at Swoosh defaulting to SSL
Fixes: https://akkoma.dev/AkkomaGang/akkoma/issues/953
2025-07-29 19:02:17 +00:00
Oneric
23a4d5a15f Merge pull request 'federation/in: fix inlined featured collections' (#949) from Oneric/akkoma:fix-inline-featured into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/949
2025-07-24 18:55:59 +00:00
Oneric
deb8689eba federation/in: fix inlined featured collections
Resolves interop issue with a (reverted but possibly returning) bridgy change
as was reported in the comments of
https://akkoma.dev/AkkomaGang/akkoma/issues/831.
This won't change anything for the problem originally reported there.

Notably we now always fetch the full collection (up to the configured
item count limit) instead of only using the first page if its link was
inlined.
2025-07-21 17:45:20 +00:00
Oneric
e2987402b3 Merge pull request 'Optimise CI runs' (#938) from Oneric/akkoma:ci-tweaks into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/938
Reviewed-by: floatingghost <hannah@coffee-and-dreams.uk>
2025-07-11 22:23:29 +00:00
Oneric
ea5a2a9f21 mix: replace deprecated warnings_as_errors option 2025-06-22 17:36:56 +02:00
Oneric
5a5d4cb86f ci: drop variables from files not using them at all 2025-06-22 17:36:55 +02:00
Oneric
c7b46e3799 ci: make pipelines conditional
If only steps are conditional the whole CI workflow
will be held up waiting until a slot is available to start them
just to then not do anything at all.

This allows us to drop "when" condition from individual steps
whenever it is now redundant with the top-level condition.
2025-06-22 17:36:55 +02:00
Oneric
25da959772 ci: merge lint and test pipeline
The lint pipeline spent ~7 minutes downloading and compiling
and only a few seconds actually checking the style.
The former is fully redundandt with what’s done during test anyway.
2025-06-22 17:36:55 +02:00
Oneric
d63292561b ci/test: remove superfluous matrix combinations
When include is used only the specified combinations
are executed and the full list above is ignored
2025-06-22 17:36:55 +02:00
Oneric
16d7d612ff Merge pull request 'misc: missing changelog entries + drop accepts_chat_messages + dedupe htmlMfm test payloads' (#943) from Oneric/akkoma:misc_chat+changelog+dedupehtmlMfmTest into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/943
2025-06-22 15:10:04 +00:00