warehouse-source-new-version

Adds or deprecates vendor API versions for PostHog data warehouse import sources.

713|118|Updated Aug 11, 2020
One-click install
npx skills add https://github.com/PostHog/posthog-foss --skill warehouse-source-new-version
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: warehouse-source-new-version
Source: https://github.com/PostHog/posthog-foss/tree/main/.agents/skills/warehouse-source-new-version
Command: npx skills add https://github.com/PostHog/posthog-foss --skill warehouse-source-new-version

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a vendor like Stripe or Shopify ships a new API version, engineers must decide whether the version needs support, wire version dispatch through the source, keep old pinned versions working, and handle deprecation and migration safely. This Skill encodes the full decision framework and step-by-step procedure for that work in PostHog's warehouse sources codebase.

Core Features & Use Cases

  • Version gate analysis: Diff a new vendor version against the current default across auth, pagination, schemas, and webhooks to decide whether it needs supporting at all.
  • Version declaration and dispatch: Add labels to supported_versions, flip default_version, and thread the resolved pin through get_schemas, validate_credentials, sync, and webhook surfaces.
  • Deprecation and migration: Mark sunset versions in deprecated_versions and write idempotent, written-not-run repinning migrations for ExternalDataSource rows.
  • Use Case: Stripe announces a new dated API version; use this Skill to diff the changelog, declare the version, dispatch on SourceInputs.api_version, parameterize tests over both versions, and ship one conventional PR.

Quick Start

Use this skill to add support for the newly announced Stripe API version to the Stripe warehouse source while keeping existing pinned versions working.

Frequently Asked Questions about warehouse-source-new-version

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add support for a new vendor API version to a PostHog warehouse source?

First diff the new version against the current default_version using the vendor changelog across auth, pagination, schemas, and webhooks. If it diverges, add the label to supported_versions, flip default_version, dispatch on SourceInputs.api_version in the request layer, and parameterize tests over both versions.

When should a new vendor API version not be added to a source?

Skip adding it when no area the source reads differs from the current default version, since an extra label only adds maintenance cost. Close the task with per-area, changelog-cited evidence that the new label is indistinguishable from the default.

How does API version pinning work for ExternalDataSource rows?

Each ExternalDataSource row pins one version in its api_version column, with NULL resolving to the source's default_version. A schema-level override in ExternalDataSchema.api_version wins over the source pin, and the sync pipeline resolves override, then pin, then default.

How do I deprecate an old vendor API version in a warehouse source?

Add the old version to deprecated_versions with the vendor's sunset date and flip default_version to the newer version in the same PR. Only write a repinning migration when the vendor has announced a sunset date; advisory deprecations leave existing pins untouched.

Why must old API versions keep working after adding a new one?

Existing customer rows are pinned to specific versions, and silently moving them to another version is the failure mode the pinning framework prevents. Removing or altering an old version's request path is an explicit future decision, never part of a version-add PR.

What are common pitfalls when dispatching on API version in a source?

Common pitfalls include version-to-header maps with .get() fallthroughs that silently send no version, ignoring the api_version parameter in get_schemas and validate_credentials, and reusing one resume-checkpoint field across incompatible pagination mechanisms. Tests must use per-version fixtures shaped from vendor docs.