Skip to content

: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.

feat(warehouse_sources): deprecate EmailOctopus API v1 (#74149)

Tom Owersbdfe596ec658
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/source.py
index d86b86374799..1484ee499a8f 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/source.py
@@ -13,7 +13,11 @@ from products.warehouse_sources.backend.temporal.data_imports.pipelines.pipeline
SourceInputs,
SourceResponse,
)
-from products.warehouse_sources.backend.temporal.data_imports.sources.common.base import FieldType, ResumableSource
+from products.warehouse_sources.backend.temporal.data_imports.sources.common.base import (
+ FieldType,
+ ResumableSource,
+ VersionDeprecation,
+)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.canonical_descriptions import (
CanonicalDescriptions,
)
@@ -44,6 +48,10 @@ class EmailOctopusSource(ResumableSource[EmailOctopusSourceConfig, EmailOctopusR
supported_versions = ("v1", "v2")
default_version = "v2"
api_docs_url = "https://emailoctopus.com/api-documentation"
+ # The vendor has retired v1 without announcing a sunset date, so `sunset_at` is None. This
+ # drives the generic in-product deprecation banner. Existing v1 pins are left in place: they
+ # already reach the live API, so nothing stops working and the user repins when convenient.
+ deprecated_versions = (VersionDeprecation(version="v1"),)
@property
def source_type(self) -> ExternalDataSourceType:
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/tests/test_emailoctopus_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/tests/test_emailoctopus_source.py
index cb3c502f5cee..0c26bd7c2435 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/tests/test_emailoctopus_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/emailoctopus/tests/test_emailoctopus_source.py
@@ -157,3 +157,12 @@ class TestEmailOctopusSourceVersions:
source = EmailOctopusSource()
assert version in source.supported_versions
assert source.resolve_api_version(version) == version
+
+ def test_v1_is_deprecated_without_sunset(self) -> None:
+ # Guards the in-product deprecation banner: v1 must stay flagged (no announced sunset)
+ # and the current default must not be, or the warning silently stops firing.
+ source = EmailOctopusSource()
+ deprecation = source.get_version_deprecation("v1")
+ assert deprecation is not None
+ assert deprecation.sunset_at is None
+ assert source.get_version_deprecation("v2") is None