Commit Graph

287 Commits

Author SHA1 Message Date
ManyTheFish
2b766a2f26 meta(auth): Enhance tests on authorization
Enhance auth tests in order to be able to add new action without changing tests
2022-01-24 15:35:39 +01:00
bors[bot]
1be3a1e945
Merge #2075
2075: Allow payloads with no documents  r=irevoire a=MarinPostma

accept addition with 0 documents.

0 bytes payload are still refused, since they are not valid json/jsonlines/csv anyways...

close #1987


Co-authored-by: mpostma <postma.marin@protonmail.com>
2022-01-24 12:55:29 +00:00
mpostma
0c1a3d59eb fix no-analytics 2022-01-20 11:50:24 +01:00
mpostma
d263f762bf feat(http): accept empty document additions
wip
2022-01-13 12:46:56 +01:00
bors[bot]
5d48f72ade
Merge #2065
2065: MeiliSearch v0.25.0: `stable` -> `main` r=curquiza a=curquiza



Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Co-authored-by: Clément Renault <clement@meilisearch.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Co-authored-by: many <maxime@meilisearch.com>
Co-authored-by: Marin Postma <postma.marin@protonmail.com>
Co-authored-by: Maxime Legendre <maximelegendre@MacBook-Pro-de-Maxime.local>
Co-authored-by: Maxime Legendre <maximelegendre@mbp-de-maxime.home>
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-01-11 16:30:22 +00:00
ManyTheFish
c0d4f71a34 Bug(auth): Wrap key list in results 2022-01-04 14:10:30 +01:00
Tamo
d7df4d6b84
test: Ignore the auths tests on windows
Since the auths tests fail sporadically on the windows CI but we can't
reproduce these failures with a real windows machine we are going to
ignore theses one.
But we still ensure they compile.
2021-12-22 12:39:48 +01:00
Maxime Legendre
37329e0784 Bug(auth): Parse YMD date
Use NaiveDate to parse YMD date instead of NaiveDatetime

fix #2017
2021-12-20 15:30:11 +01:00
Maxime Legendre
a845cd8880 Fix(auth): Forbid index creation on alternates routes
Forbid index creation on alternates routes when the action `index.create` is not given

fix #2024
2021-12-20 14:48:18 +01:00
bors[bot]
845d3114ea
Merge #2008
2008: bug(lib): fix get dumps bad error code r=curquiza a=MarinPostma

fix bad error code being returned whet getting a dump status, and add a test
close #1994

Co-authored-by: Marin Postma <postma.marin@protonmail.com>
2021-12-15 18:58:17 +00:00
bors[bot]
287fa7ca74
Merge #2006 #2007
2006: chore(http): rename task types r=curquiza a=MarinPostma

Rename
- documentsAddition into documentAddition
- documentsPartial into documentPartial
- documentsDeletion into documentDeletion

close #1999


2007: bug(lib): ignore primary if already set on document addition r=curquiza a=MarinPostma

Ignore the primary key if it is already set on documents updates. Add a test for verify behaviour.

close #2002


Co-authored-by: Marin Postma <postma.marin@protonmail.com>
2021-12-15 16:55:40 +00:00
Marin Postma
80ed9654e1 chore(http): rename task types 2021-12-15 17:01:34 +01:00
Marin Postma
7ddab7ef31 bug(lib): fix get dumps bad error code 2021-12-15 16:58:05 +01:00
Marin Postma
d534a7f7c8 bug(lib): ignore primary if already set on document addition 2021-12-15 14:58:37 +01:00
bors[bot]
5af51c852c
Merge #1989
1989: Extend API keys r=curquiza a=ManyTheFish

# Pull Request

## What does this PR do?

- Add API keys in snapshots
- Add API keys in dumps
- fix QA #1979

fix #1979
fix #1995
fix #2001
fix #2003

related to #1890

