Skip to content

fix(connectors): meilisearch_sink URL scheme check is case-sensitive - #4158

Open
mattp5657 wants to merge 2 commits into
apache:masterfrom
mattp5657:fix/connectors-meilisearch-url-scheme-case
Open

mattp5657 wants to merge 2 commits into
apache:masterfrom
mattp5657:fix/connectors-meilisearch-url-scheme-case

Conversation

@mattp5657

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Closes #4157

What changed?

normalize_host detected the URL scheme via a literal starts_with("http://")/starts_with("https://") check. An uppercase or mixed-case scheme like HTTPS://host matched neither literal, fell through to the "no scheme" branch, and got http:// prepended, producing http://HTTPS://host, which parses as scheme="http", host="https", silently connecting to the wrong host over plaintext.

Scheme detection is now case-insensitive (eq_ignore_ascii_case on the split-off scheme), matching opensearch_sink's existing pattern. An unsupported scheme (e.g. ftp://) is now also rejected outright instead of being silently mangled the same way.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

Claude was used in creating this PR.

@github-actions

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer
  • /pin - exempt the PR from the stale bot, /unpin to undo

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Sep 12, 2026
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.65%. Comparing base (78151b9) to head (d2e646b).

Files with missing lines Patch % Lines
core/connectors/sinks/meilisearch_sink/src/lib.rs 93.75% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master    #4158       +/-   ##
=============================================
- Coverage     87.13%   30.65%   -56.49%     
  Complexity     1455     1455               
=============================================
  Files          1273     1270        -3     
  Lines        215301   173708    -41593     
  Branches     179911   138909    -41002     
=============================================
- Hits         187611    53244   -134367     
- Misses        23173   118447    +95274     
+ Partials       4517     2017     -2500     
Components Coverage Δ
Rust Core 16.69% <93.75%> (-71.48%) ⬇️
Java SDK 67.58% <ø> (ø)
C# SDK 76.97% <ø> (-0.16%) ⬇️
Python SDK 91.34% <ø> (+0.37%) ⬆️
PHP SDK 85.65% <ø> (-0.03%) ⬇️
Node SDK 96.17% <ø> (-0.06%) ⬇️
Go SDK 69.40% <ø> (-0.05%) ⬇️
Files with missing lines Coverage Δ
core/connectors/sinks/meilisearch_sink/src/lib.rs 74.15% <93.75%> (+0.89%) ⬆️

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

bug(connectors): meilisearch_sink URL scheme check is case-sensitive, silently connects to the wrong host

1 participant