mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
## Summary The standalone S3 accounting worker can exit before its scan begins because database startup inherits the relay’s three-second connection budget. A cold DNS probe took about five seconds. Give `buzz-admin storage-snapshot` its own pool: one connection, no minimum idle connections, and a 30-second acquisition budget. Retry startup timeouts and transport failures at most twice, after two and five seconds. Total startup wait is bounded to 97 seconds. Configuration, authentication, TLS, and protocol errors fail immediately. Log each startup attempt’s elapsed time and error category without connection credentials. Relay defaults stay unchanged. Retries stop before lock acquisition; the same lock-owning database session still publishes the completed snapshot. ### Related issue Follow-up to #7543. No duplicate startup fix found. ### Testing Archived-command check: built a nextest archive, temporarily moved `target/debug/buzz-admin` out of the checkout, and ran `scripts/postgres-test-run.sh --archive-file <archive>`. Both tests failed before the path fix and passed afterward. The tests use nextest’s relocated executable path, with the original Cargo path retained for local runs. Manually restored the old startup call and ran `scripts/postgres-test-run.sh -p buzz-admin --test postgres_storage_snapshot -E 'test(storage_snapshot_retries_then)'`. It failed before reaching S3; restoring the fix passed. This confirms the test exercises the actual worker command. Local `just ci` passed all stages before mobile tests, which stopped at SDK discovery in the `objective_c` native hook. The default Xcode tools report an unaccepted license. Two existing PostgreSQL tests hit connection timeouts in the parallel run and passed individually. After merge, build a worker image and repeat the cold-pod staging smoke test through snapshot publication before changing relay metrics mode. Generated with Codex --------- Signed-off-by: Ravneet Arora <rarora@squareup.com>
43 lines
1.4 KiB
TOML
43 lines
1.4 KiB
TOML
[package]
|
|
name = "buzz-admin"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
description = "Operator CLI for Buzz relay administration"
|
|
|
|
[[bin]]
|
|
name = "buzz-admin"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
buzz-db = { workspace = true }
|
|
buzz-deletion = { workspace = true }
|
|
buzz-core = { workspace = true }
|
|
buzz-auth = { workspace = true }
|
|
buzz-pubsub = { workspace = true }
|
|
buzz-search = { workspace = true }
|
|
buzz-audit = { workspace = true }
|
|
buzz-workflow = { workspace = true }
|
|
buzz-media = { workspace = true }
|
|
nostr = { workspace = true }
|
|
tokio = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
hex = { workspace = true }
|
|
deadpool-redis = { workspace = true }
|
|
# Redis TLS (rediss://, e.g. ElastiCache) uses rustls, which needs a process
|
|
# CryptoProvider installed at startup. The workspace redis TLS feature compiles
|
|
# both aws-lc-rs and ring in transitively, so rustls can't auto-select one — we
|
|
# install ring explicitly in main(). Mirrors buzz-relay's setup.
|
|
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
|
|
tracing = { workspace = true }
|
|
sqlx = { workspace = true }
|
|
url = { workspace = true }
|
|
uuid = { workspace = true }
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true, features = ["test-util"] }
|