Skip to content

Bump meilisearch ruby to v0.32 & other small improvements #419

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 3 commits into from
May 21, 2025

Conversation

brunoocasali
Copy link
Member

@brunoocasali brunoocasali commented May 21, 2025

Pull Request

Related issue

Attempt to fix the issue no #355

What does this PR do?

  • Replace MeiliSearch across the repo to Meilisearch (few missing spots)
  • Bump meilisearch-ruby to v0.32
  • Add mongodb as a service in the docker-compose (otherwise the test suite does not pass)

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Summary by CodeRabbit

  • New Features
    • Added MongoDB service to the application stack, allowing integration with MongoDB for relevant services.
  • Bug Fixes
    • Standardized the capitalization of the Meilisearch module name across configuration and documentation for improved consistency.
  • Chores
    • Updated the Meilisearch gem dependency to a newer version.

@brunoocasali brunoocasali added the breaking-change The related changes are breaking for the users label May 21, 2025
@brunoocasali brunoocasali requested a review from curquiza May 21, 2025 01:07
Copy link

coderabbitai bot commented May 21, 2025

Walkthrough

This update standardizes the capitalization of the MeiliSearch module to Meilisearch across configuration files, documentation, and code samples. It also updates the meilisearch gem dependency to a newer version and introduces a MongoDB service in the Docker Compose setup, configuring related services to connect to it.

Changes

File(s) Change Summary
.code-samples.meilisearch.yaml, spec/support/mongo_models/citizen.rb, .github/ISSUE_TEMPLATE/bug_report.md Standardized module name casing from MeiliSearch to Meilisearch in code samples and documentation.
docker-compose.yml Added a mongo service; updated package and playground services to use and depend on MongoDB.
meilisearch-rails.gemspec Updated meilisearch gem dependency from ~> 0.31.0 to ~> 0.32.0.

Poem

In the garden where code and data grow,
Names now bloom with matching flow.
Mongo hops in, a new friend to greet,
With gems refreshed, the project feels complete.
A bunny’s nod for tidy names and more—
Let’s hop ahead, explore what’s in store!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 RuboCop (1.75.5)
meilisearch-rails.gemspec

rubocop-rails extension supports plugin, specify plugins: rubocop-rails instead of require: rubocop-rails in /.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
rubocop-rspec extension supports plugin, specify plugins: rubocop-rspec instead of require: rubocop-rspec in /.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
Error: The RSpec/FilePath cop has been split into RSpec/SpecFilePathFormat and RSpec/SpecFilePathSuffix.
(obsolete configuration found in .rubocop_todo.yml, please update it)

spec/support/mongo_models/citizen.rb

rubocop-rails extension supports plugin, specify plugins: rubocop-rails instead of require: rubocop-rails in /.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
rubocop-rspec extension supports plugin, specify plugins: rubocop-rspec instead of require: rubocop-rspec in /.rubocop.yml.
For more information, see https://docs.rubocop.org/rubocop/plugin_migration_guide.html.
Error: The RSpec/FilePath cop has been split into RSpec/SpecFilePathFormat and RSpec/SpecFilePathSuffix.
(obsolete configuration found in .rubocop_todo.yml, please update it)

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 96dd4a4 and 4b74f6d.

📒 Files selected for processing (5)
  • .code-samples.meilisearch.yaml (1 hunks)
  • .github/ISSUE_TEMPLATE/bug_report.md (4 hunks)
  • docker-compose.yml (3 hunks)
  • meilisearch-rails.gemspec (1 hunks)
  • spec/support/mongo_models/citizen.rb (1 hunks)
🔇 Additional comments (12)
meilisearch-rails.gemspec (1)

37-37: Approve dependency bump
The meilisearch gem dependency has been correctly updated to ~> 0.32.0, aligning with the PR objective.

spec/support/mongo_models/citizen.rb (1)

8-8: Standardize module casing
The module inclusion has been updated from MeiliSearch::Rails to Meilisearch::Rails, ensuring consistent naming. No functional changes.

.code-samples.meilisearch.yaml (1)

3-3: Update module references in code samples
Both the initializer configuration and model inclusion now use Meilisearch::Rails (instead of MeiliSearch::Rails), which matches the standardized naming used across the codebase.

Also applies to: 11-11

.github/ISSUE_TEMPLATE/bug_report.md (4)

65-69: Correct configuration module reference
The configuration assignment now refers to Meilisearch::Rails.configuration (formerly MeiliSearch::Rails), maintaining consistency.


94-94: Fix module include for ActiveRecord example
Updated include Meilisearch::Rails to reflect the corrected module name in the ActiveRecord model snippet.


123-123: Fix module include for Sequel example
The Sequel model example now includes Meilisearch::Rails for the corrected casing.


157-158: Correct client call references
The task retrieval and waiting logic now use Meilisearch::Rails.client, matching the standardized module namespace.

docker-compose.yml (5)

14-14: Add MongoDB host environment var to package service
The MONGODB_HOST=mongo:27017 environment variable is correctly added, allowing services to locate the MongoDB container.


18-18: Ensure package service depends on MongoDB
Adding - mongo to depends_on guarantees startup ordering with the new MongoDB service.


21-21: Link package to MongoDB
Including - mongo under links provides network aliasing for the package container.


32-32: Add MongoDB host environment var to playground service
MONGODB_HOST=mongo:27017 ensures the playground environment can access the MongoDB service.


39-39: Link playground to MongoDB
Linking playground to mongo provides service discovery within Docker Compose.

✨ Finishing Touches
  • 📝 Generate Docstrings

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

Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.69%. Comparing base (96dd4a4) to head (4b74f6d).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #419   +/-   ##
=======================================
  Coverage   90.69%   90.69%           
=======================================
  Files          14       14           
  Lines         849      849           
=======================================
  Hits          770      770           
  Misses         79       79           

☔ 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 requested a review from Strift May 21, 2025 01:20
Copy link

@Strift Strift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brunoocasali brunoocasali merged commit cb2aec0 into main May 21, 2025
12 checks passed
@brunoocasali brunoocasali deleted the general-improvements branch May 21, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants