summaryrefslogtreecommitdiff
path: root/internal/federation/federatingactor.go
AgeCommit message (Collapse)AuthorFiles
2025-01-27[feature] Implement `deliveryRecipientPreSort` to prioritize delivery to ↵Libravatar tobi1
mentioned accounts (#3668) * weeeeenus * update to latest activity * update to use latest release tag of superseriousbusiness/activity --------- Co-authored-by: kim <grufwub@gmail.com>
2024-10-05[chore] Change order of error checking after PostInbox (#3394)Libravatar tobi1
Check for malformed errors embedded inside error *first*, then check for gtserror.WithCode.
2024-09-16[chore] Refactor federatingDB.Undo, avoid 500 errors on Undo Like (#3310)Libravatar tobi1
2024-04-11[performance] massively improved ActivityPub delivery worker efficiency (#2812)Libravatar kim1
* add delivery worker type that pulls from queue to httpclient package * finish up some code commenting, bodge a vendored activity library change, integrate the deliverypool changes into transportcontroller * hook up queue deletion logic * support deleting queued http requests by target ID * don't index APRequest by hostname in the queue * use gorun * use the original context's values when wrapping msg type as delivery{} * actually log in the AP delivery worker ... * add uncommitted changes * use errors.AsV2() * use errorsv2.AsV2() * finish adding some code comments, add bad host handling to delivery workers * slightly tweak deliveryworkerpool API, use advanced sender multiplier * remove PopCtx() method, let others instead rely on Wait() * shuffle things around to move delivery stuff into transport/ subpkg * remove dead code * formatting * validate request before queueing for delivery * finish adding code comments, fix up backoff code * finish adding more code comments * clamp minimum no. senders to 1 * add start/stop logging to delivery worker, some slight changes * remove double logging * use worker ptrs * expose the embedded log fields in httpclient.Request{} * ensure request context values are preserved when updating ctx * add delivery worker tests * fix linter issues * ensure delivery worker gets inited in testrig * fix tests to delivering messages to check worker delivery queue * update error type to use ptr instead of value receiver * fix test calling Workers{}.Start() instead of testrig.StartWorkers() * update docs for advanced-sender-multiplier * update to the latest activity library version * add comment about not using httptest.Server{}
2024-04-03[bugfix] improved authenticate post inbox error handling (#2803)Libravatar kim1
* improved PostInboxScheme() error handling / logging in case of failed auth * dumbass kim. returning err instead of errWithCode... * add checks for the slightly changed error handling in tests, add notes in codebase about the odd way of working
2024-02-14[bugfix] add stricter checks during all stages of dereferencing remote AS ↵Libravatar kim1
objects (#2639) * add stricter checks during all stages of dereferencing remote AS objects * a comment
2024-01-22[feature] Allow "charset=utf8" in incoming AP POST requests (#2564)Libravatar tobi1
* [feature] Allow "charset=utf8" in incoming AP POST requests * changed my mind * document POSTing to a GtS inbox * correct link
2024-01-18[chore] chore rationalise http return codes for activitypub handlers (#2540)Libravatar kim1
* some small code fixups and changes * add check in ResolveIncomingActivity for transient activity types (i.e. activity ID is nil) * update test to handle new transient behaviour
2023-11-30[bugfix] return 400 Bad Request on more cases of malformed AS data (#2399)Libravatar kim1
2023-10-03[chore] internal/ap: add pollable AS types, code reformatting, general ↵Libravatar kim1
niceties (#2248)
2023-08-11[bugfix] Suppress 'errNoEntries' warnings from InboxForwarding function call ↵v0.11.0-rc1Libravatar tobi1
(#2102)
2023-06-14[chore/bugfix] Demote failed inbox forwarding to warn log rather than error ↵Libravatar tobi1
return (#1892)
2023-06-13[chore] Refactor AP authentication, other small bits of tidying up (#1874)Libravatar tobi1
2023-05-28[bugfix/chore] Inbox post updates (#1821)Libravatar tobi1
Co-authored-by: kim <grufwub@gmail.com>
2023-05-09[feature] Enable federation in/out of profile PropertyValue fields (#1722)Libravatar tobi1
Co-authored-by: kim <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
2023-04-06[bugfix] Normalize status content (don't parse status content as IRI) (#1665)Libravatar tobi1
* start fannying about * finish up Normalize * tidy up * pin to tag * move errors about just a little bit
2023-03-12[chore] Improve copyright header handling (#1608)Libravatar Daenney1
* [chore] Remove years from all license headers Years or year ranges aren't required in license headers. Many projects have removed them in recent years and it avoids a bit of yearly toil. In many cases our copyright claim was also a bit dodgy since we added the 2021-2023 header to files created after 2021 but you can't claim copyright into the past that way. * [chore] Add license header check This ensures a license header is always added to any new file. This avoids maintainers/reviewers needing to remember to check for and ask for it in case a contribution doesn't include it. * [chore] Add missing license headers * [chore] Further updates to license header * Use the more common // indentend comment format * Remove the hack we had for the linter now that we use the // format * Add SPDX license identifier
2023-02-17[feature] Add a request ID and include it in logs (#1476)Libravatar Daenney1
This adds a lightweight form of tracing to GTS. Each incoming request is assigned a Request ID which we then pass on and log in all our log lines. Any function that gets called downstream from an HTTP handler should now emit a requestID=value pair whenever it logs something. Co-authored-by: kim <grufwub@gmail.com>
2023-01-05[chore] Update/add license headers for 2023 (#1304)Libravatar tobi1
2022-07-19[chore] use our own logging implementation (#716)Libravatar kim1
* first commit Signed-off-by: kim <grufwub@gmail.com> * replace logging with our own log library Signed-off-by: kim <grufwub@gmail.com> * fix imports Signed-off-by: kim <grufwub@gmail.com> * fix log imports Signed-off-by: kim <grufwub@gmail.com> * add license text Signed-off-by: kim <grufwub@gmail.com> * fix package import cycle between config and log package Signed-off-by: kim <grufwub@gmail.com> * fix empty kv.Fields{} being passed to WithFields() Signed-off-by: kim <grufwub@gmail.com> * fix uses of log.WithFields() with whitespace issues and empty slices Signed-off-by: kim <grufwub@gmail.com> * *linter related grumbling* Signed-off-by: kim <grufwub@gmail.com> * gofmt the codebase! also fix more log.WithFields() formatting issues Signed-off-by: kim <grufwub@gmail.com> * update testrig code to match new changes Signed-off-by: kim <grufwub@gmail.com> * fix error wrapping in non fmt.Errorf function Signed-off-by: kim <grufwub@gmail.com> * add benchmarking of log.Caller() vs non-cached Signed-off-by: kim <grufwub@gmail.com> * fix syslog tests, add standard build tags to test runner to ensure consistency Signed-off-by: kim <grufwub@gmail.com> * make syslog tests more robust Signed-off-by: kim <grufwub@gmail.com> * fix caller depth arithmatic (is that how you spell it?) Signed-off-by: kim <grufwub@gmail.com> * update to use unkeyed fields in kv.Field{} instances Signed-off-by: kim <grufwub@gmail.com> * update go-kv library Signed-off-by: kim <grufwub@gmail.com> * update libraries list Signed-off-by: kim <grufwub@gmail.com> * fuck you linter get nerfed Signed-off-by: kim <grufwub@gmail.com> Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2022-04-29[chore] Add Federatingactor.Send() tests and log call (#509)Libravatar tobi1
* expose testrig util functions * add tests for federatingActor * rename some suite vars
2021-12-20Extend license notices to 2022 (#354)Libravatar tobi1
2021-11-13move to ssb gofed fork (#298)Libravatar tobi1
2021-05-15Inbox post (#22)Libravatar Tobi Smethurst1
Inbox POST from federated servers now working for statuses and follow requests. Follow request client API added. Start work on federating outgoing messages. Other fixes and changes/tidying up.
2021-05-08Ap (#14)Libravatar Tobi Smethurst1
Big restructuring and initial work on activitypub