: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
feat(warehouse_sources): support monday API version 2026-10 (#119191)
Tom Owers8cf0c2341db3
diff --git a/.agents/skills/warehouse-source-new-version/SKILL.md b/.agents/skills/warehouse-source-new-version/SKILL.mdindex 69554e7641ce..854b0664b2a9 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. 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.+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. For a GraphQL vendor that serves a schema per version, validate the source's exact query strings against each version's SDL (for example with `graphql-core`'s `validate`): it names every removed field a query selects, and it settles changelog entries that only say a removal is "planned". 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/monday/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/canonical_descriptions.pyindex 238a1108fb4c..fe1baad4a318 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/canonical_descriptions.py@@ -48,10 +48,12 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"id": "Unique identifier for the user.","name": "The user's full name.","email": "The user's email address.",- "enabled": "Whether the user account is enabled.",- "is_admin": "Whether the user is an admin of the account.",- "is_guest": "Whether the user is a guest with restricted access.",- "is_pending": "Whether the user has a pending invitation.",+ "kind": "The user's role in the account, such as admin, member, guest, or view_only.",+ "status": "The user's activation status: ACTIVE, INACTIVE, or PENDING.",+ "enabled": "Whether the user account is enabled (API versions before 2026-10).",+ "is_admin": "Whether the user is an admin of the account (API versions before 2026-10).",+ "is_guest": "Whether the user is a guest with restricted access (API versions before 2026-10).",+ "is_pending": "Whether the user has a pending invitation (API versions before 2026-10).","title": "The user's job title.","created_at": "Time at which the user was created.",},diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/monday.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/monday.pyindex e69838544b45..a2451221a0f0 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/monday.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/monday.py@@ -15,14 +15,17 @@ MONDAY_API_URL = "https://api.monday.com/v2"# `API-Version` header; "v2" predates dated labels and keeps sending the header it shipped with.MONDAY_VERSION_V2 = "v2"MONDAY_VERSION_2026_07 = "2026-07"+MONDAY_VERSION_2026_10 = "2026-10"MONDAY_API_VERSION_HEADERS: dict[str, str] = {MONDAY_VERSION_V2: "2024-10",MONDAY_VERSION_2026_07: "2026-07",+ MONDAY_VERSION_2026_10: "2026-10",}# 2024-10 serves column settings as `settings_str`; 2026-07 documents only the `settings` JSON field.MONDAY_COLUMN_SETTINGS_FIELDS: dict[str, str] = {MONDAY_VERSION_V2: "settings_str",MONDAY_VERSION_2026_07: "settings",+ MONDAY_VERSION_2026_10: "settings",}# Boards/users/folders page size; items_page caps at 500.PAGE_SIZE = 100@@ -70,6 +73,29 @@ query ($limit: Int!, $page: Int!) {}"""+# 2026-10 removes the `enabled`/`is_admin`/`is_guest`/`is_pending` booleans; `status` and `kind` replace them.+_USERS_QUERY_2026_10 = """+query ($limit: Int!, $page: Int!) {+ users (limit: $limit, page: $page) {+ id+ name+ kind+ status+ title+ location+ created_at+ last_activity+ }+}+"""++MONDAY_USERS_QUERIES: dict[str, str] = {+ MONDAY_VERSION_V2: _USERS_QUERY,+ MONDAY_VERSION_2026_07: _USERS_QUERY,+ MONDAY_VERSION_2026_10: _USERS_QUERY_2026_10,+}+_WORKSPACES_QUERY = """query ($limit: Int!, $page: Int!) {workspaces (limit: $limit, page: $page) {@@ -327,7 +353,7 @@ def get_rows(returnif endpoint == "users":- yield from iterate_paged(_USERS_QUERY, "users")+ yield from iterate_paged(MONDAY_USERS_QUERIES[api_version], "users")returnif endpoint == "workspaces":diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.pyindex 64ace6673e62..86452f7f6887 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/source.py@@ -23,6 +23,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.typfrom products.warehouse_sources.backend.temporal.data_imports.sources.generated_configs.monday import MondaySourceConfigfrom products.warehouse_sources.backend.temporal.data_imports.sources.monday.monday import (MONDAY_VERSION_2026_07,+ MONDAY_VERSION_2026_10,MONDAY_VERSION_V2,monday_source,validate_credentials as validate_monday_credentials,@@ -38,8 +39,8 @@ class MondaySource(SimpleSource[MondaySourceConfig]):npm=("@mondaydotcomorg/api", "monday-sdk-js", "@mondaycom/apps-sdk"),)- supported_versions = (MONDAY_VERSION_V2, MONDAY_VERSION_2026_07)- default_version = MONDAY_VERSION_2026_07+ supported_versions = (MONDAY_VERSION_V2, MONDAY_VERSION_2026_07, MONDAY_VERSION_2026_10)+ default_version = MONDAY_VERSION_2026_10api_docs_url = "https://developer.monday.com/api-reference"# "v2" sends `API-Version: 2024-10`, which monday deprecated on this date. monday now answers it with# its maintenance version instead of rejecting it, so a v2 pin no longer selects what it names.diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday.pyindex aae976b1dede..c84825ed541d 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday.py@@ -15,6 +15,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.monday.monACTIVITY_LOGS_PAGE_SIZE,ITEMS_PAGE_SIZE,MONDAY_VERSION_2026_07,+ MONDAY_VERSION_2026_10,MONDAY_VERSION_V2,PAGE_SIZE,MondayGraphQLError,@@ -111,6 +112,7 @@ class TestGetRowsPaged:[(MONDAY_VERSION_V2, "2024-10"),(MONDAY_VERSION_2026_07, "2026-07"),+ (MONDAY_VERSION_2026_10, "2026-10"),],)def test_requests_carry_token_and_pinned_api_version(self, api_version: str, expected_header: str) -> None:@@ -172,17 +174,22 @@ class TestGetRowsBoardChildren:]@pytest.mark.parametrize(- "api_version, requested_field, absent_field",+ "endpoint, api_version, requested_field, absent_field",[- (MONDAY_VERSION_V2, "settings_str", " settings "),- (MONDAY_VERSION_2026_07, " settings ", "settings_str"),+ ("board_columns", MONDAY_VERSION_V2, "settings_str", " settings "),+ ("board_columns", MONDAY_VERSION_2026_07, " settings ", "settings_str"),+ ("board_columns", MONDAY_VERSION_2026_10, " settings ", "settings_str"),+ ("users", MONDAY_VERSION_V2, "is_admin", "status"),+ ("users", MONDAY_VERSION_2026_07, "is_admin", "status"),+ ("users", MONDAY_VERSION_2026_10, "status", "is_admin"),+ ("users", MONDAY_VERSION_2026_10, "kind", "enabled"),],)- def test_columns_request_the_settings_field_the_pinned_version_serves(- self, api_version, requested_field, absent_field+ def test_queries_request_the_fields_the_pinned_version_serves(+ self, endpoint, api_version, requested_field, absent_field):- with scripted_network([ScriptedResponse(json={"data": {"boards": []}})]) as network:- list(get_rows("token", "board_columns", mock.MagicMock(), api_version))+ with scripted_network([ScriptedResponse(json={"data": {"boards": [], "users": []}})]) as network:+ list(get_rows("token", endpoint, mock.MagicMock(), api_version))query = network.requests_log[0].json()["query"]assert requested_field in querydiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.pyindex 49bce069049f..36a8dd1c2f62 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/monday/tests/test_monday_source.py@@ -9,6 +9,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.common.tesfrom products.warehouse_sources.backend.temporal.data_imports.sources.generated_configs.monday import MondaySourceConfigfrom products.warehouse_sources.backend.temporal.data_imports.sources.monday.monday import (MONDAY_VERSION_2026_07,+ MONDAY_VERSION_2026_10,MONDAY_VERSION_V2,)from products.warehouse_sources.backend.temporal.data_imports.sources.monday.source import MondaySource@@ -39,9 +40,10 @@ class TestMondaySource:@pytest.mark.parametrize("mock_return, expected_valid, expected_message, api_version, expected_api_version",[- (True, True, None, None, MONDAY_VERSION_2026_07),+ (True, True, None, None, MONDAY_VERSION_2026_10),(True, True, None, MONDAY_VERSION_V2, MONDAY_VERSION_V2),- (False, False, "Invalid monday.com API token", None, MONDAY_VERSION_2026_07),+ (True, True, None, MONDAY_VERSION_2026_07, MONDAY_VERSION_2026_07),+ (False, False, "Invalid monday.com API token", None, MONDAY_VERSION_2026_10),],)@mock.patch(@@ -63,7 +65,8 @@ class TestMondaySource:[(MONDAY_VERSION_V2, "2024-10"),(MONDAY_VERSION_2026_07, "2026-07"),- (None, "2026-07"),+ (MONDAY_VERSION_2026_10, "2026-10"),+ (None, "2026-10"),],)def test_sync_sends_the_source_pin(self, pinned_version: str | None, expected_header: str) -> None: