commits
Intent is to self-merge this
This is "just in case" these end up directly part of public APIs (eg,
via admin endpoints)
Fine to use this elsewhere for perf, but let's get it out of this
dependency tree.
(note: this is not actually related to recent serialization bug, just
cleaning this up)
This caused problems in prod. Unbeknownst to me, we had been serializing
identity metadata as JSON using this struct and persisting it. Then
passing back to TypeScript (not golang!), which depended on the
capitalization (case-sensitive JSON parsing).
Reverting for now. Note that the go stdlib JSON code is actually
case-insensitive for keys, so the text fixtures in this repo which had
been updated to depend on this are not impacted (!).
Direct link to original PR:
https://github.com/bluesky-social/indigo/pull/1017
This reverts commit dc63161d1ce2cad38082fc77d4c5f1f688b802be.
- host lists and status info
- more flexible firehose-mode host parsing (wss:// vs https://)
- include blocks in `#sync` firehose output (if requested)
Still a bunch to do here; this isn't ready for review or
experimentation, just showing progress.
This isn't everything, just a first pass. There were some real issues
with errors not getting wired through.
I'm kind of ambivalent about the pattern:
```go
defer func() {
_ = resp.Body.Close()
}()
```
but do want to make any non-defer error returns explicit.
A bit of this is moving code around so I could understand which pieces
were doing what. Then improved how the request proxying and requestCrawl
forwarding stuff works, as part of new relay ops.
None of the core configuration or behaviors should change: I tweaked
some argument names, but not the env var names, so nothing about how we
deploy/operate rainbow should change.
No behavior of the core code (ringbuf, upstream websocket subscription,
or serving to clients) has changed.
Measured actual firehose, and most #commit messages are between 4k and
8k bytes. 10k covers almost all events, without being too much
over-allocation memory use.
For the automatic go toolchain stuff to work, we need the full version,
including patch (not just minor)
I assumed this worked, but it doesn't!
Found via golangci-lint.
This isn't a full pass, just fixing some known issues:
- process wasn't shutting down with Ctrl-C because of a WaitGroup. fixed
the bug, but didn't clean up the (many) channels+goroutines
- many API response errors were strings, not the expected XRPC JSON
message format
- README didn't describe the actual API endpoint
I assumed this worked, but it doesn't!
This caused problems in prod. Unbeknownst to me, we had been serializing
identity metadata as JSON using this struct and persisting it. Then
passing back to TypeScript (not golang!), which depended on the
capitalization (case-sensitive JSON parsing).
Reverting for now. Note that the go stdlib JSON code is actually
case-insensitive for keys, so the text fixtures in this repo which had
been updated to depend on this are not impacted (!).
Direct link to original PR:
https://github.com/bluesky-social/indigo/pull/1017
A bit of this is moving code around so I could understand which pieces
were doing what. Then improved how the request proxying and requestCrawl
forwarding stuff works, as part of new relay ops.
None of the core configuration or behaviors should change: I tweaked
some argument names, but not the env var names, so nothing about how we
deploy/operate rainbow should change.
No behavior of the core code (ringbuf, upstream websocket subscription,
or serving to clients) has changed.
This isn't a full pass, just fixing some known issues:
- process wasn't shutting down with Ctrl-C because of a WaitGroup. fixed
the bug, but didn't clean up the (many) channels+goroutines
- many API response errors were strings, not the expected XRPC JSON
message format
- README didn't describe the actual API endpoint