Skip to content

feat(connectors): add SurrealDB sink connector#3453

Open
countradooku wants to merge 3 commits into
apache:masterfrom
countradooku:feat/surrealdb-sink-connector
Open

feat(connectors): add SurrealDB sink connector#3453
countradooku wants to merge 3 commits into
apache:masterfrom
countradooku:feat/surrealdb-sink-connector

Conversation

@countradooku

@countradooku countradooku commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a SurrealDB sink connector for writing Iggy messages into SurrealDB using the latest SurrealDB Rust SDK version available during implementation, 3.1.4.

The connector supports deterministic record IDs, bulk INSERT IGNORE writes for idempotent replay, configurable batch sizing, root/namespace/database/no-auth modes, optional table and offset-index definition, payload modes (auto, json, text, base64), metadata/header/checksum/origin timestamp fields, retry/backoff handling, and runtime metrics logging.

This also wires the connector into workspace membership, connector docs, example runtime config, binary artifact builds, edge-release output, version bump scripts, and Docker-backed integration test scaffolding.

Tests

  • cargo fmt --all
  • cargo sort --no-format --workspace
  • cargo clippy --all-features --all-targets -- -D warnings
  • cargo check --all --all-features
  • cargo test -p iggy_connector_surrealdb_sink
  • cargo test -p integration --no-run connectors::surrealdb
  • cargo test --locked --doc
  • cargo doc --no-deps --all-features --quiet
  • ./scripts/ci/taplo.sh
  • ./scripts/ci/license-headers.sh
  • ./scripts/ci/shellcheck.sh
  • ./scripts/ci/binary-artifacts.sh --check
  • ./scripts/extract-version.sh --check
  • git diff --check
  • prek install

Known Review Items

  • ./scripts/ci/third-party-licenses.sh --validate --manifest core/connectors/sinks/surrealdb_sink/Cargo.toml reports BUSL-1.1 license failures from SurrealDB SDK crates. This PR intentionally keeps the SDK dependency because the connector targets the latest SurrealDB SDK.

@countradooku countradooku marked this pull request as ready for review June 11, 2026 08:49
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 11, 2026
SurrealDB is a document database target for Iggy connector users, so the sink writes batches with deterministic record ids and bulk INSERT IGNORE to keep runtime redelivery idempotent without per-message round trips.

Constraint: User explicitly requested the latest SurrealDB Rust SDK and chose to keep it despite BUSL-1.1 license-validation warnings for SurrealDB crates.

Constraint: Local Docker daemon was unavailable, so real-container integration execution could not run here.

Rejected: Per-message SDK writes | too many round trips and weaker batching throughput.

Rejected: Using the testcontainers SurrealDB module | module source hardcodes an older SurrealDB image.

Confidence: medium

Scope-risk: moderate

Directive: Keep record ids deterministic across releases; changing build_record_id breaks replay idempotency.

Tested: cargo fmt --all; cargo sort --no-format --workspace; cargo clippy --all-features --all-targets -- -D warnings; cargo check --all --all-features; cargo test -p iggy_connector_surrealdb_sink; cargo test -p integration --no-run connectors::surrealdb; cargo test --locked --doc; cargo doc --no-deps --all-features --quiet; taplo/license/shellcheck/version/diff/binary checks; prek install

Not-tested: Docker-backed SurrealDB integration execution, because Docker daemon was not running locally.
@countradooku countradooku force-pushed the feat/surrealdb-sink-connector branch from 7b8305a to 48c3a9d Compare June 11, 2026 08:58
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.07%. Comparing base (8678ead) to head (5373ee4).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3453      +/-   ##
============================================
- Coverage     74.57%   72.07%   -2.50%     
- Complexity      937      943       +6     
============================================
  Files          1249     1245       -4     
  Lines        123564   121326    -2238     
  Branches      99837    97627    -2210     
============================================
- Hits          92143    87441    -4702     
- Misses        28438    31098    +2660     
+ Partials       2983     2787     -196     
Components Coverage Δ
Rust Core 75.59% <ø> (-0.13%) ⬇️
Java SDK 58.44% <ø> (-0.14%) ⬇️
C# SDK 18.79% <ø> (-51.07%) ⬇️
Python SDK 81.06% <ø> (ø)
PHP SDK 83.57% <ø> (ø)
Node SDK 91.35% <ø> (+0.12%) ⬆️
Go SDK 40.25% <ø> (ø)
see 529 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant