Commit graph

1736 commits

Author SHA1 Message Date
kim
39e6d05b6c ensure delivery worker gets inited in testrig 2024-04-07 19:32:54 +01:00
kim
51f6fd5986 fix linter issues 2024-04-06 18:19:33 +01:00
kim
1b9308ed8a add delivery worker tests 2024-04-06 17:35:20 +01:00
kim
59ec876b57 ensure request context values are preserved when updating ctx 2024-04-05 22:46:35 +01:00
kim
4811ded078 expose the embedded log fields in httpclient.Request{} 2024-04-05 22:35:16 +01:00
kim
f17ef91fb9 use worker ptrs 2024-04-05 18:29:13 +01:00
kim
500e7558e8 remove double logging 2024-04-05 18:20:11 +01:00
kim
e17474ff2d add start/stop logging to delivery worker, some slight changes 2024-04-05 18:19:26 +01:00
kim
e06617d24c clamp minimum no. senders to 1 2024-04-05 16:05:33 +01:00
kim
fd7c958887 finish adding more code comments 2024-04-05 15:48:36 +01:00
kim
9264a82337 finish adding code comments, fix up backoff code 2024-04-05 15:44:10 +01:00
kim
0f4c4257ed validate request before queueing for delivery 2024-04-05 15:37:28 +01:00
kim
9ce0ffc8bd formatting 2024-04-05 15:34:57 +01:00
kim
5d6ffd753b remove dead code 2024-04-05 15:23:20 +01:00
kim
a3bd01ddb8 shuffle things around to move delivery stuff into transport/ subpkg 2024-04-05 15:09:16 +01:00
kim
ba60397e30 remove PopCtx() method, let others instead rely on Wait() 2024-04-05 15:09:16 +01:00
kim
7080930371 slightly tweak deliveryworkerpool API, use advanced sender multiplier 2024-04-05 15:09:16 +01:00
kim
f70ef72f7b finish adding some code comments, add bad host handling to delivery workers 2024-04-05 15:09:16 +01:00
kim
d8992392ad use errorsv2.AsV2() 2024-04-05 15:09:16 +01:00
kim
175c8700d1 use errors.AsV2() 2024-04-05 15:09:16 +01:00
kim
3c9451b327 add uncommitted changes 2024-04-05 15:09:16 +01:00
kim
a8ea1fe340 actually log in the AP delivery worker ... 2024-04-05 15:09:16 +01:00
kim
3439ce7012 use the original context's values when wrapping msg type as delivery{} 2024-04-05 15:09:16 +01:00
kim
73ef63689d use gorun 2024-04-05 15:09:16 +01:00
kim
033b2e7d60 don't index APRequest by hostname in the queue 2024-04-05 15:09:16 +01:00
kim
d7e14d5dbb support deleting queued http requests by target ID 2024-04-05 15:09:16 +01:00
kim
8fdd5b18aa hook up queue deletion logic 2024-04-05 15:09:16 +01:00
kim
8aede54741 finish up some code commenting, bodge a vendored activity library change, integrate the deliverypool changes into transportcontroller 2024-04-05 15:09:16 +01:00
kim
aa01437a5b add delivery worker type that pulls from queue to httpclient package 2024-04-05 15:09:16 +01:00
kim
85bc140b58
[bugfix] temporarily replace modernc.org/sqlite-v1.29.5 with gitlab.com/NyaaaWhatsUpDoc/sqlite-v1.29.5-concurrency-workaround (#2811) 2024-04-05 11:58:28 +02:00
kim
83e7847cdf
fix possible nil panic (#2809) 2024-04-04 16:45:59 +01:00
Daenney
236604bd6b
[chore] Log less output on failed test (#2804)
* [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-04 16:42:42 +01:00
Daenney
8ed1b8142c
[bugfix] Sort follows chronologically (#2801)
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 14:06:39 +01:00
kim
15ede4c1ea
[bugfix] improved authenticate post inbox error handling (#2803)
* 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-03 13:57:07 +01:00
tobi
65b5366031
[bugfix] Set domain for empty-domain Friendica accounts (#2800) 2024-04-02 13:40:54 +01:00
kim
e664d0918b
[bugfix] Set the Host header within the signing transport (#2799) 2024-04-02 14:28:36 +02:00
kim
d61d5c8a6a
[bugfix] httpclient not signing subsequent redirect requests (#2798)
* move http request signing to transport

* actually hook up the http roundtripper ...

* add code comments for the new gtscontext functions
2024-04-02 13:12:26 +02:00
tobi
4bbdef02f1
[chore] Try to parse public key as both Actor + bare key (#2710)
* [chore] Try to parse public key as both Actor + bare key

* fix weird test fail
2024-04-02 11:30:10 +01:00
kim
adf345f1ec
[chore] bump go structr cache version -> v0.6.0 (#2773)
* 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 😇

---------

Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
2024-04-02 12:03:40 +02:00
tobi
f05874be30
[feature] Option to hide followers/following (#2788) 2024-04-02 10:42:24 +01:00
tobi
29972e2c93
[feature] Add enable command to mirror existing disable command; update docs (#2792)
* [feature] add `enable` CLI command to mirror existing `disable` command

* update docs
2024-04-02 10:29:46 +01:00
tobi
be259b13a7
[chore] Vendor mkdocs fonts; update docs dependencies (#2789)
* [chore] Update docs dependencies

* update rtd deps

* aaaa

* why can't you just be normal!

* vendor social plugin fonts
2024-03-29 10:52:46 +01:00
dependabot[bot]
72b38c2f12
[chore] Bump express from 4.18.2 to 4.19.2 in /web/source (#2790)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 10:48:44 +01:00
tobi
4f66dba139
[bugfix] Serve correct URI for AP following collection (#2787) 2024-03-28 12:10:16 +01:00
tobi
ac3f195b56
[chore/frontend] Adjust contrast, mute blurple a bit (#2785) 2024-03-26 11:02:09 +00:00
tobi
8953f57d88
[feature] User-selectable preset CSS themes for accounts (#2777)
* [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 17:32:24 +00:00
tobi
b7b42e832a
[feature] Add healthcheck endpoints /livez and /readyz (#2783)
* [feature] Add healthcheck endpoints `/livez` and `/readyz`

* use select that returns no data
2024-03-25 17:05:14 +00:00
tobi
36f79e650c
[bugfix] Avoid empty public/local timeline queries (#2784) 2024-03-25 16:20:45 +00:00
dependabot[bot]
29031d1e27
[chore]: Bump github.com/gin-contrib/sessions from 0.0.5 to 1.0.0 (#2782) 2024-03-25 11:00:36 +00:00
dependabot[bot]
a24936040c
[chore]: Bump github.com/coreos/go-oidc/v3 from 3.9.0 to 3.10.0 (#2779) 2024-03-25 10:58:34 +00:00