feat(data-warehouse): implement zenloop import source - #68560
Conversation
|
8ab2420 to
a257896
Compare
…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
a257896 to
0eea9db
Compare
Generated-By: PostHog Code Task-Id: 406b8e05-783a-4156-a263-d071c28d3abd
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-sourcesskill.ResumableSourcewith a single secret API token field (Authorization: Bearer), base URLhttps://api.zenloop.com/v1.surveys,survey_groups,properties(top-level lists; per-survey answer fan-out is left out of v1), pkid.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 atreleaseStatus=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.