Commit Graph

3738 Commits

Author SHA1 Message Date
bors[bot]
2b2e571c76
Merge #2460
2460: Create custom error types for `TaskType`, `TaskStatus`, and `IndexUid` r=Kerollmops a=walterbm

# Pull Request

## What does this PR do?
Fixes #2443 by making the following changes:

- Add custom `TaskTypeError` for `TaskType::from_str` 
- Add custom `TaskStatusError` for `TaskStatus::from_str`
- Add custom `IndexUidFormatError` for `IndexUid::from_str`
- Implement `From<IndexUidFormatError> for IndexResolverError` to convert between errors
- Replace all usages of `IndexUid::new` with `IndexUid::from_str`
    - **NOTE** I am relatively new to Rust and I struggled a lot with this final part. This PR ended up with a messy error conversion which does not seem ideal. Please let me know if you have any suggestions for how to make this better and I'll be happy to make any updates!

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] 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: walter <walter.beller.morales@gmail.com>
2022-06-09 09:10:28 +00:00
Kerollmops
6f0d3472b1
Change the test for the new pagination.limited_to setting 2022-06-09 10:56:43 +02:00
Kerollmops
5cd13cc303
Add a test to validate the faceting.max_values_per_facet setting 2022-06-09 10:56:42 +02:00
Kerollmops
1e3dcbea3f
Plug the pagination.limited_to setting 2022-06-09 10:56:42 +02:00
Kerollmops
b96399d24b
Plug the faceting.max_values_per_facet setting 2022-06-09 10:56:42 +02:00
Kerollmops
5450b5ced3
Add the faceting.max_values_per_facet setting 2022-06-09 10:54:32 +02:00
Kerollmops
c924614527
Bump milli to 0.29.2 2022-06-09 10:54:28 +02:00
walter
96d4fd54bb Change the index uid format check for better legibility 2022-06-08 19:58:47 -04:00
walter
3e5d6be86b Rename TaskType::from_str parameter to 'type_' 2022-06-08 19:57:45 -04:00
walter
2b944ecd89 Remove IndexUid::new and replace with IndexUid::from_str 2022-06-08 19:56:01 -04:00
bors[bot]
db42268888
Merge #2473
2473: fix blocking in dumps r=irevoire a=MarinPostma

This PR fixes two blocking calls in the dump process.


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-06-08 17:14:46 +00:00
ad hoc
108b3520de
fix blocking auth controller dump 2022-06-08 18:19:29 +02:00
bors[bot]
f64b824c45
Merge #2493
2493: Update version for next release (v0.28.0) r=Kerollmops a=curquiza



Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2022-06-08 16:02:03 +00:00
Clémentine Urquizar
fc4990b968
Update version for next release (v0.28.0) 2022-06-08 17:59:18 +02:00
Clémentine Urquizar - curqui
39a1dcb32c
Update .github/workflows/publish-docker.yml 2022-06-08 17:27:03 +02:00
Lawrence Chou
afcc493480
Merge publish-docker-latest.yml & publish-docker-tag.yml (#2477)
close #1901
2022-06-08 17:17:20 +02:00
bors[bot]
6171f17f1d
Merge #2468
2468: Update milli 0.29 r=Kerollmops a=ManyTheFish

- [x] Update milli to 0.29
- [x] Integrate charabia
- [x] Set disabled_words to default when Index::exact_words returns None
- [x] Fix ranking rules integration test

fixes #2375
fixes #2144
fixes #2417
fixes #2407

Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-06-08 14:29:20 +00:00
ManyTheFish
55169ff914 Fix test get_document_s_nested_attributes_to_retrieve 2022-06-08 15:56:06 +02:00
ManyTheFish
0a16f71563 Increase wait_task wainting time 2022-06-08 15:56:03 +02:00
bors[bot]
bd280f75e7
Merge #2487 #2489
2487: Feat(auth): Use hmac instead of sha256 to derivate API keys from master key r=MarinPostma a=ManyTheFish

Wrap sha256 in HMAC to derivate new API keys from the master key.


2489: Fix(auth): Authorization test were not testing keys unrestricted on index r=Kerollmops a=ManyTheFish



Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-06-08 13:48:07 +00:00
ManyTheFish
1a7631c807 Hash master_key before passing it to HMAC 2022-06-08 14:54:47 +02:00
ManyTheFish
17f30c2b2d Fix(auth): Authorization test were not testing keys unrestricted on index 2022-06-08 14:52:32 +02:00
ManyTheFish
09938c9b6f Patch ranking rules error test 2022-06-08 14:38:09 +02:00
ManyTheFish
f5306eb5b0 Set disabled_words to default when Index::exact_words returns None 2022-06-08 14:38:09 +02:00
ManyTheFish
173eea06e1 Replace old tokenizer by charabia 2022-06-08 14:38:09 +02:00
ManyTheFish
8d09772334 Update milli 2022-06-08 14:38:05 +02:00
ManyTheFish
987a7f8926 Wrap sha256 in HMAC instead of directly use sha256 2022-06-08 14:25:12 +02:00
bors[bot]
0928f3d41c
Merge #2453
2453: test index resolver r=MarinPostma a=MarinPostma

add some tests to the `IndexResolver` implementation of `BatchHandler`


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-06-08 11:05:30 +00:00
bors[bot]
09ec8e9fca
Merge #2471
2471: Remove the connection keep-alive timeout r=MarinPostma a=Thearas

# Pull Request

## What does this PR do?
Fixes <https://github.com/meilisearch/meilisearch-go/issues/221>.
Meilisearch has a default connection keep-alive timeout for 5s, which means it will close the connections with idle time >= 5s.
This PR set actix-web keep-alive config to `KeepAlive::Os`, let the client and system to decide when to close the connection.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] 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?