Co-authored-by: many <maxime@meilisearch.com>
2021-12-14 17:22:58 +00:00
many
ee7970f603 feat(auth): Extend API keys
- Add API keys in snapshots
- Add API keys in dumps
- Rename action indexes.add to indexes.create
- fix QA #1979

fix #1979
fix #1995
fix #2001
fix #2003
related to #1890
2021-12-14 17:33:39 +01:00
Clément Renault
6ac2475aba
Fix the no-analytics flag in the tests 2021-12-08 12:02:18 +01:00
many
ffefd0caf2
feat(auth): API keys
implements:
https://github.com/meilisearch/specifications/blob/develop/text/0085-api-keys.md

- Add tests on API keys management route (meilisearch-http/tests/auth/api_keys.rs)
- Add tests checking authorizations on each meilisearch routes (meilisearch-http/tests/auth/authorization.rs)
- Implement API keys management routes (meilisearch-http/src/routes/api_key.rs)
- Create module to manage API keys and authorizations (meilisearch-auth)
- Reimplement GuardedData to extend authorizations (meilisearch-http/src/extractors/authentication/mod.rs)
- Change X-MEILI-API-KEY by Authorization Bearer (meilisearch-http/src/extractors/authentication/mod.rs)
- Change meilisearch routes to fit to the new authorization feature (meilisearch-http/src/routes/)

- close #1867
2021-12-06 09:52:41 +01:00
Marin Postma
a30e02c18c feat(all): Task store
implements:
https://github.com/meilisearch/specifications/blob/develop/text/0060-refashion-updates-apis.md

linked PR:

- #1889
- #1891
- #1892
- #1902
- #1906
- #1911
- #1914
- #1915
- #1916
- #1918
- #1924
- #1925
- #1926
- #1930
- #1936
- #1937
- #1942
- #1944
- #1945
- #1946
- #1947
- #1950
- #1951
- #1957
- #1959
- #1960
- #1961
- #1962
- #1964

- https://github.com/meilisearch/milli/pull/414
- https://github.com/meilisearch/milli/pull/409
- https://github.com/meilisearch/milli/pull/406
- https://github.com/meilisearch/milli/pull/418

- close #1687
- close #1786
- close #1940
- close #1948
- close #1949
- close #1932
- close #1956
2021-12-02 20:14:42 +01:00
many
3c696da274
Update tests 2021-11-04 17:40:28 +01:00
many
b59145385e
Fix PR comments 2021-11-04 14:57:27 +01:00
many
30a094cbb2
Change lacking errors 2021-11-03 14:33:33 +01:00
marin postma
519093ea65
fix bad rebase 2021-10-29 17:32:49 +02:00
marin postma
2665c0099d
clippy + fmt 2021-10-29 17:25:56 +02:00
Tamo
d72c887422
makes the analytics available for all the routes 2021-10-29 17:25:47 +02:00
bors[bot]
cf67964133
Merge #1848
1848: Error format and Definition r=MarinPostma a=ManyTheFish



