: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(linear): treat "Linear app not configured" as non-retryable (#64020)
Tom Owersebbae7fde506
diff --git a/posthog/temporal/data_imports/sources/linear/source.py b/posthog/temporal/data_imports/sources/linear/source.pyindex af17c79baead..b4107945c61b 100644--- a/posthog/temporal/data_imports/sources/linear/source.py+++ b/posthog/temporal/data_imports/sources/linear/source.py@@ -61,6 +61,9 @@ class LinearSource(ResumableSource[LinearSourceConfig, LinearResumeConfig], OAut# Retrying can never resolve this — the integration won't reappear — so stop and# ask the user to reconnect. Matched as a substring; the trailing integration id varies."Integration not found": "The linked Linear integration no longer exists. Please reconnect your Linear account.",+ # The Linear OAuth app isn't configured on this PostHog instance (missing client id/secret),+ # so the source can't refresh its access token. Deterministic — retrying never resolves it.+ "Linear app not configured": "The Linear app is not configured on this PostHog instance. Please contact support.",}def _get_access_token(self, config: LinearSourceConfig, team_id: int) -> str:diff --git a/posthog/temporal/data_imports/sources/linear/test_linear.py b/posthog/temporal/data_imports/sources/linear/test_linear.pyindex 8ebed31d4e59..38729b1eaed6 100644--- a/posthog/temporal/data_imports/sources/linear/test_linear.py+++ b/posthog/temporal/data_imports/sources/linear/test_linear.py@@ -325,6 +325,8 @@ class TestLinearSourceNonRetryableErrors:("deleted_integration", "Integration not found: 165665"),("auth_401", "401 Client Error: Unauthorized for url: https://api.linear.app/graphql"),("forbidden_403", "403 Client Error: Forbidden for url: https://api.linear.app/graphql"),+ # NotImplementedError raised by OauthIntegration when the instance lacks Linear client id/secret.+ ("app_not_configured", "Linear app not configured"),])def test_non_retryable_errors_match(self, _name: str, observed_error: str) -> None: