:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(personhog): install rustls provider before leader k8s discovery (#75792)
Zach Brown4dff4e6f7624
diff --git a/rust/Cargo.lock b/rust/Cargo.lockindex ada5b3065537..4afce2c4d3cd 100644--- a/rust/Cargo.lock+++ b/rust/Cargo.lock@@ -8536,6 +8536,7 @@ dependencies = ["personhog-proto","prost 0.13.5","rdkafka",+ "rustls 0.23.37","serde_json","sqlx","tokio",diff --git a/rust/personhog-leader/Cargo.toml b/rust/personhog-leader/Cargo.tomlindex 47347c071a59..d620acb2202c 100644--- a/rust/personhog-leader/Cargo.toml+++ b/rust/personhog-leader/Cargo.toml@@ -15,6 +15,10 @@ common-metrics = { path = "../common/metrics" }common-alloc = { path = "../common/alloc" }k8s-awareness = { path = "../common/k8s-awareness" }kube = { version = "0.98", features = ["client"] }+# Direct dep only to install a process-wide rustls CryptoProvider at startup (see+# main.rs): kube's HTTPS client uses rustls 0.23, which can't auto-pick a provider+# with both aws-lc-rs and ring in the tree. Matches personhog-router/cymbal.+rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }lifecycle = { path = "../common/lifecycle" }async-trait = { workspace = true }diff --git a/rust/personhog-leader/src/main.rs b/rust/personhog-leader/src/main.rsindex 38e21bcae352..0fe3ed44d692 100644--- a/rust/personhog-leader/src/main.rs+++ b/rust/personhog-leader/src/main.rs@@ -42,6 +42,14 @@ common_alloc::used!();#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> {+ // Install a process-wide rustls CryptoProvider before any TLS use. kube's+ // HTTPS client (controller discovery) uses rustls 0.23, which can't+ // auto-pick a provider with both aws-lc-rs and ring compiled in — it+ // panics. Matches personhog-router / cymbal / ingestion-consumer.+ rustls::crypto::ring::default_provider()+ .install_default()+ .expect("failed to install rustls ring CryptoProvider");+let config = Config::init_from_env().expect("Invalid configuration");validate_table_name(&config.fallback_table).expect("Invalid FALLBACK_TABLE");