Co-authored-by: many <maxime@meilisearch.com>
2021-10-28 14:15:35 +00:00
many
cbaca2b579
Fix PR comments 2021-10-28 15:42:42 +02:00
many
59636fa688
Pimp error where no document is provided 2021-10-28 12:13:51 +02:00
many
ff0908d3fa
Ignore errors tests that show unrelated bugs 2021-10-28 11:41:59 +02:00
many
21f35762ca
Fix content type test 2021-10-28 10:57:11 +02:00
many
7464720426
Fix some errors 2021-10-28 10:47:59 +02:00
CuriousCorrelation
6641e7aa50 Add tests for mini-dashboard status and assets 2021-10-27 17:57:25 +05:30
many
61c15b69fb
Change malformed_payload error 2021-10-27 11:13:12 +02:00
many
8ec0c4c913
Add bad_request error tests 2021-10-27 11:13:12 +02:00
Paul Sanders
c9e1d054c7 Fix csv content-type error 2021-10-12 13:38:48 -04:00
Tamo
66dbd3cd34
makes clippy happy 2021-10-06 17:39:04 +02:00
Tamo
37b267ffb3
duplicate the post document tests with the put verb 2021-10-06 17:15:47 +02:00
Tamo
dfa199f98f
add content-type tests
fix typo

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-10-06 17:15:47 +02:00
Tamo
c6d107a05f
makes the content-type mandatory for every routes 2021-10-06 17:15:47 +02:00
Kerollmops
c388dca5ec
Check that invalid updates do not create an index with a primary key 2021-09-30 15:46:04 +02:00
mpostma
911630000f split csv and json document routes 2021-09-29 00:12:25 +02:00
mpostma
102c46f88b clippy + fmt 2021-09-28 22:22:59 +02:00
mpostma
692c676625 fix tests 2021-09-28 18:57:36 +02:00
mpostma
0f7625e29a bump dependencies 2021-09-13 15:17:08 +02:00
bors[bot]
c101b2a5cb
Merge #1686
1686: Bump milli r=curquiza a=irevoire

 fixes #1685, #1678, #1671, #1677 and #1680

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-09-08 16:31:02 +00:00
Tamo
49c918defa
bump milli 2021-09-08 17:41:47 +02:00
many
c0f9c891f5
Set max_memory value to unlimited during tests
because tests run several meilisearch in parallel,
we over estimate the value for max_memory making the tests on widows crash
2021-09-06 14:38:10 +02:00
Kerollmops
64462c842b
Test the search with sort time queries with POST and GET methods 2021-08-25 17:39:25 +02:00
Kerollmops
ea4c831de0
Integrate the sortable-attributes into the settings 2021-08-25 17:39:25 +02:00
Kerollmops
51387b2c80
Introduce the new invalid sortable error codes 2021-08-25 17:29:30 +02:00
mpostma
41e271974a add tests 2021-07-06 16:21:15 +02:00
mpostma
520d37983c implement index search methods 2021-07-06 11:54:09 +02:00
mpostma
2f3a439566 fix tests 2021-07-05 16:31:52 +02:00
mpostma
bc85d30076
add test 2021-07-05 12:33:28 +02:00
Tamo
2830853665
accept any content type as json 2021-06-30 17:05:59 +02:00
Tamo
1dc99ea451
accept no content-type as json 2021-06-29 11:59:25 +02:00
marin postma
79fc3bb84e
fmt 2021-06-24 16:36:22 +02:00
marin postma
8e4928c7ea
fix tests 2021-06-24 16:36:22 +02:00
Tamo
36f32f58d4
add the log_level variable to the cli and reduce the log level of milli and grenad 2021-06-24 11:20:52 +02:00
marin postma
b9b4feada8
add tests 2021-06-23 16:21:32 +02:00
bors[bot]
db7215eaa9
Merge #213
213: Implement all the CLI options r=MarinPostma a=irevoire

closes #206 
And I looked into #204, I fixed some default values and tried to test as many options as possible, and I think the cli is already mostly working.
If someone knows any issues about it, I would like to hear more 🙂 

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-22 15:04:05 +00:00
Clémentine Urquizar
2e3d85c31a
Update milli version to v0.5.0 2021-06-22 15:57:46 +02:00
marin postma
905ace3e13
fix test 2021-06-22 11:10:57 +02:00
Tamo
1cf9f43dfe
fix the tests 2021-06-21 16:34:49 +02:00
marin postma
fa573dabf0
fmt 2021-06-21 12:11:09 +02:00
marin postma
abdf642d68
integrate milli errors 2021-06-21 12:11:08 +02:00
marin postma
0dfd1b74c8
fix tests 2021-06-21 12:11:08 +02:00
marin postma
02277ec2cf
reintroduce anyhow 2021-06-21 12:11:06 +02:00
Clémentine Urquizar
9e8888b603
Fix clippy errors 2021-06-17 18:50:18 +02:00
bors[bot]
2062b10b79
Merge #209
209: Integrate amplitude r=MarinPostma a=irevoire

