Skip to content

feat(connectors): add Meilisearch sink connector#3497

Open
countradooku wants to merge 15 commits into
apache:masterfrom
countradooku:feat/meilisearch-sink-connector
Open

feat(connectors): add Meilisearch sink connector#3497
countradooku wants to merge 15 commits into
apache:masterfrom
countradooku:feat/meilisearch-sink-connector

Conversation

@countradooku

Copy link
Copy Markdown
Contributor

Summary

  • add the Meilisearch sink connector using the official meilisearch-sdk
  • document the sink configuration and payload mapping behavior
  • add Docker-backed integration coverage for indexing JSON messages into Meilisearch

Motivation

This splits the sink portion out of #3404 so the Meilisearch sink can be reviewed and merged independently from the source connector.

Closes #3495.

Validation

  • cargo sort --no-format --workspace
  • cargo test -p iggy_connector_meilisearch_sink
  • cargo clippy -p iggy_connector_meilisearch_sink --all-targets -- -D warnings
  • env CARGO_BIN_EXE_iggy-server=... CARGO_BIN_EXE_iggy-connectors=... cargo test -p integration --test mod -- connectors::meilisearch::meilisearch_sink
  • git diff --check

@countradooku
countradooku marked this pull request as ready for review June 15, 2026 18:58
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 15, 2026
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.53433% with 220 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.29%. Comparing base (6f1d548) to head (701b9b2).

Files with missing lines Patch % Lines
core/connectors/sinks/meilisearch_sink/src/lib.rs 72.53% 203 Missing and 17 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3497       +/-   ##
=============================================
- Coverage     73.99%   40.29%   -33.70%     
  Complexity      937      937               
=============================================
  Files          1301     1300        -1     
  Lines        147393   129164    -18229     
  Branches     122945   104793    -18152     
=============================================
- Hits         109063    52051    -57012     
- Misses        34858    74281    +39423     
+ Partials       3472     2832      -640     
Components Coverage Δ
Rust Core 32.45% <72.53%> (-41.84%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.04% <ø> (-1.14%) ⬇️
Python SDK 92.17% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.22% <ø> (-0.04%) ⬇️
Go SDK 42.87% <ø> (ø)
Files with missing lines Coverage Δ
core/connectors/sinks/meilisearch_sink/src/lib.rs 72.53% <72.53%> (ø)

... and 445 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.

Comment thread Cargo.toml
Comment thread Cargo.toml Outdated
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs Outdated
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs Outdated
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs Outdated
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs Outdated
@ryerraguntla

ryerraguntla commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

overall correct approach - JSON-object document model with generated PK is sound, wait_for_tasks + partial-error accounting is thoughtful. test coverage is present but there is
coverage gap — only happy-path (2 JSON messages indexed, iggy_id present). No test for: document_action = update semantics, include_metadata = false, raw-payload base64 fallback, or wait_for_tasks = false fire-and-forget path. Not a merge-blocker given this is the initial connector, but tracking it. Along with coverage, please take care of the above mentioned issues.

@ryerraguntla

Copy link
Copy Markdown
Contributor

/author

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 16, 2026
@countradooku

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 16, 2026
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs Outdated
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/connectors/sinks/meilisearch_sink/src/lib.rs
Comment thread core/integration/tests/connectors/fixtures/meilisearch/container.rs Outdated
@ryerraguntla

Copy link
Copy Markdown
Contributor

@countradooku Looks good except for the few warnings around back indexing and open calls. After the above requested changes, good to go for second reviewer.

@ryerraguntla

Copy link
Copy Markdown
Contributor

/author

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 23, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

If you need a review, please ensure CI is green and the PR is rebased on the latest master. Don't hesitate to ping the maintainers - either @core on Discord or by mentioning them directly here on the PR.

Thank you for your contribution!

@github-actions github-actions Bot added the S-stale Inactive issue or pull request label Jul 12, 2026
@github-actions github-actions Bot removed the S-stale Inactive issue or pull request label Jul 17, 2026
@countradooku

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jul 17, 2026
}

async fn wait_for_task(&self, client: &Client, task: TaskInfo) -> Result<(), Error> {
if !self.config.wait_for_tasks {

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.

lib.rs:521-523 + 818-829 — wait_for_tasks=false returns Ok on submit; async Meilisearch task failures (disk full, schema conflict) invisible, offset committed, silent loss. Fix: none required — documented README + warn open/close. Non-blocking.

("text".to_string(), Value::String(text)),
("data_type".to_string(), Value::String("text".to_string())),
]),
_ => {

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.

lib.rs:797-812 + 368-373 — unsupported schema (Avro/Protobuf/etc.) dropped, errors_count++, offset commits → permanent silent loss for whole topic if schema unsupported. Fix: matches runtime per-record drop convention; document explicitly / consider DLQ.

return Ok(());
}

match self.index_documents(client, documents).await {

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.

818-846 — counter accounting: partial-fail undercounts un-attempted trailing chunks; redelivery double-counts prior chunks; documents_confirmed not bumped for confirmed-durable earlier chunks in Err arm. Metrics-only. Fix: label best-effort or account remaining. Keep the correct metrics .


[package]
name = "iggy_connector_meilisearch_sink"
version = "0.4.0"

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.

version 0.4.0, siblings all 0.4.1-edge.1. Version-sync CI flag. Fix: bump to 0.4.1-edge.1. Same as Source connector

@ryerraguntla

Copy link
Copy Markdown
Contributor

/author

@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author PR is waiting on author response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Meilisearch sink connector

3 participants