chadtmiller.com/monolith
An atproto PDS
0
0
harness: each bad start checks its own value, and an address no interface has
harness/checks/operations.mjs+4−1
| @@ -619,7 +619,10 @@ async function lifecycle() { | ||
if (outside) await bound(keep, '0.0.0.0', [outside, '127.0.0.1'], []) | ||
if (v6Loopback) await bound(keep, '::1', ['[::1]'], ['127.0.0.1']) | ||
| ||
for (const bad of [{ PDS_LOG_LEVEL: 'loud' }, { OTEL_EXPORTER_OTLP_PROTOCOL: 'grpc' }, { OTEL_EXPORTER_OTLP_PROTOCOL: 'http/json' }, { PDS_METRICS_PORT: 'many' }, { PDS_METRICS_PORT: keep.PDS_PORT }, { PDS_BIND_ADDRESS: 'localhost' }, { PDS_BIND_ADDRESS: '[::1]' }]) { | ||
// 203.0.113.1, of TEST-NET-3, is no interface's: a start that cannot listen. | ||
for (const bad of [{ PDS_LOG_LEVEL: 'loud' }, { OTEL_EXPORTER_OTLP_PROTOCOL: 'grpc' }, { OTEL_EXPORTER_OTLP_PROTOCOL: 'http/json' }, { PDS_METRICS_PORT: 'many' }, { PDS_METRICS_PORT: keep.PDS_PORT }, { PDS_BIND_ADDRESS: 'localhost' }, { PDS_BIND_ADDRESS: '[::1]' }, { PDS_BIND_ADDRESS: '203.0.113.1' }]) { | ||
// Each start with this one bad value alone, not the last one's too. | ||
for (const k of Object.keys(server.env)) delete server.env[k] | ||
Object.assign(server.env, keep, bad) | ||
server.start() | ||
for (let i = 0; i < 100 && !server.exited; i++) await wait(100) | ||
spec/OPERATIONS.md+3−2
| @@ -397,8 +397,9 @@ is back at two thirds; the steps go on. Then, at the end: | ||
machine has IPv6's loopback, started with `::1` it answers on `[::1]` | ||
and not on `127.0.0.1` (`PDS.md`). Then `PDS_LOG_LEVEL=loud`, the | ||
protocols `grpc` and `http/json`, a `PDS_METRICS_PORT` that is no number | ||
and one equal to `PDS_PORT`, and a `PDS_BIND_ADDRESS` of `localhost` and | ||
of `[::1]`: each exits 1 with why on standard error. | ||
and one equal to `PDS_PORT`, a `PDS_BIND_ADDRESS` of `localhost` and of | ||
`[::1]`, and one of `203.0.113.1`, an address no interface of the machine | ||
has: each exits 1 with why on standard error. | ||
- **The log**, whole: every line one JSON object with the fields its event | ||
has, at no level below the start's `PDS_LOG_LEVEL`; each start's lines | ||
starting with `start`, with `recovered` after a start the last server did | ||