2525: Auth: Provide all document related permissions for action document.* r=Kerollmops a=janithpet
Added a `Action::DocumentsAll` identifier as [suggested](https://github.com/meilisearch/meilisearch/issues/2080#issuecomment-1022952486), along with the other necessary changes in `action.rs`.
Inside `store.rs`, added an extra condition in `HeedAuthStore::put_api_key` to append all document related permissions if `key.actions.contains(&DocumentsAll)`.
Updated the tests as [suggested](https://github.com/meilisearch/meilisearch/issues/2080#issuecomment-1022952486).
I am quite new to Rust, so please let me know if I had made any mistakes; have I written the code in the most idiomatic/efficient way? I am aware that the way I append the document permissions could create duplicates in the `actions` vector, but I am not sure how fix that in a simple way (other than using other dependencies like [itertools](https://github.com/rust-itertools/itertools), for example).
## What does this PR do?
Fixes#2080
## PR checklist
Please check if your PR fulfills the following requirements:
- [ ] Does this PR fix an existing issue?
- [ 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: janithPet <jpetangoda@gmail.com>
2557: add more tests on the formatted route r=Kerollmops a=irevoire
We had a bunch of tests trying to send array of array in a get request, this is actually not supported thus I updated the tests to only send a single array or a direct string.
Also, the real tests that ensure the array of array are well handled are in milli so I don’t think we should lose time trying to « improve » our test surface on this point.
Co-authored-by: Irevoire <tamo@meilisearch.com>
568: Fix not equal filter when field contains both number and strings r=Kerollmops a=GraDKh
Related to https://github.com/meilisearch/meilisearch/issues/2516
Looks like the issue should be moved to this repo, but I'm not sure what the right procedure for it.
Co-authored-by: Dmytro Gordon <dmytro@bigstream.co>
2553: Fix ci binary push r=irevoire a=curquiza
Prevent the check of version when releasing a RC for the binary publish.
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2549: Fix CI checking version compatibility r=irevoire a=curquiza
- Fix CI checks in `if` regarding the `stable` variable created
- Fix command to remove prefix `refs/tags/v` from `GITHUB_REF` in `check-release.sh` script
- Change from `sh` to `bash` for `check-release.sh` script
- Fix error message
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2544: Fix content of dump/assets for testing r=curquiza a=loiclec
This is just a change to the content of two .dump files used in the integration tests.
Those files contained settings with the criterion `desc(fame)`, which is invalid
for a v3 or higher dump.
The change took place in the updates.json file inside the decompressed
.dump files. Instances of `desc(field)` or `asc(field)` were changed to
`field:desc` and `field:asc`.
The tests were (wrongly) passing because the ranking rules were never parsed.
Co-authored-by: Loïc Lecrenier <loic@meilisearch.com>
566: Introduce the copy_to_path method on the Index r=irevoire a=Kerollmops
Meilisearch needs this method to do snapshots.
Co-authored-by: Kerollmops <clement@meilisearch.com>
564: Rename the limitedTo parameter into maxTotalHits r=curquiza a=Kerollmops
This PR is related to https://github.com/meilisearch/meilisearch/issues/2542, it renames the `limitedTo` parameter into `maxTotalHits`.
Co-authored-by: Kerollmops <clement@meilisearch.com>
Some contained settings with the criterion desc(fame), which is invalid
for a v3 or higher dump.
The change took place in the updates.json file inside the decompressed
.dump files. Instances of desc(field) or asc(field) were changed to
field:desc and field:asc
2530: Check the version in Cargo.toml before publishing r=irevoire a=curquiza
Fixes#2079
Also
- improves the current docker CI for v0.28.0: the current implementation will make run 2 CI instead of just one for the official release
- move the `is-latest-releaes.sh` script, and update the documentation comment
- fix version of permissive-json-pointer
How to test the script?
```
export GITHUB_REF='refs/tags/v0.28.0'
sh .github/scripts/check-release.sh
```
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Co-authored-by: Clémentine Urquizar - curqui <clementine@meilisearch.com>
563: Improve the `estimatedNbHits` when a `distinctAttribute` is specified r=irevoire a=Kerollmops
This PR is related to https://github.com/meilisearch/meilisearch/issues/2532 but it doesn't fix it entirely. It improves it by computing the excluded documents (the ones with an already-seen distinct value) before stopping the loop, I think it was a mistake and should always have been this way.
The reason it doesn't fix the issue is that Meilisearch is lazy, just to be sure not to compute too many things and answer by taking too much time. When we deduplicate the documents by their distinct value we must do it along the water, everytime we see a new document we check that its distinct value of it doesn't collide with an already returned document.
The reason we can see the correct result when enough documents are fetched is that we were lucky to see all of the different distinct values possible in the dataset and all of the deduplication was done, no document can be returned.
If we wanted to implement that to have a correct `extimatedNbHits` every time we should have done a pass on the whole set of possible distinct values for the distinct attribute and do a big intersection, this could cost a lot of CPU cycles.
Co-authored-by: Kerollmops <clement@meilisearch.com>
2529: Improve docker CI: push vX.Y tag (without patch) to DockerHub (for v0.28.0) r=curquiza a=curquiza
Bringing a commit from main ([5ae5b06](5ae5b06018)) into release-v0.28.0 to have this change already applied for v0.28.0
Following the one merged on main: https://github.com/meilisearch/meilisearch/pull/2521
Co-authored-by: Janith Petangoda <22471198+janithpet@users.noreply.github.com>
* Create a docker tag without patch version if git tag has 0 patch version.
* Create Docker tag without patch number if git tag follows v<number>.<number>.<number>
Add minor changes on CI
* Create a docker tag without patch version if git tag has 0 patch version.
* Create Docker tag without patch number if git tag follows v<number>.<number>.<number>
Add minor changes on CI