And merge the sentry and amplitude usage under one “Enable analytics” flag

closes #180


Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Irevoire <tamo@meilisearch.com>
2021-06-16 15:25:31 +00:00
Tamo
4e2568fd6e
disable amplitude on debug build 2021-06-16 17:12:49 +02:00
Tamo
def1596eaf
Integrate amplitude
And merge the sentry and amplitude usage under one “Enable analytics”
flag
2021-06-15 15:36:30 +02:00
marin postma
a780cff8fd
fix clippy warning 2021-06-14 14:53:47 +02:00
Tamo
18d4d6097a
implements the synonyms in transplant 2021-06-14 14:47:51 +02:00
bors[bot]
b119bb4ab0
Merge #197
197: Update milli (v0.3.1) with filterable attributes r=MarinPostma a=curquiza

Fixes #187 and #70
Also fixes #195 

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-14 12:19:42 +00:00
Clémentine Urquizar
88bf867a3e
Rename attributes for faceting into filterable attributes 2021-06-14 13:20:43 +02:00
Clémentine Urquizar
7009906d55
Update reset-all-settings test 2021-06-14 13:20:43 +02:00
Clémentine Urquizar
ca1bb7dc1c
Fix tests 2021-06-14 13:20:43 +02:00
Marin Postma
11c81ab4cb
fix tests 2021-06-14 11:17:49 +02:00
mpostma
592fcbc71f fix stats test 2021-06-10 16:03:48 +02:00
mpostma
2d19b78dd8 fix stats test 2021-06-10 16:03:48 +02:00
Irevoire
99551fc21b fix encoding bug 2021-06-10 16:03:48 +02:00
Tamo
2d7785ae0c
remove the dump_batch_size option from the CLI 2021-06-01 20:42:06 +02:00
Marin Postma
1c4f0b2ccf
clippy, fmt & tests 2021-05-31 16:03:39 +02:00
tamo
4cbf866821
merge with main 2021-05-12 18:12:37 +02:00
Marin Postma
1b671d4302
fix-snapshot 2021-05-11 13:57:18 +02:00
tamo
d767990424
fix the import of the updates in the dump 2021-05-10 20:25:12 +02:00
tamo
24192fc550
fix tests 2021-05-10 20:25:12 +02:00
tamo
0f94ef8abc
WIP: dump 2021-05-10 20:24:18 +02:00
tamo
e389c088eb
WIP: rebasing on master 2021-05-10 20:20:57 +02:00
Marin Postma
928fb34eff
bump milli and fix tests 2021-05-04 15:10:22 +02:00
Marin Postma
4fe2a13c71
rewrite update store 2021-04-27 15:20:52 +02:00
Marin Postma
33830d5ecf
fix snapshots 2021-04-27 15:09:55 +02:00
Clémentine Urquizar
f80ea24d2b
Add tests on every platform and fix clippy errors 2021-04-27 12:42:59 +02:00
Marin Postma
f8c338e3a7
add test for dedicated distinct route 2021-04-20 15:49:17 +02:00
Marin Postma
ec63e13896
bump actix 2021-04-20 11:29:32 +02:00
Marin Postma
1746132c7d
add test set/reset distinct attribute 2021-04-20 11:29:08 +02:00
Clémentine Urquizar
8eceba98d3
Handle star in attributes_to_retrieve 2021-04-19 18:20:19 +02:00
Alexey Shekhirin
f87afbc558
fix(http): commit date & SHA in startup message 2021-04-13 20:16:18 +03:00
Alexey Shekhirin
87412f63ef
feat(http): implement is_indexing for stats 2021-04-09 14:34:42 +03:00
Alexey Shekhirin
09d9a29176
test(http): server & index stats 2021-04-09 14:34:42 +03:00
tamo
dcd60a5b45
add more tests for the stop_words 2021-04-06 18:29:38 +02:00
tamo
b1962c8e02
remove legacy files from meilisearch that have been replaced by a macro in routes/settings/mod.rs 2021-04-06 16:29:04 +02:00
tamo
40ef9a3c6a
push a first implementation of the stop_words 2021-04-06 16:29:04 +02:00
bors[bot]
6cb8052d3d
Merge #104
104: Update all the response format (issue #64) r=MarinPostma a=irevoire

closes #64 

Co-authored-by: Irevoire <tamo@meilisearch.com>
Co-authored-by: tamo <tamo@meilisearch.com>
2021-04-01 14:22:57 +00:00
tamo
73973e2b9e
fix more settings routes 2021-04-01 15:50:45 +02:00
Irevoire
96cffeab1e
update all the response format to be ISO with meilisearch, see #64 2021-04-01 11:43:03 +02:00
Marin Postma
d8af4a7202
ignore snapshot test (#130) 2021-03-31 20:07:52 +02:00
tamo
0f2143e7fd
remove the now useless dead_code flags 2021-03-26 14:15:12 +01:00
mpostma
48507460b2
add snapshot tests 2021-03-25 12:02:10 +01:00
mpostma
4041d9dc48
format code 2021-03-24 12:38:59 +01:00
mpostma
1f16c8d224
integration test snapshot 2021-03-24 12:38:59 +01:00
mpostma
3cc3637e2d
refactor for tests 2021-03-24 12:38:56 +01:00
mpostma
8b99860e85
use write sender for updates 2021-03-18 08:32:05 +01:00
Irevoire
6b4ea7f594
ensure the reset_settings also return a 202 2021-03-17 15:09:13 +01:00
Irevoire
c8b05712fa
return 202 on settings update / reset 2021-03-17 14:44:32 +01:00
tamo
a268d0e283
return a 200 on health check 2021-03-16 17:42:01 +01:00
bors[bot]
764ced8b5c
Merge #88
88: restore name field in index meta r=MarinPostma a=MarinPostma

Makes the IndexMetadata payload iso with legacy meilisearch and closes #67 


Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-03-16 15:50:08 +00:00
bors[bot]
c6dbd81823
Merge #90
90: restore version route r=MarinPostma a=MarinPostma

close #74


Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-03-16 13:53:23 +00:00
mpostma
6a742ee62c
restore version route 2021-03-15 19:11:27 +01:00
mpostma
58fab035bb
delete index returns 204 instead of 200 2021-03-15 18:44:33 +01:00
mpostma
07bb1e2c4e
fix tests 2021-03-15 18:38:13 +01:00
mpostma
dd324807f9
last review edits + fmt 2021-03-15 18:11:10 +01:00
mpostma
abbea59732
fix clippy warnings 2021-03-15 16:52:05 +01:00
mpostma
55fadd7f87
change facetedAttributes to attributesForFaceting 2021-03-15 13:53:50 +01:00
mpostma
77c0a0fba5
add test get document displayed attributes 2021-03-15 10:36:12 +01:00
mpostma
99c89cf2ba
use options max db sizes 2021-03-13 10:09:10 +01:00
mpostma
2ee2e6a9b2
clean project 2021-03-12 14:57:24 +01:00
mpostma
c4846dafca
implement update index 2021-03-12 14:48:43 +01:00
mpostma
e4d45b0500
fix various bugs 2021-03-12 00:37:43 +01:00
mpostma
271c8ba991
change index name to uid 2021-03-11 22:47:29 +01:00
mpostma
40b3451a4e
fix unexisting update store + race conditions 2021-03-11 22:11:58 +01:00
mpostma
1fad72e019
fix test bug with tempdir 2021-03-11 17:59:47 +01:00
mpostma
53cf500e36
uuid resolver hard state 2021-03-10 18:04:20 +01:00
mpostma
a56e8c1a0c
fix tests 2021-03-10 14:47:04 +01:00
mpostma
0cd8869349
update relevant changes from master 2021-03-10 14:43:10 +01:00
mpostma
5ecf514d28
restructure project 2021-03-10 13:46:49 +01:00