: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(databricks): treat federated JDBC connection failures as non-retryable (#105583)
Tom Owersc357bfe39d20
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/source.pyindex 7d3153066f2f..2de03837deaf 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/source.py@@ -190,6 +190,12 @@ class DatabricksSource(SQLSource[DatabricksSourceConfig], ValidateDatabaseHostMi# Workspace-level entitlement, not a Unity Catalog grant — a separate admin setting from# PERMISSION_DENIED/INSUFFICIENT_PERMISSIONS above."databricks-sql-access or workspace-consume entitlements": "Your Databricks credentials don't have the databricks-sql-access or workspace-consume entitlement. Grant one of those entitlements to the connecting user or service principal in your Databricks workspace admin settings, then resync.",+ # Raised when a synced table is a Lakehouse Federation table/view backed by an external+ # JDBC data source and Databricks itself can't open a connection to that upstream+ # database — a connectivity problem on the customer's federated data source, not+ # something PostHog's retries can fix. Matched on Databricks' own stable error class,+ # not the redacted JDBC URL around it.+ "[FAILED_JDBC.CONNECTION]": "Databricks couldn't connect to a federated database backing a table you're syncing (a Lakehouse Federation connection). Check that the underlying database is reachable and its connection details in Databricks are still correct, then resync.",}def validate_credentials(diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/tests/test_databricks.py b/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/tests/test_databricks.pyindex ac5378ab9a82..3952fda18f66 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/tests/test_databricks.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/databricks/tests/test_databricks.py@@ -514,6 +514,8 @@ class TestDatabricksSource:"Error during request to server: : Source IP address: 44.208.188.173 is blocked by Databricks IP ACL for workspace: 1557520918149316. ",# Workspace-level entitlement missing on the connecting user/service principal."Error during request to server: : This API is disabled for users without the databricks-sql-access or workspace-consume entitlements. Contact your administrator for more information.. ",+ # Lakehouse Federation table backed by an external JDBC database Databricks can't reach.+ "[FAILED_JDBC.CONNECTION] Failed JDBC jdbc:postgresql://db.example.com:5432/mydb on the operation: Failed to connect to the database. SQLSTATE: HV000",],)def test_permanent_failures_are_non_retryable(self, source, error_msg):