From 6b4ab24350d7149a702db456da2d8e9a51ec5e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 19 Nov 2024 11:12:39 +0100 Subject: [PATCH] fix: Make snowflake interface error non-retryable (#26269) --- posthog/temporal/batch_exports/snowflake_batch_export.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/posthog/temporal/batch_exports/snowflake_batch_export.py b/posthog/temporal/batch_exports/snowflake_batch_export.py index efd10468fc7..d3f7b1e3a02 100644 --- a/posthog/temporal/batch_exports/snowflake_batch_export.py +++ b/posthog/temporal/batch_exports/snowflake_batch_export.py @@ -12,7 +12,7 @@ import pyarrow as pa import snowflake.connector from django.conf import settings from snowflake.connector.connection import SnowflakeConnection -from snowflake.connector.errors import OperationalError +from snowflake.connector.errors import OperationalError, InterfaceError from temporalio import activity, workflow from temporalio.common import RetryPolicy @@ -206,6 +206,9 @@ class SnowflakeClient: else: raise SnowflakeConnectionError(f"Could not connect to Snowflake - {err.errno}: {err.msg}") from err + except InterfaceError as err: + raise SnowflakeConnectionError(f"Could not connect to Snowflake - {err.errno}: {err.msg}") from err + self._connection = connection await self.use_namespace()