Skip to content

Changes related to the next Meilisearch release (v1.15.0) #1950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 9, 2025

Conversation

meili-bot
Copy link
Contributor

@meili-bot meili-bot commented May 23, 2025

Related to this issue: meilisearch/integration-guides#316

This PR:

  • gathers the changes related to the next Meilisearch release (v1.15.0) so that this package is ready when the official release is out.
  • should pass the tests against the latest pre-release of Meilisearch.
  • might eventually contain test failures until the Meilisearch v1.15.0 is out.

⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.15.0) is out.

This PR is auto-generated for the pre-release week purpose.

Summary by CodeRabbit

  • New Features

    • Added a new code sample demonstrating how to enable typo tolerance settings for numbers in the "movies" index.
    • Introduced a new typo tolerance option to disable tolerance on numbers.
  • Bug Fixes

    • Improved the way typo tolerance settings are validated in tests by switching to snapshot-based verification.
  • Tests

    • Updated tests to include the new typo tolerance option for numbers and enhanced validation methods.
  • Documentation

    • Expanded code samples to illustrate new typo tolerance configuration options.
  • Chores

    • Updated Docker Compose configuration to use a fixed Meilisearch version tag for consistency.

@meili-bot meili-bot added the skip-changelog The PR will not appear in the release changelogs label May 23, 2025
Copy link

coderabbitai bot commented May 23, 2025

"""

Walkthrough

A new code sample was added to demonstrate updating typo tolerance settings with the disableOnNumbers option. The TypoTolerance type was extended to include this property, and related tests were updated to use snapshots for default settings and to test the new option. Additionally, the Docker Compose file was updated to pin the Meilisearch image version, and a batch validation test was adjusted for an extra property.

Changes

File(s) Change Summary
.code-samples.meilisearch.yaml Added a new code sample (typo_tolerance_guide_5) showing how to set disableOnNumbers: true.
src/types/types.ts Exported GranularFilterableAttribute and added disableOnNumbers to the TypoTolerance type.
tests/typo_tolerance.test.ts Switched to snapshot testing for defaults and added test for disableOnNumbers in typo tolerance.
docker-compose.yml Changed Meilisearch image tag from latest to fixed version v1.15.0.
tests/utils/tasks-and-batches.ts Updated batch assertion to expect 8 keys instead of 7.

Sequence Diagram(s)

sequenceDiagram
    participant Tester
    participant API
    participant Index

    Tester->>API: Update typo tolerance (disableOnNumbers: true)
    API->>Index: Apply typo tolerance settings
    Index-->>API: Confirm update
    API-->>Tester: Return updated typo tolerance
Loading

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • flevi29

Poem

A hop and a skip, a new flag appears,
Typo tolerance now checks numbers, cheers!
Snapshots replace old test ways,
Ensuring correctness through all our days.
With every commit, the code hops ahead—
Bugs beware, for rabbits tread! 🐇
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 57c0bd2 and d6bcb6f.

📒 Files selected for processing (2)
  • docker-compose.yml (1 hunks)
  • tests/utils/tasks-and-batches.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: integration-tests (Node.js 20)
  • GitHub Check: integration-tests (Node.js 22)
  • GitHub Check: integration-tests (Node.js 22)
  • GitHub Check: integration-tests (Node.js 20)
🔇 Additional comments (2)
docker-compose.yml (1)

17-17:

✅ Verification successful

Pin Meilisearch image to v1.15.0 for reproducible testing.

Replaces latest with the explicit v1.15.0 tag to ensure stability against the upcoming Meilisearch release. Before merging, verify that getmeili/meilisearch:v1.15.0 is published and accessible.


🏁 Script executed:

#!/usr/bin/env bash
# Verify that the v1.15.0 tag exists on Docker Hub
status=$(curl -s -o /dev/null -w "%{http_code}" https://registry.hub.docker.com/v2/repositories/getmeili/meilisearch/tags/v1.15.0)
if [[ "$status" -ne 200 ]]; then
  echo "Error: getmeili/meilisearch:v1.15.0 tag not found on Docker Hub" >&2
  exit 1
fi
echo "Verified: getmeili/meilisearch:v1.15.0 exists."

Length of output: 259


Pin Meilisearch image to v1.15.0 for reproducible testing

Verified that getmeili/meilisearch:v1.15.0 exists on Docker Hub; replacing latest with an explicit tag ensures stability against future Meilisearch releases.

• File: docker-compose.yml
• Line: 17

-   image: getmeili/meilisearch:latest
+   image: getmeili/meilisearch:v1.15.0
tests/utils/tasks-and-batches.ts (1)

52-55:

❓ Verification inconclusive

Incomplete validation: assertion count doesn't match destructured properties.

The assertion now expects 8 keys in the batch object, but only 7 properties are destructured and validated. This suggests a new property has been added that isn't being validated.

Please verify the actual batch object structure and ensure all properties are properly validated:

If there is indeed a new 8th property, please update the destructuring and add appropriate validation for the new property.


🏁 Script executed:

#!/bin/bash
# Description: Find batch object structures and usages to verify the expected properties

# Search for Batch type definition
ast-grep --pattern 'interface Batch {
  $$$
}'

# Search for batch object creation/usage patterns
rg -A 10 -B 2 "batch.*=|= .*batch" --type ts

# Look for any recent changes to batch-related types
rg -A 5 -B 5 "Batch.*{" --type ts

Length of output: 9881


Incomplete validation: assertion count doesn’t match destructured properties

The test asserts 8 keys on the batch object but only extracts 7 properties, so a newly added field isn’t being validated. Please manually verify the batch’s shape in your codebase (e.g. the Batch interface or wherever it’s constructed) and update the test to:

  • Include the missing property in the destructuring
  • Add an assertion for its type/value

For example, in tests/utils/tasks-and-batches.ts around lines 52–55:

- extAssert.lengthOf(Object.keys(batch), 8);
-
- const { uid, progress, details, stats, duration, startedAt, finishedAt } = batch;
+ extAssert.lengthOf(Object.keys(batch), 8);

+ // Destructure the newly added property (replace `newProp` with the actual name)
+ const { uid, progress, details, stats, duration, startedAt, finishedAt, newProp } = batch;
+ vitestAssert.typeOf(newProp, "expectedType");

• File: tests/utils/tasks-and-batches.ts
• Lines: 52–55

Ensure the test covers all 8 fields.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Strift Strift self-assigned this May 23, 2025
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (9339216) to head (d6bcb6f).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1950   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files          18       18           
  Lines        1418     1418           
  Branches      299      299           
=======================================
  Hits         1404     1404           
  Misses         14       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@brunoocasali brunoocasali marked this pull request as ready for review June 9, 2025 16:42
@brunoocasali brunoocasali enabled auto-merge June 9, 2025 16:43
@brunoocasali brunoocasali added this pull request to the merge queue Jun 9, 2025
Merged via the queue into main with commit fbd78d0 Jun 9, 2025
10 checks passed
@brunoocasali brunoocasali deleted the bump-meilisearch-v1.15.0 branch June 9, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog The PR will not appear in the release changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants