Skip to content

feat(connectors): add Meilisearch source connector#3404

Open
countradooku wants to merge 9 commits into
apache:masterfrom
countradooku:feat/meilisearch-connectors
Open

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

Conversation

@countradooku
Copy link
Copy Markdown
Contributor

@countradooku countradooku commented Jun 1, 2026

Summary

  • add a Meilisearch source connector using the official meilisearch-sdk
  • wire the source into the connectors workspace and source documentation
  • split Meilisearch integration fixtures into container.rs, sink.rs, and source.rs, then add source runtime coverage

Validation

  • cargo check -p iggy_connector_meilisearch_source
  • cargo test -p iggy_connector_meilisearch_source
  • cargo check -p integration
  • pre-push cargo clippy hook passed

Notes

Meilisearch write operations are task-based, so the connector uses the
official Rust SDK for health checks, index creation, document writes, and
task completion while preserving Iggy connector lifecycle semantics. The
sink injects a stable iggy_id primary key when payloads omit the configured
primary key, keeping repeated deliveries idempotent across stream/topic
partitions.

Constraint: User requested the official Meilisearch SDK instead of direct REST calls
Constraint: Connector runtime tests live under core/integration/tests/connectors, not connector-local tests
Rejected: Reuse the Elasticsearch bulk client shape directly | Meilisearch writes complete through asynchronous tasks rather than bulk item responses
Rejected: Keep connector-local live tests | inconsistent with existing connector integration layout
Confidence: high
Scope-risk: moderate
Directive: Keep Meilisearch task waiting enabled by default unless delivery semantics are intentionally relaxed
Tested: cargo test -p iggy_connector_meilisearch_sink
Tested: cargo clippy -p iggy_connector_meilisearch_sink --all-targets -- -D warnings
Tested: cargo build -p iggy_connector_meilisearch_sink
Tested: cargo test -p integration --test mod --no-run
Tested: env CARGO_BIN_EXE_iggy-server=... CARGO_BIN_EXE_iggy-connectors=... cargo test -p integration --test mod -- meilisearch_sink_indexes_json_messages --nocapture
Not-tested: Full unfiltered integration test suite
Meilisearch already had a sink connector, so this adds the matching source connector and test fixture structure to support bidirectional connector coverage. The source uses the official Meilisearch SDK for health checks and search polling, preserving the connector runtime's state-based offset persistence pattern.

Constraint: Use the existing connector SDK Source lifecycle and persisted ConnectorState format
Constraint: Use the official meilisearch-sdk rather than hand-written search HTTP calls
Rejected: Keep Meilisearch source fixture code inside sink.rs | source and sink test setup should mirror the Elasticsearch container/source/sink split
Confidence: high
Scope-risk: moderate
Directive: Keep Meilisearch source polling semantics tied to stable search ordering when indexes mutate during runtime
Tested: cargo check -p iggy_connector_meilisearch_source
Tested: cargo test -p iggy_connector_meilisearch_source
Tested: cargo check -p integration
Not-tested: Full Docker-backed Meilisearch integration test runtime
@countradooku countradooku changed the title Add Meilisearch source connector feat(connectors): add Meilisearch source connector Jun 1, 2026
The PR branch needed to absorb upstream connector and workspace updates so GitHub can merge it cleanly. The resolution keeps upstream dependency bumps and connector list entries while preserving the new Meilisearch source connector workspace membership and documentation.

Constraint: PR targets apache/iggy master and must be mergeable there
Rejected: Rebase the branch | a merge commit preserves the already-published PR branch without rewriting history
Confidence: high
Scope-risk: moderate
Directive: Keep upstream connector additions and Meilisearch source additions together in shared connector listings
Tested: cargo check -p iggy_connector_meilisearch_source
Tested: cargo test -p iggy_connector_meilisearch_source
Tested: cargo check -p integration
Tested: git diff --check
Not-tested: Full Docker-backed connector integration suite
@countradooku countradooku marked this pull request as ready for review June 1, 2026 14:02
@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 1, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 72.30559% with 203 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.42%. Comparing base (d94cad8) to head (ba87e1c).

