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(data-warehouse): scaffold 1 newly-requested source (#128937)

Tom Owers8ab752c71eaa
diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml
index 5978d3d8815f..4536c6e39a26 100644
--- a/.github/workflows/ci-python.yml
+++ b/.github/workflows/ci-python.yml
@@ -777,7 +777,15 @@ jobs:
read -ra vendors <<< "$VENDORS"
targets=("${vendors[@]/#/$plugin_dir/}")
fi
- pytest -p no:cacheprovider "${targets[@]}" -m 'not async_migrations' --reruns=2 --reruns-delay=1 --tb=short
+ status=0
+ pytest -p no:cacheprovider "${targets[@]}" -m 'not async_migrations' --reruns=2 --reruns-delay=1 --tb=short || status=$?
+ # Exit code 5 means pytest collected no tests. A scaffolded vendor stub has none yet,
+ # so a vendors run that selects only stubs passes. A full run must still find tests.
+ if [ "$status" -eq 5 ] && [ "$MODE" = "vendors" ]; then
+ echo "The selected vendors have no tests: $VENDORS"
+ exit 0
+ fi
+ exit "$status"
# Collate job - single required status check for branch protection.
# The code-quality job skips when no Python changes, but this job always
diff --git a/products/warehouse_sources/backend/facade/credential_auth_types.py b/products/warehouse_sources/backend/facade/credential_auth_types.py
index aaacbbcc92c5..052920c3976e 100644
--- a/products/warehouse_sources/backend/facade/credential_auth_types.py
+++ b/products/warehouse_sources/backend/facade/credential_auth_types.py
@@ -770,6 +770,7 @@ CREDENTIAL_AUTH_TYPES: Mapping[str, str] = {
"mastodon": "credentials",
"matomo": "credentials",
"maxio": "credentials",
+ "measure": "credentials",
"medusa": "credentials",
"meetup": "credentials",
"megaphone": "credentials",
diff --git a/products/warehouse_sources/backend/facade/credential_kinds.py b/products/warehouse_sources/backend/facade/credential_kinds.py
index 171d972409fe..c03e8a9a7e1c 100644
--- a/products/warehouse_sources/backend/facade/credential_kinds.py
+++ b/products/warehouse_sources/backend/facade/credential_kinds.py
@@ -769,6 +769,7 @@ CREDENTIAL_KINDS: Mapping[str, str] = {
"Mastodon": "mastodon",
"Matomo": "matomo",
"Maxio": "maxio",
+ "Measure": "measure",
"Medusa": "medusa",
"Meetup": "meetup",
"Megaphone": "megaphone",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/field_classification.csv b/products/warehouse_sources/backend/temporal/data_imports/sources/field_classification.csv
index b8dabff3f67f..8486ebb826ff 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/field_classification.csv
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/field_classification.csv
@@ -761,6 +761,7 @@ Marketstack,access_key,,,symbols cik_codes,,marketstack
Mastodon,,,,,,mastodon
Matomo,host site_id api_token,,,,,matomo
Maxio,subdomain api_key region,,,,,maxio
+Measure,,,,,,measure
Medusa,base_url api_key,,,,,medusa
Meetup,,,,,,meetup
Megaphone,api_token organization_id,,,,,megaphone
diff --git a/products/warehouse_sources/sources/measure/__init__.py b/products/warehouse_sources/sources/measure/__init__.py
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/products/warehouse_sources/sources/measure/_config.py b/products/warehouse_sources/sources/measure/_config.py
new file mode 100644
index 000000000000..ebae0d60021f
--- /dev/null
+++ b/products/warehouse_sources/sources/measure/_config.py
@@ -0,0 +1,9 @@
+# This file is automatically generated from `SourceRegistry.get_all_sources()`
+# Do not edit manually - run `pnpm generate:source-configs` to regenerate.
+
+from products.warehouse_sources.sources.sdk import config
+
+
+class MeasureSourceConfig(config.Config):
+ pass
diff --git a/products/warehouse_sources/sources/measure/icon.png b/products/warehouse_sources/sources/measure/icon.png
new file mode 100644
index 000000000000..a4175fe1e5a0
Binary files /dev/null and b/products/warehouse_sources/sources/measure/icon.png differ
diff --git a/products/warehouse_sources/sources/measure/source.py b/products/warehouse_sources/sources/measure/source.py
new file mode 100644
index 000000000000..e57e628012c9
--- /dev/null
+++ b/products/warehouse_sources/sources/measure/source.py
@@ -0,0 +1,34 @@
+from typing import cast
+
+from products.warehouse_sources.sources.measure._config import MeasureSourceConfig
+from products.warehouse_sources.sources.sdk import (
+ DataWarehouseSourceCategory,
+ FieldType,
+ SimpleSource,
+ SourceConfig,
+ SourceKey,
+ SourceRegistry,
+ source_key,
+)
+
+SOURCE_KEY = "Measure"
+
+
+class MeasureSource(SimpleSource[MeasureSourceConfig]):
+ api_docs_url = "https://measure.sh/docs"
+
+ @property
+ def source_type(self) -> SourceKey:
+ return source_key(SOURCE_KEY)
+
+ @property
+ def get_source_config(self) -> SourceConfig:
+ return SourceConfig(
+ name=self.source_type,
+ category=DataWarehouseSourceCategory.ENGINEERING___MONITORING,
+ label="Measure",
+ iconPath="/static/warehouse-sources/measure/icon.png",
+ fields=cast(list[FieldType], []),
+ unreleasedSource=True,
+ )