summaryrefslogtreecommitdiff
path: root/internal
AgeCommit message (Collapse)AuthorFiles
2024-05-05[feature] Add HTTP header permission section to frontend (#2893)Libravatar tobi2
* [feature] Add HTTP header filter section to frontend * tweak naming a bit
2024-05-02add missing caches to the main cache sweep command (#2891)Libravatar kim1
2024-05-02[bugfix] Lock when checking/creating notifs to avoid race (#2890)Libravatar tobi15
* [bugfix] Lock when checking/creating notifs to avoid race * test notif spam
2024-05-01[feature] Page through accounts as moderator (#2881)Libravatar tobi8
* [feature] Page through accounts as moderator * aaaaa * use COLLATE "C" for Postgres to ensure same ordering as SQLite * fix typo, test paging up * don't show moderation / info for our instance acct
2024-05-01[bugfix] function queue memory pools limitlessly grow (#2882)Libravatar kim1
* updates the simple queue memory pool to actually self-clean + limit growth * update memory pool cleaning frequency
2024-05-01[bugfix] flaky paging test (#2888)Libravatar kim1
2024-04-30[bugfix] further paging mishaps (#2884)Libravatar kim5
* FURTHER paging shenanigans :smiling_face_with_tear: * remove cursor logic from ToLinkURL() * fix up paging tests --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-04-30[bugfix] retry on http 500 errors *inclusive* (#2886)Libravatar kim1
2024-04-30[chore] include attemptno in httpclient logs (#2887)Libravatar kim1
* include request attempt number in httpclient logs * slightly nicer attempt number formatting
2024-04-30[bugfix] paging rel links (#2883)Libravatar kim3
* fix paging so it uses correct cursor query parameter name * improved code comment * whoops, flip the cursoring :facepalm: * fix the broken test
2024-04-29[chore] Fix conflict in workers tests (#2880)Libravatar tobi3
* [chore] Fix conflict in workers tests * commenty-wenty
2024-04-26[bugfix] Fix error string typo (#2873)Libravatar kim1
2024-04-26[performance] update remaining worker pools to use queues (#2865)Libravatar kim63
* start replacing client + federator + media workers with new worker + queue types * refactor federatingDB.Delete(), drop queued messages when deleting account / status * move all queue purging to the processor workers * undo toolchain updates * code comments, ensure dereferencer worker pool gets started * update gruf libraries in readme * start the job scheduler separately to the worker pools * reshuffle ordering or server.go + remove duplicate worker start / stop * update go-list version * fix vendoring * move queue invalidation to before wipeing / deletion, to ensure queued work not dropped * add logging to worker processing functions in testrig, don't start workers in unexpected places * update go-structr to add (+then rely on) QueueCtx{} type * ensure more worker pools get started properly in tests * fix remaining broken tests relying on worker queue logic * fix account test suite queue popping logic, ensure noop workers do not pull from queue * move back accidentally shuffled account deletion order * ensure error (non nil!!) gets passed in refactored federatingDB{}.Delete() * silently drop deletes from accounts not permitted to * don't warn log on forwarded deletes * make if else clauses easier to parse * use getFederatorMsg() * improved code comment * improved code comment re: requesting account delete checks * remove boolean result from worker start / stop since false = already running or already stopped * remove optional passed-in http.client * remove worker starting from the admin CLI commands (we don't need to handle side-effects) * update prune cli to start scheduler but not all of the workers * fix rebase issues * remove redundant return statements * i'm sorry sir linter
2024-04-26[chore] Upgrade our Go version to 1.22 (#2862)Libravatar Daenney1
* [chore] Upgrade our Go version to 1.22 With Go 1.22 having been released at the start of February, it's now been a few months. No major issues have shown up, and the two point release since then have primarily been security fixes plus some general bug fixing. This sets the required Go version to 1.22, as there's nothing in 1.22.1 or 1.22.2 that we would explicitly require. It sets the toolchain to the latest point release, to ensure we pick up any fixes from there when building releases etc. * [chore] Update CI to Go 1.22 * [chore] Update golangci-lint to 1.25.7 Newer version should know about Go 1.22 and run fine. * [chore] Update Docker container to Go 1.22 * [chore] Update Dockerfile to newer Alpine version * sign drone.yml * add missing license header --------- Co-authored-by: tobi <tobi.smethurst@protonmail.com>
2024-04-22[chore] Update robots.txt (#2856)Libravatar Daenney1
This updates the robots.txt based on the list of the ai.robots.txt repository. We can look at automating that at some point. It's worth pointing out that some robots, namely the ones by Bytedance, are known to ignore robots.txt entirely.
2024-04-18[bugfix] Fix incorrect field name for status source, add helpful message (#2854)Libravatar tobi3
* [bugfix] Fix incorrect field name for status source, add helpful message * swagger * yyammm
2024-04-18[feature] Stub conversations endpoint (#2853)Libravatar tobi4
2024-04-18[feature] Stub account mutes endpoint (#2852)Libravatar tobi3
* [feature] Stub account mutes endpoint * swagger? i barely know 'er!
2024-04-17update to set requesting account when deleting status (#2849)Libravatar kim1
2024-04-17[feature] Status source endpoint (#2848)Libravatar tobi6
* [feature] statusSource endpoint * finish up
2024-04-17[feature] Stub status history endpoint (#2847)Libravatar tobi5
2024-04-17[bugfix] Fix minor API issue w/ boosted statuses (#2846)Libravatar tobi3
2024-04-16[bugfix] fix get all tokens (#2841)Libravatar tobi2
2024-04-16[feature/performance] Store account stats in separate table (#2831)Libravatar tobi42
* [feature/performance] Store account stats in separate table, get stats from remote * test account stats * add some missing increment / decrement calls * change stats function signatures * rejig logging a bit * use lock when updating stats
2024-04-15[performance] cached oauth database types (#2838)Libravatar kim16
* update token + client code to use struct caches * add code comments * slight tweak to default mem ratios * fix envparsing * add appropriate invalidate hooks * update the tokenstore sweeping function to rely on caches * update to use PutClient() * add ClientID to list of token struct indices
2024-04-15[chore] Turn `accounts-registration-open` false by default (#2839)Libravatar tobi1
2024-04-13[feature] Admin accounts endpoints; approve/reject sign-ups (#2826)Libravatar tobi30
* update settings panels, add pending overview + approve/deny functions * add admin accounts get, approve, reject * send approved/rejected emails * use signup URL * docs! * email * swagger * web linting * fix email tests * wee lil fixerinos * use new paging logic for GetAccounts() series of admin endpoints, small changes to query building * shuffle useAccountIDIn check *before* adding to query * fix parse from toot react error * use `netip.Addr` * put valid slices in globals * optimistic updates for account state --------- Co-authored-by: kim <grufwub@gmail.com>
2024-04-13[performance] update GetAccountsByIDs() to use the new multi cache loader ↵Libravatar kim1
endpoint (#2828) * update GetAccountsByIDs() to use the new multi cache loader endpoint * fix broken import
2024-04-12[bugfix] Include MIME email headers to avoid mangling non-ascii text (#2827)Libravatar tobi2
2024-04-11[feature] New user sign-up via web page (#2796)Libravatar tobi43
* [feature] User sign-up form and admin notifs * add chosen + filtered languages to migration * remove stray comment * chosen languages schmosen schmanguages * proper error on local account missing
2024-04-11[performance] massively improved ActivityPub delivery worker efficiency (#2812)Libravatar kim23
* 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-08[bugfix] Ensure side effects for local -> local follows get processed (#2820)v0.15.0-rc2Libravatar tobi2
2024-04-04fix possible nil panic (#2809)Libravatar kim1
2024-04-04[chore] Log less output on failed test (#2804)Libravatar Daenney2
* [chore] Log less output on failed test This changes the testrig log level to be error by default instead of info. This makes test failures a lot easier to read, as we don't have the parade of info logs for each failure to scroll through. It speeds up the test suite by a couple of seconds since we need to buffer and flush a lot less messages. On a clean run, so no test failures, it's about a 3s difference on my machine. Depending on the amount of test failures, total time saved can vary. This also introduces a GTS_TESTRIG_LOG_LEVEL environment variable that we explicitly check for, making it easy to override the log level should we have a need for it. This would be primarily for running locally, and not so much as part of go test. Lastly, it updates the syslog tests to use log.Error because if the log level is set to error but we call log.Info no message is emitted and we hang indefinitely on the channel read. * [chore] Rename the testrig log level env var
2024-04-03[bugfix] Sort follows chronologically (#2801)Libravatar Daenney2
The id on the follows table is not a ULID, but a random ID. Sorting on them results in a completely random order. Instead, sort on created_at, which sould result in a stable and intended sort order. Fixes: #2769 Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
2024-04-03[bugfix] improved authenticate post inbox error handling (#2803)Libravatar kim4
* 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-04-02[bugfix] Set domain for empty-domain Friendica accounts (#2800)v0.15.0-rc1Libravatar tobi1
2024-04-02[bugfix] Set the `Host` header within the signing transport (#2799)Libravatar kim7
2024-04-02[bugfix] httpclient not signing subsequent redirect requests (#2798)Libravatar kim5
* move http request signing to transport * actually hook up the http roundtripper ... * add code comments for the new gtscontext functions
2024-04-02[chore] Try to parse public key as both Actor + bare key (#2710)Libravatar tobi5
* [chore] Try to parse public key as both Actor + bare key * fix weird test fail
2024-04-02[chore] bump go structr cache version -> v0.6.0 (#2773)Libravatar kim21
* update go-structr library -> v0.6.0, add necessary wrapping types + code changes to support these changes * update readme with go-structr package changes * improved wrapping of the SliceCache type * add code comments for the cache wrapper types * remove test.out :innocent: --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2024-04-02[feature] Option to hide followers/following (#2788)Libravatar tobi13
2024-03-28[bugfix] Serve correct URI for AP following collection (#2787)Libravatar tobi1
2024-03-25[feature] User-selectable preset CSS themes for accounts (#2777)Libravatar tobi18
* [feature] User-selectable preset themes * docs, more theme stuff * lint, tests * fix css name * correct some little issues * add another theme * fix poll background * okay last theme i swear * make retrieval of apimodel themes more conventional * preallocate stylesheet slices
2024-03-25[feature] Add healthcheck endpoints `/livez` and `/readyz` (#2783)Libravatar tobi6
* [feature] Add healthcheck endpoints `/livez` and `/readyz` * use select that returns no data
2024-03-25[bugfix] Avoid empty public/local timeline queries (#2784)Libravatar tobi4
2024-03-22[chore] Move local account settings to separate db table (#2770)Libravatar tobi33
* [chore] Move local account settings to separate database model * don't use separate settings_id
2024-03-22[bugfix] add all possible busy result codes to the sqlite errBusy catching ↵Libravatar kim1
check (#2775)
2024-03-15[bugfix] Parse links that contain non-ascii characters (#2762)Libravatar tobi3
2024-03-15[chore] Swagger: add missing paging params to bookmarks list (#2759)Libravatar Vyr Cossont1
No code changes.