TODO: unify and more resiliant collection handling #950
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma#950
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We already have a common
Collections.Fetcher, but in the process of converting old code to it some Collection logic remained at the calling sites and the capabilities of the common fetcher not always fully leveraged.There should be no special logic gated behind checks for
"(Ordered)CollecctionPage","(ordered)Items","first"etc left outside of the common collection fetcher code. And no assumption of collection-like elements being just bare IDs — just pass them through the collection fetcher and/orget_ap_idbefore use.This lead to bugs like the interop issue when bridgy introduced an inlined
featuredcollection and might be responsible for the request fetch spams which we alleviated but had trouble reproducing and thus never fully fixed. Notably most reported instances of request spamming are related to collections (with some inline logic) (with the remaining being related to sync-user refreshes and too-strict validation).Implementing the changes below should make things both more resilient as well as cleaner and easier to understand with everything actually using the same logic. It can be piecewise and shouldn’t be too hard; #949 can serve of an example of how such a change might look like:
And also interpret "403" and "404" responses as a “private” collection; currently only 200 responses with an empty item list are considered “private”.
(This is currently used to decide whether to display follow(er|ing) counts and/or content; treating 403|404 as private collection instead of error also will reduce spurious error logs for other collection types)
fix_repliesinArticleNotePageValidator)This or the next item has a good chance of fixing the original issue reported in #831
(in particular
replies,featuredoroutboxmay inline objects or activities instead of only showing the AP id)featuredentries with a date, but just replace the date for all entries on each refresh from remotes. This seems kinda pointless and we could stop doing that (and purge it from db)I guess this is done for consistently with local pins, but do we actually need the date here or just an order? Arrays remain ordered anyway...
If we want to reintroduce this instead of having a fixed item count limit for all scenarios, we need to be able to pass a item count and/or page limit to the fetch function.
Useful e.g. to limit
featureditems to the max amount of allowed pins (which is typically much smaller than the genreic item limit) etc