Co-authored-by: Thearas <thearas850@gmail.com>
2022-06-08 06:59:25 +00:00
bors[bot]
1968950b0f
Merge #2475
2475: feat(auth): Paginate API keys listing r=irevoire a=ManyTheFish

- [x] Update tests
- [x] Use Pagination helpers to paginate API keys (thanks to `@irevoire)`

fixes #2442


Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-06-07 15:42:02 +00:00
ManyTheFish
6ffa222218 feat(auth): Paginate API keys listing
- [x] Update tests
- [x] Use Pagination helpers to paginate API keys

fixes #2442
2022-06-07 17:37:48 +02:00
bors[bot]
79e67df73d
Merge #2474
2474: feat(auth): remove `dumps.get` action from keys r=ManyTheFish a=ManyTheFish

- [x] Update tests
- [x] Remove `dumps.get` action


related to: #2430

Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-06-07 15:03:41 +00:00
bors[bot]
72be296852
Merge #2476
2476: fix(test): Windows index pagination test r=ManyTheFish a=ManyTheFish

The test `index::get_index::get_and_paginate_indexes` fails on every PRs during `Tests on windows-latest` CI job.
- reduce the default index size in tests.
- wait for each task instead of waiting for the last one at the end.

Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-06-07 14:17:01 +00:00
ManyTheFish
a7bff35e49 fix(test): Reduce default index size in tests 2022-06-07 15:16:34 +02:00
ManyTheFish
3b01ed4fe8 feat(auth): remove dumps.get action from keys 2022-06-07 10:49:28 +02:00
ad hoc
cbd27d313c
fix blocking writing of meta file in dump 2022-06-07 10:07:40 +02:00
ad hoc
6ac8675c6d
add IndexResolver BatchHandler tests 2022-06-07 09:33:57 +02:00
ad hoc
df61ca9cae
add mocker to IndexResolver 2022-06-07 09:33:57 +02:00
ad hoc
bbd685af5e
move IndexResolver to real module 2022-06-07 09:33:56 +02:00
Thearas
9b9cbc815b fmt 2022-06-07 03:50:39 +08:00
Thearas
fd11903920 remove the connection timeout 2022-06-07 03:38:23 +08:00
bors[bot]
c3003065e8
Merge #2464
2464: Simplify the `star_or` function usage r=ManyTheFish a=Kerollmops

This PR simplifies the usage of the `star_or` function that was originally introduced in #2399. The `serde-cs` https://github.com/naughie/serde-cs/pull/1 PR was merged and was implementing the `IntoIterator` trait on the `CS` types, which makes it possible to directly collect without converting a `CS` into the inner type (vec).

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-06-06 12:47:27 +00:00
bors[bot]
c6ce3452cf
Merge #2459
2459: Fix typo in codebase comments r=Kerollmops a=ryanrussell

# Pull Request

## PR checklist
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?


Co-authored-by: Ryan Russell <git@ryanrussell.org>
2022-06-06 09:01:07 +00:00
Kerollmops
e5b760c59a
Fix the segment analytics tests 2022-06-06 10:44:46 +02:00
Kerollmops
277a0a7967
Bump serde-cs to simplify our usage of the star_or function 2022-06-06 10:17:33 +02:00
Kerollmops
64b5b2e1f8
Use serde-cs::CS with StarOr to reduce the logic duplication 2022-06-06 10:06:00 +02:00
Kerollmops
10d3b367dc
Simplify the const default values 2022-06-06 10:06:00 +02:00
walter
ba55905377 Add custom IndexUidFormatError for IndexUid 2022-06-05 02:26:48 -04:00
walter
0e7e16ae72 Add custom TaskStatusError for TaskStatus 2022-06-05 00:51:08 -04:00
walter
80c156df3f Add custom TaskTypeError for TaskType 2022-06-05 00:51:08 -04:00