Files with missing lines Patch % Lines
core/connectors/sinks/meilisearch_sink/src/lib.rs 72.31% 116 Missing and 18 partials ⚠️
...e/connectors/sources/meilisearch_source/src/lib.rs 72.28% 56 Missing and 13 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #3404       +/-   ##
=============================================
- Coverage     74.67%   46.42%   -28.25%     
  Complexity      943      943               
=============================================
  Files          1228     1228               
  Lines        120529   105966    -14563     
  Branches      97266    82732    -14534     
=============================================
- Hits          90002    49193    -40809     
- Misses        27588    54087    +26499     
+ Partials       2939     2686      -253     
Components Coverage Δ
Rust Core 39.49% <72.30%> (-36.38%) ⬇️
Java SDK 58.44% <ø> (ø)
C# SDK 69.41% <ø> (-0.52%) ⬇️
Python SDK 81.06% <ø> (ø)
Node SDK 91.53% <ø> (ø)
Go SDK 40.20% <ø> (ø)
Files with missing lines Coverage Δ
...e/connectors/sources/meilisearch_source/src/lib.rs 72.28% <72.28%> (ø)
core/connectors/sinks/meilisearch_sink/src/lib.rs 72.31% <72.31%> (ø)

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

The pre-merge TOML formatter expects long inline dependency feature lists to be expanded. Formatting the Meilisearch SDK dependency keeps the branch aligned with the existing CI taplo check after pulling the latest branch update.

Constraint: Only the Meilisearch branch Cargo.toml formatting drift is in scope

Confidence: high

Scope-risk: narrow

Tested: ./scripts/ci/taplo.sh --check Cargo.toml
Cargo refused to run locked checks because the workspace manifest resolution no longer matched Cargo.lock after the latest Meilisearch branch update. Regenerating the lockfile removes the stale duplicate untrusted 0.7.1 resolution and lets --locked checks run without mutating the lockfile.

Constraint: Preserve the Meilisearch-only scope and update only the lockfile drift required by Cargo

Confidence: high

Scope-risk: narrow

Tested: cargo check -p iggy_connector_meilisearch_source

Tested: cargo check --locked -p iggy_connector_meilisearch_source
The integration harness starts the connectors runtime before the test body indexes Meilisearch documents. Treating a missing Meilisearch index as an empty poll keeps the source connector retryable during startup instead of surfacing a transient configuration error. The source fixture also disables metadata wrapping so the test receives the raw documents it asserts on.

Constraint: Keep the fix scoped to Meilisearch source behavior and its test fixture

Rejected: Sleeping in the test before starting the runtime | the harness owns runtime startup order

Confidence: high

Scope-risk: narrow

Tested: cargo check --locked -p iggy_connector_meilisearch_source

Tested: env CARGO_BIN_EXE_iggy-server=/Users/radudiaconu/Desktop/Code/Rust/iggy-meilisearch/target/debug/iggy-server CARGO_BIN_EXE_iggy-connectors=/Users/radudiaconu/Desktop/Code/Rust/iggy-meilisearch/target/debug/iggy-connectors cargo test -p integration --test mod connectors::meilisearch::meilisearch_source::meilisearch_source_produces_index_documents -- --nocapture
The previous Python BDD job failed before test execution because Docker Hub metadata requests timed out while resolving base images. This empty commit retriggers the PR checks without changing the Meilisearch connector diff.

Constraint: No code changes are needed for an external Docker registry timeout

Rejected: Modify BDD or Docker configuration | failure happened before tests and outside the branch scope

Confidence: high

Scope-risk: narrow

Tested: Not run; empty commit for CI rerun only
@countradooku
Copy link
Copy Markdown
Contributor Author

/ready

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