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): support inflowinventory API version 2026-09-29 (#113222)

Tom Owersb0dccbc8842b
diff --git a/.agents/skills/warehouse-source-new-version/SKILL.md b/.agents/skills/warehouse-source-new-version/SKILL.md
index 171e7f58fbcd..f057767adc90 100644
--- a/.agents/skills/warehouse-source-new-version/SKILL.md
+++ b/.agents/skills/warehouse-source-new-version/SKILL.md
@@ -52,7 +52,7 @@ The opposite gap also occurs: a reference rendered from one version-blind OpenAP
## Adding a new version, step by step
-1. **Read the vendor's changelog** (the source's `api_docs_url`) and list what changed between the currently supported version(s) and the new one: renamed/removed fields, changed pagination, new required headers, changed webhook payloads, or a field the source reads becoming opt-in behind a new query parameter (a field returned by default in the old version now empty unless requested — restore it by adding that parameter on the new version's request path). Verification is docs-only — there are no stored credentials and no live-sync harness, so the docs are the sole source of truth for what each version serves. When the vendor's docs page renders client-side and comes back as an empty shell, read its machine-readable mirror (an `llms.txt`, a `sitemap.md`, or the same path with a `.md` suffix) rather than treating the version as undocumented. This is also the evidence the gate above runs on.
+1. **Read the vendor's changelog** (the source's `api_docs_url`) and list what changed between the currently supported version(s) and the new one: renamed/removed fields, changed pagination, new required headers, changed webhook payloads, or a field the source reads becoming opt-in behind a new query parameter (a field returned by default in the old version now empty unless requested — restore it by adding that parameter on the new version's request path). Verification is docs-only — there are no stored credentials and no live-sync harness, so the docs are the sole source of truth for what each version serves. When the vendor's docs page renders client-side and comes back as an empty shell, read its machine-readable mirror (an `llms.txt`, a `sitemap.md`, or the same path with a `.md` suffix) rather than treating the version as undocumented. When the vendor publishes only one version-blind spec for the current version and no changelog, diff it against an archived copy (the Wayback Machine's CDX index lists snapshots; the `id_` form returns the raw file, sometimes still gzip-encoded) and check which label that copy names: differences it shows span every version between that copy and now, so do not attribute them to the new label alone. This is also the evidence the gate above runs on.
2. **Declare the version** (only once the gate says the version has to exist): add the new label to `supported_versions` and flip `default_version` to it — new sources always start on the newest stable version. A pinned row's **sync** path is unaffected by a default flip (that is the point of pinning), but two things still follow the new default: discovery/`get_schemas` if the pin isn't threaded there (step 3), and any row whose `api_version` is NULL. Reference the request layer's version constants instead of duplicating string literals.
3. **Dispatch on `SourceInputs.api_version`** at the request layer:
- Keep it minimal. If the version is just a header/URL segment and response shapes are compatible, thread the version string down to where the client/URL is built (see Stripe: `StripeSource.source_for_pipeline` passes `self.resolve_api_version(inputs.api_version)` → `stripe_source(...)` → `StripeClient(stripe_version=...)`). Resolve through `resolve_api_version` at the source class — never hardcode a fallback version in the request layer.
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/inflowinventory.py b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/inflowinventory.py
index ef7d1cb96c0c..12869950a2a1 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/inflowinventory.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/inflowinventory.py
@@ -23,6 +23,7 @@ INFLOWINVENTORY_BASE_URL = "https://cloudapi.inflowinventory.com"
# source pin selects which of these labels is sent, so previously-created sources keep their behaviour.
INFLOWINVENTORY_API_VERSION_2023_04_01 = "2023-04-01"
INFLOWINVENTORY_API_VERSION_2026_07_10 = "2026-07-10"
+INFLOWINVENTORY_API_VERSION_2026_09_29 = "2026-09-29"
# The list endpoints accept up to 100 records per page; the largest page minimises round trips.
PAGE_SIZE = 100
# inFlow company IDs are GUIDs. Restrict to host/path-safe characters so the credential stays
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/source.py
index d7b5ab6c333f..7d20a95f7c5b 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/source.py
@@ -21,6 +21,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.generated_
from products.warehouse_sources.backend.temporal.data_imports.sources.inflowinventory.inflowinventory import (
INFLOWINVENTORY_API_VERSION_2023_04_01,
INFLOWINVENTORY_API_VERSION_2026_07_10,
+ INFLOWINVENTORY_API_VERSION_2026_09_29,
InflowInventoryResumeConfig,
inflowinventory_source,
validate_credentials,
@@ -36,8 +37,12 @@ from products.warehouse_sources.backend.types import ExternalDataSourceType
class InflowinventorySource(ResumableSource[InflowinventorySourceConfig, InflowInventoryResumeConfig]):
# Oldest → newest. inFlow's version is a request input (the Accept header), so each pin keeps
# sending its own label; new sources default to the current stable version.
- supported_versions = (INFLOWINVENTORY_API_VERSION_2023_04_01, INFLOWINVENTORY_API_VERSION_2026_07_10)
- default_version = INFLOWINVENTORY_API_VERSION_2026_07_10
+ supported_versions = (
+ INFLOWINVENTORY_API_VERSION_2023_04_01,
+ INFLOWINVENTORY_API_VERSION_2026_07_10,
+ INFLOWINVENTORY_API_VERSION_2026_09_29,
+ )
+ default_version = INFLOWINVENTORY_API_VERSION_2026_09_29
api_docs_url = "https://cloudapi.inflowinventory.com/docs"
lists_tables_without_credentials = True # static endpoint catalog — safe for public docs
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory.py b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory.py
index f6949d97bef0..2789a3ff66e7 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory.py
@@ -13,6 +13,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.inflowinve
from products.warehouse_sources.backend.temporal.data_imports.sources.inflowinventory.inflowinventory import (
INFLOWINVENTORY_API_VERSION_2023_04_01,
INFLOWINVENTORY_API_VERSION_2026_07_10,
+ INFLOWINVENTORY_API_VERSION_2026_09_29,
PAGE_SIZE,
InflowInventoryResumeConfig,
check_access,
@@ -187,7 +188,8 @@ class TestPagination:
@parameterized.expand(
[
("legacy", INFLOWINVENTORY_API_VERSION_2023_04_01),
- ("current", INFLOWINVENTORY_API_VERSION_2026_07_10),
+ ("previous", INFLOWINVENTORY_API_VERSION_2026_07_10),
+ ("current", INFLOWINVENTORY_API_VERSION_2026_09_29),
]
)
@mock.patch(CLIENT_SESSION_PATCH)
@@ -278,7 +280,8 @@ class TestCheckAccess:
@parameterized.expand(
[
("legacy", INFLOWINVENTORY_API_VERSION_2023_04_01),
- ("current", INFLOWINVENTORY_API_VERSION_2026_07_10),
+ ("previous", INFLOWINVENTORY_API_VERSION_2026_07_10),
+ ("current", INFLOWINVENTORY_API_VERSION_2026_09_29),
]
)
@mock.patch.object(inflowinventory, "make_tracked_session")
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory_source.py
index 3d6c41e2e637..d644c862aff6 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/inflowinventory/tests/test_inflowinventory_source.py
@@ -94,14 +94,15 @@ class TestInflowinventorySource:
def test_version_declaration(self) -> None:
# New sources default to the current stable version; the legacy pin stays supported so
# existing sources keep syncing under their own version.
- assert self.source.default_version == "2026-07-10"
- assert set(self.source.supported_versions) == {"2023-04-01", "2026-07-10"}
+ assert self.source.default_version == "2026-09-29"
+ assert set(self.source.supported_versions) == {"2023-04-01", "2026-07-10", "2026-09-29"}
@parameterized.expand(
[
("pinned_legacy", "2023-04-01", "2023-04-01"),
- ("pinned_current", "2026-07-10", "2026-07-10"),
- ("unpinned_resolves_to_default", None, "2026-07-10"),
+ ("pinned_previous", "2026-07-10", "2026-07-10"),
+ ("pinned_current", "2026-09-29", "2026-09-29"),
+ ("unpinned_resolves_to_default", None, "2026-09-29"),
]
)
@mock.patch(