Skip to content

feat(connectors): add Meilisearch source connector#3498

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

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

Conversation

@countradooku

Copy link
Copy Markdown
Contributor

Summary

  • add the Meilisearch source connector using the official meilisearch-sdk
  • document source configuration, retry behavior, and primary-key cursor requirements
  • add Docker-backed integration coverage for producing indexed Meilisearch documents into Iggy

Motivation

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

Closes #3496.

Validation

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

@countradooku
countradooku marked this pull request as ready for review June 15, 2026 18:59
@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 77.26098% with 176 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.17%. Comparing base (6f1d548) to head (3179a1b).

Files with missing lines Patch % Lines
...e/connectors/sources/meilisearch_source/src/lib.rs 77.26% 148 Missing and 28 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3498      +/-   ##
============================================
- Coverage     73.99%   65.17%   -8.82%     
  Complexity      937      937              
============================================
  Files          1301     1301              
  Lines        147393   133177   -14216     
  Branches     122945   108805   -14140     
============================================
- Hits         109063    86799   -22264     
- Misses        34858    42847    +7989     
- Partials       3472     3531      +59     
Components Coverage Δ
Rust Core 63.49% <77.26%> (-10.81%) ⬇️
Java SDK 62.44% <ø> (ø)
C# SDK 71.04% <ø> (-1.14%) ⬇️
Python SDK 92.17% <ø> (ø)
PHP SDK 84.29% <ø> (ø)
Node SDK 91.35% <ø> (+0.09%) ⬆️
Go SDK 42.87% <ø> (ø)
Files with missing lines Coverage Δ
core/sdk/src/http/consumer_groups.rs 100.00% <ø> (ø)
core/sdk/src/http/topics.rs 100.00% <ø> (ø)
core/sdk/src/http/users.rs 100.00% <ø> (ø)
...e/connectors/sources/meilisearch_source/src/lib.rs 77.26% <77.26%> (ø)

... and 278 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 core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs Outdated
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs Outdated
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/integration/tests/connectors/fixtures/meilisearch/container.rs
@ryerraguntla

Copy link
Copy Markdown
Contributor

overall correct direction - cursor-by-primary-key is the right shape for Meilisearch, test coverage is present but coverage gap — only happy-path covered. No test for: (a) state restored across restart → cursor starts from last_primary_key, not from zero; (b) second poll produces zero duplicates. refer The elasticsearch_source.rs has state_persists_across_connector_restart as a pattern. For a cursor-based source, duplicate-freedom is the core invariant; it should be integration-tested.

@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/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/integration/tests/connectors/fixtures/meilisearch/container.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/README.md
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs Outdated
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs Outdated
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs Outdated
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
Comment thread core/connectors/sources/meilisearch_source/src/lib.rs
@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

github-actions Bot commented Jul 1, 2026

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 1, 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
valid_documents_and_last_primary_key(documents, primary_key, self.id);
let messages = self.documents_to_messages(documents)?;

let mut state = self.state.lock().await;

@ryerraguntla ryerraguntla Jul 18, 2026

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.

298-301,657-677 — hits non-empty, all PK invalid → last_primary_key stays None → same page re-polled forever; valid docs behind stuck. Unit test :974-985 locks this. Fix: fail poll (or hard-error) when hits.len()>0 && valid.is_empty().

))
})
}

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:238-258 — open checks sortableAttributes only; README + fixture require filterable too. Cursor filter pk > N fails at poll with PermanentHttpError after first batch. Fix: mirror sortable check for filterableAttributes in open.

# under the License.

[package]
name = "iggy_connector_meilisearch_source"

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; peers 0.4.1-edge.1. Fix: validate and align.

let (documents, last_document_primary_key) =
valid_documents_and_last_primary_key(documents, primary_key, self.id);
let messages = self.documents_to_messages(documents)?;

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.

298-305 + runtime/source.rs:464-517 — in-memory cursor advance before Iggy send; send fail ⇒ batch lost in live process. README:72-76 documents. Fix: #3635-class ack/rollback

Error::Connection(format!("Failed to create Meilisearch client: {error}"))
})
}

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.

187-216 — health outer loop nests retry_sdk_open_operation(max_open_retries); budgets multiply. Fix: single open retry budget.

(None, None) => None,
}
}

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.

restored non-integer last_primary_key → every poll Err; no open validate. Fix: validate/wipe cursor at open.

} else {
document
};

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.

ProducedMessage.id always None; integer PK known. ES same (:418). Fix: map PK→id optional.

@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 source connector

3 participants