: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(temporalio): treat TLS CertificateParseError as non-retryable (#63730)
Tom Owers82f9fa02f6ea
diff --git a/posthog/temporal/data_imports/sources/temporalio/source.py b/posthog/temporal/data_imports/sources/temporalio/source.pyindex f433aa86e2fe..d0b673ff21ad 100644--- a/posthog/temporal/data_imports/sources/temporalio/source.py+++ b/posthog/temporal/data_imports/sources/temporalio/source.py@@ -41,6 +41,11 @@ class TemporalIOSource(ResumableSource[TemporalIOSourceConfig, TemporalIOResumeC"received fatal alert: BadCertificate": "Temporal rejected this source's client certificate as invalid. Update the source with a valid client certificate and key.","received fatal alert: CertificateUnknown": "Temporal rejected this source's client certificate. Update the source with a valid client certificate and key.","invalid peer certificate": "The Temporal server's certificate could not be verified. Check the host and port point at your Temporal namespace's gRPC endpoint.",+ # tonic/rustls raises CertificateParseError when one of the PEM credential blobs cannot be+ # decoded at all (vs the alerts above, which reject an otherwise-parseable cert). The blobs+ # come straight from the source config, so this is a malformed-credential problem — retrying+ # can never recover.+ "CertificateParseError": "Temporal could not parse this source's TLS credentials. Check that the client certificate, client private key, and server root CA are valid PEM and re-enter them on the source.",}def get_schemas(diff --git a/posthog/temporal/data_imports/sources/temporalio/test_temporalio.py b/posthog/temporal/data_imports/sources/temporalio/test_temporalio.pyindex a5b1c2e6761c..fdceba97e70b 100644--- a/posthog/temporal/data_imports/sources/temporalio/test_temporalio.py+++ b/posthog/temporal/data_imports/sources/temporalio/test_temporalio.py@@ -51,6 +51,7 @@ class TestTemporalIONonRetryableErrors:"received fatal alert: BadCertificate","received fatal alert: CertificateUnknown","invalid peer certificate: UnknownIssuer",+ "Failed client connect: Server connection error: tonic::transport::Error(Transport, CertificateParseError)",],)def test_tls_certificate_failures_are_non_retryable(self, error_message):