Skip to content

feat(data-warehouse): implement zenloop import source - #68560

Merged
Gilbert09 merged 3 commits into
masterfrom
tom/dwh-zenloop
Jul 9, 2026
Merged

feat(data-warehouse): implement zenloop import source#68560
Gilbert09 merged 3 commits into
masterfrom
tom/dwh-zenloop

Conversation

@Gilbert09

Copy link
Copy Markdown
Member

Problem

Zenloop was a scaffolded Data warehouse source (registered stub, unreleasedSource=True, no sync logic).

Changes

Implements the Zenloop source end to end following the implementing-warehouse-sources skill.

  • ResumableSource with a single secret API token field (Authorization: Bearer), base URL https://api.zenloop.com/v1.
  • Endpoints: surveys, survey_groups, properties (top-level lists; per-survey answer fan-out is left out of v1), pk id.
  • Page-number pagination (page + per_page=50) terminating on a short page. Tracked session, tenacity retries on 429/5xx, non-retryable mapping for 401/403.

Full refresh only. Removes unreleasedSource; ships at releaseStatus=ALPHA.

How did you test this code?

Added transport and source-class tests covering page-number pagination and short-page termination, resume-from-saved-page, retryable vs non-retryable status mapping, credential validation, and the full-refresh schema list. 46 pass locally.

I (Claude) couldn't run a live sync (no Zenloop token), so per-endpoint list-envelope keys come from the public API docs rather than a curl smoke test.

@Gilbert09 Gilbert09 self-assigned this Jul 6, 2026
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team July 6, 2026 10:55
Comment thread products/warehouse_sources/backend/temporal/data_imports/sources/SOURCES.md Outdated
@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. products/warehouse_sources/backend/temporal/data_imports/sources/zenloop/tests/test_zenloop_source.py, line 711-760 (link)

    P2 @pytest.mark.parametrize used where @parameterized.expand is required

    The repo-wide convention is to use @parameterized.expand from the parameterized library for all non-async tests, reserving @pytest.mark.parametrize only for cases where parameterized.expand cannot work (e.g. async functions). None of these three parametrized tests are async, so they should use @parameterized.expand.

    The same pattern appears in test_zenloop.py at TestCheckAccess.test_status_mapping (which also takes a monkeypatch fixture — pytest still injects fixtures when using parameterized.expand).

    Rule Used: Use @parameterized.expand from the `parameterize... (source)

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "feat(data-warehouse): implement zenloop ..." | Re-trigger Greptile

Comment thread products/warehouse_sources/backend/temporal/data_imports/sources/SOURCES.md Outdated

@danielcarletti danielcarletti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Gilbert09 added 2 commits July 8, 2026 16:46
…mplify resume guard

Address review feedback: the SOURCES.md comm-method column is the transport protocol (HTTP), not the source category (PRODUCTIVITY), and fix its column alignment. Drop the superfluous `next_page > 1` inner guard since saved resume state always starts at page 2.

Generated-By: PostHog Code
Task-Id: 1a9a476f-a1c4-4c82-904f-9bf6dc22a7b3
@trunk-io

trunk-io Bot commented Jul 8, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Generated-By: PostHog Code
Task-Id: 406b8e05-783a-4156-a263-d071c28d3abd
@Gilbert09
Gilbert09 merged commit cf69283 into master Jul 9, 2026
229 checks passed
@Gilbert09
Gilbert09 deleted the tom/dwh-zenloop branch July 9, 2026 08:51
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-09 09:16 UTC Run
prod-us ✅ Deployed 2026-07-09 09:28 UTC Run
prod-eu ✅ Deployed 2026-07-09 09:31 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants