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): drop auto paginator, mark custom source alpha (#61083)

Marcus Hofef89bf016406
diff --git a/posthog/temporal/data_imports/sources/custom/source.py b/posthog/temporal/data_imports/sources/custom/source.py
index ed4f96a34afd..df86b9e397fe 100644
--- a/posthog/temporal/data_imports/sources/custom/source.py
+++ b/posthog/temporal/data_imports/sources/custom/source.py
@@ -8,6 +8,7 @@ from pydantic import BaseModel, ConfigDict, Field, ValidationError, model_valida
from posthog.schema import (
ExternalDataSourceType as SchemaExternalDataSourceType,
+ ReleaseStatus,
SourceConfig,
SourceFieldInputConfig,
SourceFieldInputConfigType,
@@ -308,6 +309,7 @@ class CustomSource(SimpleSource[CustomSourceConfig]):
return SourceConfig(
name=SchemaExternalDataSourceType.CUSTOM,
label="Custom REST source",
+ releaseStatus=ReleaseStatus.ALPHA,
caption=(
"Set up a source using custom configured mappings. "
"Define a REST API source by providing a manifest that follows the same shape "
diff --git a/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx b/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx
index fe26c35e222f..4b5e7df1e7eb 100644
--- a/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx
+++ b/products/data_warehouse/frontend/shared/components/forms/CustomSourceManifestBuilder.tsx
@@ -32,7 +32,6 @@ import {
// customSourceManifest.ts; only the labels live here, so the allowed values can't
// drift between the type, the parser, and these selects.
const PAGINATOR_LABELS: Record<PaginatorType, string> = {
- auto: 'Auto-detect',
single_page: 'Single page (no pagination)',
json_response: 'JSON body next-URL',
cursor: 'Cursor in JSON body',
@@ -375,7 +374,6 @@ function PaginatorSection({
}): JSX.Element {
const switchType = (type: Paginator['type']): void => {
switch (type) {
- case 'auto':
case 'single_page':
onUpdate({ type })
return
diff --git a/products/data_warehouse/frontend/shared/components/forms/__tests__/customSourceManifest.test.ts b/products/data_warehouse/frontend/shared/components/forms/__tests__/customSourceManifest.test.ts
index 6ca3cb9fc3a6..e22879dd5bb8 100644
--- a/products/data_warehouse/frontend/shared/components/forms/__tests__/customSourceManifest.test.ts
+++ b/products/data_warehouse/frontend/shared/components/forms/__tests__/customSourceManifest.test.ts
@@ -227,13 +227,6 @@ describe('buildManifest', () => {
const desc = buildManifest(descState) as any
expect(desc.resources[0].sort_mode).toBe('desc')
})
-
- it('serializes the auto paginator to type-only', () => {
- const state = baseState()
- state.streams[0].paginator = { type: 'auto' }
- const manifest = buildManifest(state) as any
- expect(manifest.resources[0].endpoint.paginator).toEqual({ type: 'auto' })
- })
})
describe('parseManifestIntoState', () => {
@@ -335,13 +328,16 @@ describe('parseManifestIntoState', () => {
expect(state.auth_api_key_location).toBe('query')
})
- it('parses the auto paginator type when the manifest declares it', () => {
+ it("folds a legacy 'auto' paginator to single_page on parse", () => {
+ // 'auto' was a no-op alias for single_page (it mapped to no paginator on
+ // the backend) and is no longer offered. Manifests authored before it was
+ // removed should still parse without surfacing the dead type.
const manifestJson = JSON.stringify({
client: { base_url: 'https://x' },
resources: [{ name: 'r', endpoint: { path: '/r', paginator: { type: 'auto' } } }],
})
const state = parseManifestIntoState(manifestJson)
- expect(state.streams[0].paginator.type).toBe('auto')
+ expect(state.streams[0].paginator.type).toBe('single_page')
})
it.each(['date', 'timestamp', 'integer'] as const)(
@@ -397,7 +393,7 @@ describe('parseManifestIntoState', () => {
method: 'GET',
data_selector: 'data',
primary_key: 'id',
- paginator: { type: 'auto' },
+ paginator: { type: 'single_page' },
sort_mode: 'desc',
incremental_enabled: true,
cursor_path: 'updated_at',
diff --git a/products/data_warehouse/frontend/shared/components/forms/customSourceManifest.ts b/products/data_warehouse/frontend/shared/components/forms/customSourceManifest.ts
index 90f427e85675..bb9961711dde 100644
--- a/products/data_warehouse/frontend/shared/components/forms/customSourceManifest.ts
+++ b/products/data_warehouse/frontend/shared/components/forms/customSourceManifest.ts
@@ -16,7 +16,6 @@ export const API_KEY_LOCATIONS = ['header', 'query', 'cookie'] as const
export type ApiKeyLocation = (typeof API_KEY_LOCATIONS)[number]
export const PAGINATOR_TYPES = [
- 'auto',
'single_page',
'json_response',
'cursor',
@@ -27,7 +26,6 @@ export const PAGINATOR_TYPES = [
export type PaginatorType = (typeof PAGINATOR_TYPES)[number]
export type Paginator =
- | { type: 'auto' }
| { type: 'single_page' }
| { type: 'json_response'; next_url_path?: string }
| { type: 'cursor'; cursor_path?: string; cursor_param?: string }
@@ -241,8 +239,6 @@ export function extractAuthSecrets(state: ManifestState): AuthSecrets {
function serializePaginator(paginator: Paginator): Record<string, unknown> {
switch (paginator.type) {
- case 'auto':
- return { type: 'auto' }
case 'json_response':
return {
type: 'json_response',