source-mssql-e2e-cdc-tests

Reproduce CDC bugs against source-mssql using SQL fixtures and declarative test assertions.

22.0k|5.3k|Updated Jul 27, 2020
One-click install
npx skills add https://github.com/airbytehq/airbyte --skill source-mssql-e2e-cdc-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: source-mssql-e2e-cdc-tests
Source: https://github.com/airbytehq/airbyte/tree/main/airbyte-integrations/connectors/source-mssql/.agents/skills/source-mssql-e2e-cdc-tests
Command: npx skills add https://github.com/airbytehq/airbyte --skill source-mssql-e2e-cdc-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reproducing customer-reported CDC bugs in the Airbyte source-mssql connector locally is slow and error-prone: you must enable CDC on SQL Server, craft per-bug database state, run the connector, and verify failure signatures by hand. This Skill packages that entire loop into runnable case scripts with declarative pass/fail assertions.

Core Features & Use Cases

  • Per-bug case scripts: Ready-made reproductions for airbytehq/oncall#11451 (LSN-range regression), #12094 (schema-history bloat), and #12162 (whitespace in stream names), each gating its exit code on --expect-* assertions.
  • CDC fixture library: Idempotent SQL fixtures, CDC-aware config templates, and configured catalogs that work across source-mssql 4.3.x and 4.4.x.
  • Multi-phase repro support: Capture Airbyte STATE messages between reads, mutate the server (e.g., advance the CDC min LSN), and replay with stale state to test offset-validation behavior.
  • Use Case: After building a fix with :dockerBuildx, run VERSION=dev ./cases/11451.sh to confirm the fix still rejects genuinely expired saved offsets while resolving the reported bug.

Quick Start

Start the SQL Server backend with the generic skill's start-backend.sh, then run the case script for the bug you want to reproduce, such as cases/12162.sh.

Frequently Asked Questions about source-mssql-e2e-cdc-tests

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

FAQPage Schema
How do I reproduce a source-mssql CDC bug locally?

Start the SQL Server backend with the generic skill's start-backend.sh, then run the case script for your bug, such as cases/12162.sh. Each case applies its SQL fixtures, renders the CDC config, runs the connector, and fails with a non-zero exit code if its --expect-* assertions are not met.

How do I verify a source-mssql CDC fix before releasing it?

Build the connector locally with ./gradlew :airbyte-integrations:connectors:source-mssql:dockerBuildx, then re-run the relevant case with VERSION=dev, for example VERSION=dev ./cases/11451.sh. The case's assertions confirm the fix resolves the bug without breaking offset validation.

Does this skill require Airbyte Cloud or GSM credentials?

No. It runs entirely locally against a Dockerized SQL Server backend container. You only need Docker, uv, jq, and a clone of the airbytehq/airbyte repository.

How do I test a multi-phase CDC bug involving stale state?

Model your case on cases/11451.sh: run a baseline read, extract the STATE messages with extract-state.py, mutate the server with apply-sql.sh, then replay with run.sh --state=PATH and --skip-fixtures. Use --step-name=<bug>/<phase> to keep each phase's artifacts separate.

Why does source-mssql fail with a Debezium message.key.columns error?

This happens when a CDC-enabled stream's identifier contains whitespace, because buildMessageKeyColumns() joins schema.table:pkcol strings without filtering or escaping them. Case 12162 reproduces this; the fix pre-filters such streams so Debezium falls back to the table's native primary key.

Can I run the CDC cases against older connector versions?

Yes. Cases default to VERSION=4.4.2 but accept overrides, for example VERSION=4.3.4 ./cases/12162.sh. Case 11451 additionally splits BASELINE_VERSION and TARGET_VERSION so you can capture state on one version and replay on another.