Skip to content
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

Add validation for document_id to prevent nil or empty values #557

Conversation

Trehana
Copy link
Contributor

@Trehana Trehana commented Aug 16, 2024

Pull Request

Related issue

Fixes #556

What does this PR do?

Add validation for document_id to prevent nil or empty values

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!

Copy link

@nicolasconnault nicolasconnault left a comment

Choose a reason for hiding this comment

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

This fixes a critical issue in Meilisearch, thank you!

@curquiza curquiza changed the title #556 -Add validation for document_id to prevent nil or empty values Add validation for document_id to prevent nil or empty values Aug 20, 2024
@curquiza curquiza added the bug Something isn't working label Aug 20, 2024
Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

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

@Trehana

For the PR
But the tests fail. Can fix them?

@Trehana Trehana requested a review from curquiza August 21, 2024 00:48
@curquiza
Copy link
Member

@Trehana the tests still don't pass 😢

@Trehana
Copy link
Contributor Author

Trehana commented Aug 21, 2024

@Trehana the tests still don't pass 😢

i have added a fix, @curquiza

@curquiza curquiza requested a review from brunoocasali August 21, 2024 13:26
@curquiza
Copy link
Member

@Trehana the tests still do not pass
You can run them locally by following our CONTRIBUTING.md: https://github.com/meilisearch/meilisearch-ruby/blob/main/CONTRIBUTING.md

lib/meilisearch/index.rb Outdated Show resolved Hide resolved
@Trehana Trehana requested a review from brunoocasali August 28, 2024 09:46
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3557ff5) to head (57030fb).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #557   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          677       684    +7     
=========================================
+ Hits           677       684    +7     

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

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

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

Hi @Trehana the PR looks good!

I just need you to run the rubocop command: bundle exec rubocop --autp-gen-config
and commit the changes.
After that I will be able to merge and release :)

Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

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

bors merge

Thanks a lot for your contribution!

meili-bors bot added a commit that referenced this pull request Sep 11, 2024
557: Add validation for document_id to prevent nil or empty values r=brunoocasali a=Trehana

# Pull Request

## Related issue
Fixes #556 

## What does this PR do?
Add validation for document_id to prevent nil or empty values

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Trehana Fernando <[email protected]>
Copy link
Contributor

meili-bors bot commented Sep 11, 2024

This PR was included in a batch that successfully built, but then failed to merge into main. It will not be retried.

Additional information:

{"message":"1 review requesting changes and 1 approving review by reviewers with write access.","documentation_url":"https://docs.github.com/articles/about-protected-branches","status":"422"}

@brunoocasali brunoocasali merged commit 267b4f5 into meilisearch:main Sep 13, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entire index is deleted if you pass nil to delete_document
4 participants