mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
Merge #3047
3047: Fix soft deleted bug settings r=curquiza a=Kerollmops This PR fixes https://github.com/meilisearch/meilisearch/issues/3021 and fixes https://github.com/meilisearch/meilisearch/issues/2945 and is released as version 0.29.2. Co-authored-by: Kerollmops <clement@meilisearch.com>
This commit is contained in:
commit
0f0d1dccf0
18
Cargo.lock
generated
18
Cargo.lock
generated
@ -1126,7 +1126,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "filter-parser"
|
||||
version = "0.33.4"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.4#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.5#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
dependencies = [
|
||||
"nom",
|
||||
"nom_locate",
|
||||
@ -1151,7 +1151,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "flatten-serde-json"
|
||||
version = "0.33.4"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.4#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.5#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
@ -1668,7 +1668,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "json-depth-checker"
|
||||
version = "0.33.4"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.4#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.5#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
@ -2009,7 +2009,7 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d"
|
||||
|
||||
[[package]]
|
||||
name = "meilisearch-auth"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
dependencies = [
|
||||
"enum-iterator 0.7.0",
|
||||
"hmac",
|
||||
@ -2026,7 +2026,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "meilisearch-http"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
dependencies = [
|
||||
"actix-cors",
|
||||
"actix-rt",
|
||||
@ -2101,7 +2101,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "meilisearch-lib"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
dependencies = [
|
||||
"actix-rt",
|
||||
"actix-web",
|
||||
@ -2164,7 +2164,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "meilisearch-types"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
dependencies = [
|
||||
"actix-web",
|
||||
"proptest",
|
||||
@ -2200,7 +2200,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "milli"
|
||||
version = "0.33.4"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.4#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
source = "git+https://github.com/meilisearch/milli.git?tag=v0.33.5#4fc6331cb6526c07f3137584564cfe3493fb25bd"
|
||||
dependencies = [
|
||||
"bimap",
|
||||
"bincode",
|
||||
@ -2534,7 +2534,7 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
||||
|
||||
[[package]]
|
||||
name = "permissive-json-pointer"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
dependencies = [
|
||||
"big_s",
|
||||
"serde_json",
|
||||
|
@ -1,13 +1,13 @@
|
||||
[package]
|
||||
name = "meilisearch-auth"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
enum-iterator = "0.7.0"
|
||||
hmac = "0.12.1"
|
||||
meilisearch-types = { path = "../meilisearch-types" }
|
||||
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.33.4" }
|
||||
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.33.5" }
|
||||
rand = "0.8.4"
|
||||
serde = { version = "1.0.136", features = ["derive"] }
|
||||
serde_json = { version = "1.0.85", features = ["preserve_order"] }
|
||||
|
@ -4,7 +4,7 @@ description = "Meilisearch HTTP server"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
name = "meilisearch-http"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
|
||||
[[bin]]
|
||||
name = "meilisearch"
|
||||
|
@ -99,7 +99,7 @@ async fn error_access_expired_key() {
|
||||
assert!(response["key"].is_string());
|
||||
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
// wait until the key is expired.
|
||||
thread::sleep(time::Duration::new(1, 0));
|
||||
@ -135,7 +135,7 @@ async fn error_access_unauthorized_index() {
|
||||
assert!(response["key"].is_string());
|
||||
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
for (method, route) in AUTHORIZATIONS
|
||||
.keys()
|
||||
@ -175,7 +175,7 @@ async fn error_access_unauthorized_action() {
|
||||
assert!(response["key"].is_string());
|
||||
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
let (response, code) = server.dummy_request(method, route).await;
|
||||
|
||||
assert_eq!(
|
||||
@ -230,7 +230,7 @@ async fn access_authorized_restricted_index() {
|
||||
assert!(response["key"].is_string());
|
||||
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.dummy_request(method, route).await;
|
||||
|
||||
@ -268,7 +268,7 @@ async fn access_authorized_no_index_restriction() {
|
||||
assert!(response["key"].is_string());
|
||||
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.dummy_request(method, route).await;
|
||||
|
||||
@ -313,7 +313,7 @@ async fn access_authorized_stats_restricted_index() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.stats().await;
|
||||
assert_eq!(200, code, "{:?}", &response);
|
||||
@ -353,7 +353,7 @@ async fn access_authorized_stats_no_index_restriction() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.stats().await;
|
||||
assert_eq!(200, code, "{:?}", &response);
|
||||
@ -393,7 +393,7 @@ async fn list_authorized_indexes_restricted_index() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.list_indexes(None, None).await;
|
||||
assert_eq!(200, code, "{:?}", &response);
|
||||
@ -434,7 +434,7 @@ async fn list_authorized_indexes_no_index_restriction() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.list_indexes(None, None).await;
|
||||
assert_eq!(200, code, "{:?}", &response);
|
||||
@ -474,7 +474,7 @@ async fn list_authorized_tasks_restricted_index() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.service.get("/tasks").await;
|
||||
assert_eq!(200, code, "{:?}", &response);
|
||||
@ -514,7 +514,7 @@ async fn list_authorized_tasks_no_index_restriction() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let (response, code) = server.service.get("/tasks").await;
|
||||
assert_eq!(200, code, "{:?}", &response);
|
||||
@ -545,7 +545,7 @@ async fn error_creating_index_without_action() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
let expected_error = json!({
|
||||
"message": "Index `test` not found.",
|
||||
@ -625,7 +625,7 @@ async fn lazy_create_index() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
// try to create a index via add documents route
|
||||
let index = server.index("test");
|
||||
@ -692,7 +692,7 @@ async fn error_creating_index_without_index() {
|
||||
|
||||
// use created key.
|
||||
let key = response["key"].as_str().unwrap();
|
||||
server.use_api_key(&key);
|
||||
server.use_api_key(key);
|
||||
|
||||
// try to create a index via add documents route
|
||||
let index = server.index("test");
|
||||
|
@ -473,7 +473,7 @@ async fn error_access_forbidden_routes() {
|
||||
"searchRules" => json!(["*"]),
|
||||
"exp" => json!((OffsetDateTime::now_utc() + Duration::hours(1)).unix_timestamp())
|
||||
};
|
||||
let web_token = generate_tenant_token(&uid, &key, tenant_token);
|
||||
let web_token = generate_tenant_token(uid, key, tenant_token);
|
||||
server.use_api_key(&web_token);
|
||||
|
||||
for ((method, route), actions) in AUTHORIZATIONS.iter() {
|
||||
@ -509,7 +509,7 @@ async fn error_access_expired_parent_key() {
|
||||
"searchRules" => json!(["*"]),
|
||||
"exp" => json!((OffsetDateTime::now_utc() + Duration::hours(1)).unix_timestamp())
|
||||
};
|
||||
let web_token = generate_tenant_token(&uid, &key, tenant_token);
|
||||
let web_token = generate_tenant_token(uid, key, tenant_token);
|
||||
server.use_api_key(&web_token);
|
||||
|
||||
// test search request while parent_key is not expired
|
||||
@ -552,7 +552,7 @@ async fn error_access_modified_token() {
|
||||
"searchRules" => json!(["products"]),
|
||||
"exp" => json!((OffsetDateTime::now_utc() + Duration::hours(1)).unix_timestamp())
|
||||
};
|
||||
let web_token = generate_tenant_token(&uid, &key, tenant_token);
|
||||
let web_token = generate_tenant_token(uid, key, tenant_token);
|
||||
server.use_api_key(&web_token);
|
||||
|
||||
// test search request while web_token is valid
|
||||
@ -567,7 +567,7 @@ async fn error_access_modified_token() {
|
||||
"exp" => json!((OffsetDateTime::now_utc() + Duration::hours(1)).unix_timestamp())
|
||||
};
|
||||
|
||||
let alt = generate_tenant_token(&uid, &key, tenant_token);
|
||||
let alt = generate_tenant_token(uid, key, tenant_token);
|
||||
let altered_token = [
|
||||
web_token.split('.').next().unwrap(),
|
||||
alt.split('.').nth(1).unwrap(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "meilisearch-lib"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
@ -28,7 +28,7 @@ lazy_static = "1.4.0"
|
||||
log = "0.4.14"
|
||||
meilisearch-auth = { path = "../meilisearch-auth" }
|
||||
meilisearch-types = { path = "../meilisearch-types" }
|
||||
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.33.4" }
|
||||
milli = { git = "https://github.com/meilisearch/milli.git", tag = "v0.33.5" }
|
||||
mime = "0.3.16"
|
||||
num_cpus = "1.13.1"
|
||||
obkv = "0.2.0"
|
||||
|
@ -213,7 +213,7 @@ impl TaskQueue {
|
||||
let head = self.queue.pop()?;
|
||||
let result = {
|
||||
let mut ref_head = head.borrow_mut();
|
||||
f(&mut *ref_head)
|
||||
f(&mut ref_head)
|
||||
};
|
||||
if !head.borrow().tasks.is_empty() {
|
||||
// After being mutated, the head is reinserted to the correct position.
|
||||
|
@ -117,7 +117,7 @@ impl TaskStore {
|
||||
match filter {
|
||||
Some(filter) => filter
|
||||
.pass(&task)
|
||||
.then(|| task)
|
||||
.then_some(task)
|
||||
.ok_or(TaskError::UnexistingTask(id)),
|
||||
None => Ok(task),
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "meilisearch-types"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
authors = ["marin <postma.marin@protonmail.com>"]
|
||||
edition = "2021"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "permissive-json-pointer"
|
||||
version = "0.29.1"
|
||||
version = "0.29.2"
|
||||
edition = "2021"
|
||||
description = "A permissive json pointer"
|
||||
readme = "README.md"
|
||||
|
Loading…
Reference in New Issue
Block a user