diff --git a/.github/workflows/sdks-tests.yml b/.github/workflows/sdks-tests.yml index 62e31a4ae..6cf08c086 100644 --- a/.github/workflows/sdks-tests.yml +++ b/.github/workflows/sdks-tests.yml @@ -133,7 +133,7 @@ jobs: with: repository: meilisearch/meilisearch-java - name: Set up Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: 8 distribution: 'zulu' diff --git a/Cargo.lock b/Cargo.lock index 1fd09697f..d91b445c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -580,7 +580,7 @@ source = "git+https://github.com/meilisearch/bbqueue#cbb87cc707b5af415ef203bdaf2 [[package]] name = "benchmarks" -version = "1.19.0" +version = "1.19.1" dependencies = [ "anyhow", "bumpalo", @@ -790,7 +790,7 @@ dependencies = [ [[package]] name = "build-info" -version = "1.19.0" +version = "1.19.1" dependencies = [ "anyhow", "time", @@ -1784,7 +1784,7 @@ dependencies = [ [[package]] name = "dump" -version = "1.19.0" +version = "1.19.1" dependencies = [ "anyhow", "big_s", @@ -2016,7 +2016,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "file-store" -version = "1.19.0" +version = "1.19.1" dependencies = [ "tempfile", "thiserror 2.0.14", @@ -2038,7 +2038,7 @@ dependencies = [ [[package]] name = "filter-parser" -version = "1.19.0" +version = "1.19.1" dependencies = [ "insta", "levenshtein_automata", @@ -2060,7 +2060,7 @@ dependencies = [ [[package]] name = "flatten-serde-json" -version = "1.19.0" +version = "1.19.1" dependencies = [ "criterion", "serde_json", @@ -2205,7 +2205,7 @@ dependencies = [ [[package]] name = "fuzzers" -version = "1.19.0" +version = "1.19.1" dependencies = [ "arbitrary", "bumpalo", @@ -3028,7 +3028,7 @@ dependencies = [ [[package]] name = "index-scheduler" -version = "1.19.0" +version = "1.19.1" dependencies = [ "anyhow", "backoff", @@ -3275,7 +3275,7 @@ dependencies = [ [[package]] name = "json-depth-checker" -version = "1.19.0" +version = "1.19.1" dependencies = [ "criterion", "serde_json", @@ -3775,7 +3775,7 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "meili-snap" -version = "1.19.0" +version = "1.19.1" dependencies = [ "insta", "md5", @@ -3786,7 +3786,7 @@ dependencies = [ [[package]] name = "meilisearch" -version = "1.19.0" +version = "1.19.1" dependencies = [ "actix-cors", "actix-http", @@ -3883,7 +3883,7 @@ dependencies = [ [[package]] name = "meilisearch-auth" -version = "1.19.0" +version = "1.19.1" dependencies = [ "base64 0.22.1", "enum-iterator", @@ -3902,7 +3902,7 @@ dependencies = [ [[package]] name = "meilisearch-types" -version = "1.19.0" +version = "1.19.1" dependencies = [ "actix-web", "anyhow", @@ -3937,7 +3937,7 @@ dependencies = [ [[package]] name = "meilitool" -version = "1.19.0" +version = "1.19.1" dependencies = [ "anyhow", "clap", @@ -3971,7 +3971,7 @@ dependencies = [ [[package]] name = "milli" -version = "1.19.0" +version = "1.19.1" dependencies = [ "allocator-api2 0.3.0", "arroy", @@ -4187,12 +4187,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -4450,12 +4449,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "4.2.2" @@ -4554,7 +4547,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "permissive-json-pointer" -version = "1.19.0" +version = "1.19.1" dependencies = [ "big_s", "serde_json", @@ -6557,9 +6550,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "nu-ansi-term", "serde", @@ -7515,7 +7508,7 @@ dependencies = [ [[package]] name = "xtask" -version = "1.19.0" +version = "1.19.1" dependencies = [ "anyhow", "build-info", diff --git a/Cargo.toml b/Cargo.toml index 836e08dcb..e4efedab9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ members = [ ] [workspace.package] -version = "1.19.0" +version = "1.19.1" authors = [ "Quentin de Quelen ", "Clément Renault ", diff --git a/LICENSE.md b/LICENSE similarity index 96% rename from LICENSE.md rename to LICENSE index 17fda2f28..c6ed62f37 100644 --- a/LICENSE.md +++ b/LICENSE @@ -26,4 +26,4 @@ SOFTWARE. Certain parts of this codebase are not licensed under the MIT license and governed by the Business Source License 1.1. -See the LICENSE-EE.md file for details. +See the LICENSE-EE file for details. diff --git a/LICENSE-EE.md b/LICENSE-EE similarity index 100% rename from LICENSE-EE.md rename to LICENSE-EE diff --git a/README.md b/README.md index 598341891..aa371d650 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@

Dependency status - License + License Merge Queues enabled

@@ -95,7 +95,7 @@ Meilisearch is available in two editions: ### 🧪 Community Edition (CE) -- Fully open source under the [MIT license](./LICENSE.md) +- Fully open source under the [MIT license](./LICENSE) - Core search engine with fast and relevant full-text, semantic or hybrid search - Free to use for anyone, including commercial usage @@ -103,7 +103,7 @@ Meilisearch is available in two editions: - Includes advanced features such as: - Sharding -- Governed by a [commercial license](./LICENSE-EE.md) or the [Business Source License 1.1](https://mariadb.com/bsl11) +- Governed by a [commercial license](./LICENSE-EE) or the [Business Source License 1.1](https://mariadb.com/bsl11) - Not allowed in production without a commercial agreement with Meilisearch. - You may use, modify, and distribute the Licensed Work for non-production purposes only, such as testing, development, or evaluation. diff --git a/crates/index-scheduler/src/queue/batches.rs b/crates/index-scheduler/src/queue/batches.rs index b96f65836..2045258df 100644 --- a/crates/index-scheduler/src/queue/batches.rs +++ b/crates/index-scheduler/src/queue/batches.rs @@ -284,6 +284,14 @@ impl BatchQueue { if Some(batch_id) == processing.batch.as_ref().map(|batch| batch.uid) { let mut batch = processing.batch.as_ref().unwrap().to_batch(); batch.progress = processing.get_progress_view(); + // Add progress_trace from the current progress state + if let Some(progress) = &processing.progress { + batch.stats.progress_trace = progress + .accumulated_durations() + .into_iter() + .map(|(k, v)| (k, v.into())) + .collect(); + } Ok(batch) } else { self.get_batch(rtxn, batch_id) diff --git a/crates/index-scheduler/src/queue/batches_test.rs b/crates/index-scheduler/src/queue/batches_test.rs index 49dc0ba61..ca48a7022 100644 --- a/crates/index-scheduler/src/queue/batches_test.rs +++ b/crates/index-scheduler/src/queue/batches_test.rs @@ -104,6 +104,15 @@ fn query_batches_simple() { batches[0].started_at = OffsetDateTime::UNIX_EPOCH; assert!(batches[0].enqueued_at.is_some()); batches[0].enqueued_at = None; + + if !batches[0].stats.progress_trace.is_empty() { + batches[0].stats.progress_trace.clear(); + batches[0] + .stats + .progress_trace + .insert("processing tasks".to_string(), "deterministic_duration".into()); + } + // Insta cannot snapshot our batches because the batch stats contains an enum as key: https://github.com/mitsuhiko/insta/issues/689 let batch = serde_json::to_string_pretty(&batches[0]).unwrap(); snapshot!(batch, @r###" @@ -122,6 +131,9 @@ fn query_batches_simple() { }, "indexUids": { "catto": 1 + }, + "progressTrace": { + "processing tasks": "deterministic_duration" } }, "startedAt": "1970-01-01T00:00:00Z", diff --git a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/after_processing_everything.snap b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/after_processing_everything.snap index 90fb618f1..14e45cf88 100644 --- a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/after_processing_everything.snap +++ b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/after_processing_everything.snap @@ -6,7 +6,7 @@ source: crates/index-scheduler/src/scheduler/test_failure.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, batch_uid: 0, status: succeeded, details: { from: (1, 12, 0), to: (1, 19, 0) }, kind: UpgradeDatabase { from: (1, 12, 0) }} +0 {uid: 0, batch_uid: 0, status: succeeded, details: { from: (1, 12, 0), to: (1, 19, 1) }, kind: UpgradeDatabase { from: (1, 12, 0) }} 1 {uid: 1, batch_uid: 1, status: succeeded, details: { primary_key: Some("mouse"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} 2 {uid: 2, batch_uid: 2, status: succeeded, details: { primary_key: Some("bone"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "doggo", primary_key: Some("bone") }} 3 {uid: 3, batch_uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggo` already exists.", error_code: "index_already_exists", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_already_exists" }, details: { primary_key: Some("bone"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "doggo", primary_key: Some("bone") }} @@ -57,7 +57,7 @@ girafo: { number_of_documents: 0, field_distribution: {} } [timestamp] [4,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.0"}, stats: {"totalNbTasks":1,"status":{"succeeded":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } +0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.1"}, stats: {"totalNbTasks":1,"status":{"succeeded":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } 1 {uid: 1, details: {"primaryKey":"mouse"}, stats: {"totalNbTasks":1,"status":{"succeeded":1},"types":{"indexCreation":1},"indexUids":{"catto":1}}, stop reason: "created batch containing only task with id 1 of type `indexCreation` that cannot be batched with any other task.", } 2 {uid: 2, details: {"primaryKey":"bone"}, stats: {"totalNbTasks":1,"status":{"succeeded":1},"types":{"indexCreation":1},"indexUids":{"doggo":1}}, stop reason: "created batch containing only task with id 2 of type `indexCreation` that cannot be batched with any other task.", } 3 {uid: 3, details: {"primaryKey":"bone"}, stats: {"totalNbTasks":1,"status":{"failed":1},"types":{"indexCreation":1},"indexUids":{"doggo":1}}, stop reason: "created batch containing only task with id 3 of type `indexCreation` that cannot be batched with any other task.", } diff --git a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/register_automatic_upgrade_task.snap b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/register_automatic_upgrade_task.snap index 9a3edc8ed..8c60cc61d 100644 --- a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/register_automatic_upgrade_task.snap +++ b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/register_automatic_upgrade_task.snap @@ -6,7 +6,7 @@ source: crates/index-scheduler/src/scheduler/test_failure.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: enqueued, details: { from: (1, 12, 0), to: (1, 19, 0) }, kind: UpgradeDatabase { from: (1, 12, 0) }} +0 {uid: 0, status: enqueued, details: { from: (1, 12, 0), to: (1, 19, 1) }, kind: UpgradeDatabase { from: (1, 12, 0) }} ---------------------------------------------------------------------- ### Status: enqueued [0,] diff --git a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/registered_a_task_while_the_upgrade_task_is_enqueued.snap b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/registered_a_task_while_the_upgrade_task_is_enqueued.snap index fdaecb1b8..6fe7efecc 100644 --- a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/registered_a_task_while_the_upgrade_task_is_enqueued.snap +++ b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/registered_a_task_while_the_upgrade_task_is_enqueued.snap @@ -6,7 +6,7 @@ source: crates/index-scheduler/src/scheduler/test_failure.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: enqueued, details: { from: (1, 12, 0), to: (1, 19, 0) }, kind: UpgradeDatabase { from: (1, 12, 0) }} +0 {uid: 0, status: enqueued, details: { from: (1, 12, 0), to: (1, 19, 1) }, kind: UpgradeDatabase { from: (1, 12, 0) }} 1 {uid: 1, status: enqueued, details: { primary_key: Some("mouse"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} ---------------------------------------------------------------------- ### Status: diff --git a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed.snap b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed.snap index fc28df258..2f134fd0b 100644 --- a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed.snap +++ b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed.snap @@ -6,7 +6,7 @@ source: crates/index-scheduler/src/scheduler/test_failure.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, batch_uid: 0, status: failed, error: ResponseError { code: 200, message: "Planned failure for tests.", error_code: "internal", error_type: "internal", error_link: "https://docs.meilisearch.com/errors#internal" }, details: { from: (1, 12, 0), to: (1, 19, 0) }, kind: UpgradeDatabase { from: (1, 12, 0) }} +0 {uid: 0, batch_uid: 0, status: failed, error: ResponseError { code: 200, message: "Planned failure for tests.", error_code: "internal", error_type: "internal", error_link: "https://docs.meilisearch.com/errors#internal" }, details: { from: (1, 12, 0), to: (1, 19, 1) }, kind: UpgradeDatabase { from: (1, 12, 0) }} 1 {uid: 1, status: enqueued, details: { primary_key: Some("mouse"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} ---------------------------------------------------------------------- ### Status: @@ -37,7 +37,7 @@ catto [1,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.0"}, stats: {"totalNbTasks":1,"status":{"failed":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } +0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.1"}, stats: {"totalNbTasks":1,"status":{"failed":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed_again.snap b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed_again.snap index d09780553..644496d37 100644 --- a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed_again.snap +++ b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_failed_again.snap @@ -6,7 +6,7 @@ source: crates/index-scheduler/src/scheduler/test_failure.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, batch_uid: 0, status: failed, error: ResponseError { code: 200, message: "Planned failure for tests.", error_code: "internal", error_type: "internal", error_link: "https://docs.meilisearch.com/errors#internal" }, details: { from: (1, 12, 0), to: (1, 19, 0) }, kind: UpgradeDatabase { from: (1, 12, 0) }} +0 {uid: 0, batch_uid: 0, status: failed, error: ResponseError { code: 200, message: "Planned failure for tests.", error_code: "internal", error_type: "internal", error_link: "https://docs.meilisearch.com/errors#internal" }, details: { from: (1, 12, 0), to: (1, 19, 1) }, kind: UpgradeDatabase { from: (1, 12, 0) }} 1 {uid: 1, status: enqueued, details: { primary_key: Some("mouse"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} 2 {uid: 2, status: enqueued, details: { primary_key: Some("bone"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "doggo", primary_key: Some("bone") }} ---------------------------------------------------------------------- @@ -40,7 +40,7 @@ doggo [2,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.0"}, stats: {"totalNbTasks":1,"status":{"failed":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } +0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.1"}, stats: {"totalNbTasks":1,"status":{"failed":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_succeeded.snap b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_succeeded.snap index aa687425e..f9d50472a 100644 --- a/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_succeeded.snap +++ b/crates/index-scheduler/src/scheduler/snapshots/test_failure.rs/upgrade_failure/upgrade_task_succeeded.snap @@ -6,7 +6,7 @@ source: crates/index-scheduler/src/scheduler/test_failure.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, batch_uid: 0, status: succeeded, details: { from: (1, 12, 0), to: (1, 19, 0) }, kind: UpgradeDatabase { from: (1, 12, 0) }} +0 {uid: 0, batch_uid: 0, status: succeeded, details: { from: (1, 12, 0), to: (1, 19, 1) }, kind: UpgradeDatabase { from: (1, 12, 0) }} 1 {uid: 1, status: enqueued, details: { primary_key: Some("mouse"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "catto", primary_key: Some("mouse") }} 2 {uid: 2, status: enqueued, details: { primary_key: Some("bone"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "doggo", primary_key: Some("bone") }} 3 {uid: 3, status: enqueued, details: { primary_key: Some("bone"), old_new_uid: None, new_index_uid: None }, kind: IndexCreation { index_uid: "doggo", primary_key: Some("bone") }} @@ -43,7 +43,7 @@ doggo [2,3,] [timestamp] [0,] ---------------------------------------------------------------------- ### All Batches: -0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.0"}, stats: {"totalNbTasks":1,"status":{"succeeded":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } +0 {uid: 0, details: {"upgradeFrom":"v1.12.0","upgradeTo":"v1.19.1"}, stats: {"totalNbTasks":1,"status":{"succeeded":1},"types":{"upgradeDatabase":1},"indexUids":{}}, stop reason: "stopped after the last task of type `upgradeDatabase` because they cannot be batched with tasks of any other type.", } ---------------------------------------------------------------------- ### Batch to tasks mapping: 0 [0,] diff --git a/crates/meilisearch-types/src/enterprise_edition/mod.rs b/crates/meilisearch-types/src/enterprise_edition/mod.rs index a8ab640cb..47047de48 100644 --- a/crates/meilisearch-types/src/enterprise_edition/mod.rs +++ b/crates/meilisearch-types/src/enterprise_edition/mod.rs @@ -1,6 +1,6 @@ // Copyright © 2025 Meilisearch Some Rights Reserved // This file is part of Meilisearch Enterprise Edition (EE). // Use of this source code is governed by the Business Source License 1.1, -// as found in the LICENSE-EE.md file or at +// as found in the LICENSE-EE file or at pub mod network; diff --git a/crates/meilisearch-types/src/enterprise_edition/network.rs b/crates/meilisearch-types/src/enterprise_edition/network.rs index 37b74e574..9d5c51e25 100644 --- a/crates/meilisearch-types/src/enterprise_edition/network.rs +++ b/crates/meilisearch-types/src/enterprise_edition/network.rs @@ -1,7 +1,7 @@ // Copyright © 2025 Meilisearch Some Rights Reserved // This file is part of Meilisearch Enterprise Edition (EE). // Use of this source code is governed by the Business Source License 1.1, -// as found in the LICENSE-EE.md file or at +// as found in the LICENSE-EE file or at use std::collections::BTreeMap; diff --git a/crates/meilisearch/Cargo.toml b/crates/meilisearch/Cargo.toml index c110830c4..14a9c7aeb 100644 --- a/crates/meilisearch/Cargo.toml +++ b/crates/meilisearch/Cargo.toml @@ -96,7 +96,7 @@ serde_urlencoded = "0.7.1" termcolor = "1.4.1" url = { version = "2.5.4", features = ["serde"] } tracing = "0.1.41" -tracing-subscriber = { version = "0.3.19", features = ["json"] } +tracing-subscriber = { version = "0.3.20", features = ["json"] } tracing-trace = { version = "0.1.0", path = "../tracing-trace" } tracing-actix-web = "0.7.18" build-info = { version = "1.7.0", path = "../build-info" } diff --git a/crates/meilisearch/src/routes/indexes/enterprise_edition/mod.rs b/crates/meilisearch/src/routes/indexes/enterprise_edition/mod.rs index 7fe2e093c..a3ca7350c 100644 --- a/crates/meilisearch/src/routes/indexes/enterprise_edition/mod.rs +++ b/crates/meilisearch/src/routes/indexes/enterprise_edition/mod.rs @@ -1,6 +1,6 @@ // Copyright © 2025 Meilisearch Some Rights Reserved // This file is part of Meilisearch Enterprise Edition (EE). // Use of this source code is governed by the Business Source License 1.1, -// as found in the LICENSE-EE.md file or at +// as found in the LICENSE-EE file or at pub mod proxy; diff --git a/crates/meilisearch/src/routes/indexes/enterprise_edition/proxy.rs b/crates/meilisearch/src/routes/indexes/enterprise_edition/proxy.rs index 257ec85ef..7cb3eb8cc 100644 --- a/crates/meilisearch/src/routes/indexes/enterprise_edition/proxy.rs +++ b/crates/meilisearch/src/routes/indexes/enterprise_edition/proxy.rs @@ -1,7 +1,7 @@ // Copyright © 2025 Meilisearch Some Rights Reserved // This file is part of Meilisearch Enterprise Edition (EE). // Use of this source code is governed by the Business Source License 1.1, -// as found in the LICENSE-EE.md file or at +// as found in the LICENSE-EE file or at use std::collections::BTreeMap; use std::fs::File; diff --git a/crates/meilisearch/src/routes/metrics.rs b/crates/meilisearch/src/routes/metrics.rs index 31abb93a7..1efd6d367 100644 --- a/crates/meilisearch/src/routes/metrics.rs +++ b/crates/meilisearch/src/routes/metrics.rs @@ -1,4 +1,3 @@ -use actix_web::http::header; use actix_web::web::{self, Data}; use actix_web::HttpResponse; use index_scheduler::{IndexScheduler, Query}; @@ -181,5 +180,12 @@ pub async fn get_metrics( let response = String::from_utf8(buffer).expect("Failed to convert bytes to string"); - Ok(HttpResponse::Ok().insert_header(header::ContentType(mime::TEXT_PLAIN)).body(response)) + // We cannot specify the version with ContentType(TEXT_PLAIN_UTF_8) so we have to write everything by hand :( + // see the following for what should be returned: https://prometheus.io/docs/instrumenting/content_negotiation/#content-type-response + let content_type = ("content-type", "text/plain; version=0.0.4; charset=utf-8"); + + Ok(HttpResponse::Ok() + // .insert_header(header::ContentType(mime::TEXT_PLAIN_UTF_8)) + .insert_header(content_type) + .body(response)) } diff --git a/crates/meilisearch/tests/upgrade/mod.rs b/crates/meilisearch/tests/upgrade/mod.rs index e259b7c42..274a4b5ab 100644 --- a/crates/meilisearch/tests/upgrade/mod.rs +++ b/crates/meilisearch/tests/upgrade/mod.rs @@ -43,7 +43,7 @@ async fn version_too_old() { std::fs::write(db_path.join("VERSION"), "1.11.9999").unwrap(); let options = Opt { experimental_dumpless_upgrade: true, ..default_settings }; let err = Server::new_with_options(options).await.map(|_| ()).unwrap_err(); - snapshot!(err, @"Database version 1.11.9999 is too old for the experimental dumpless upgrade feature. Please generate a dump using the v1.11.9999 and import it in the v1.19.0"); + snapshot!(err, @"Database version 1.11.9999 is too old for the experimental dumpless upgrade feature. Please generate a dump using the v1.11.9999 and import it in the v1.19.1"); } #[actix_rt::test] @@ -58,7 +58,7 @@ async fn version_requires_downgrade() { std::fs::write(db_path.join("VERSION"), format!("{major}.{minor}.{patch}")).unwrap(); let options = Opt { experimental_dumpless_upgrade: true, ..default_settings }; let err = Server::new_with_options(options).await.map(|_| ()).unwrap_err(); - snapshot!(err, @"Database version 1.19.1 is higher than the Meilisearch version 1.19.0. Downgrade is not supported"); + snapshot!(err, @"Database version 1.19.2 is higher than the Meilisearch version 1.19.1. Downgrade is not supported"); } #[actix_rt::test] diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap index 8ca0ef6ac..bc015ef08 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap @@ -8,7 +8,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "progress": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "stats": { "totalNbTasks": 1, diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap index 8ca0ef6ac..bc015ef08 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap @@ -8,7 +8,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "progress": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "stats": { "totalNbTasks": 1, diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap index 8ca0ef6ac..bc015ef08 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/batches_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap @@ -8,7 +8,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "progress": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "stats": { "totalNbTasks": 1, diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap index ffeabf4ca..2e0b7b99d 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterEnqueuedAt_equal_2025-01-16T16_47_41.snap @@ -12,7 +12,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "canceledBy": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "error": null, "duration": "[duration]", diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap index ffeabf4ca..2e0b7b99d 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterFinishedAt_equal_2025-01-16T16_47_41.snap @@ -12,7 +12,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "canceledBy": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "error": null, "duration": "[duration]", diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap index ffeabf4ca..2e0b7b99d 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/tasks_filter_afterStartedAt_equal_2025-01-16T16_47_41.snap @@ -12,7 +12,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "canceledBy": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "error": null, "duration": "[duration]", diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_batch_queue_once_everything_has_been_processed.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_batch_queue_once_everything_has_been_processed.snap index 5267a2edd..8ba86ac03 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_batch_queue_once_everything_has_been_processed.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_batch_queue_once_everything_has_been_processed.snap @@ -8,7 +8,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "progress": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "stats": { "totalNbTasks": 1, diff --git a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_task_queue_once_everything_has_been_processed.snap b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_task_queue_once_everything_has_been_processed.snap index 1b482a69e..c09964019 100644 --- a/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_task_queue_once_everything_has_been_processed.snap +++ b/crates/meilisearch/tests/upgrade/v1_12/snapshots/v1_12_0.rs/check_the_index_scheduler/the_whole_task_queue_once_everything_has_been_processed.snap @@ -12,7 +12,7 @@ source: crates/meilisearch/tests/upgrade/v1_12/v1_12_0.rs "canceledBy": null, "details": { "upgradeFrom": "v1.12.0", - "upgradeTo": "v1.19.0" + "upgradeTo": "v1.19.1" }, "error": null, "duration": "[duration]", diff --git a/crates/meilisearch/tests/vector/rest.rs b/crates/meilisearch/tests/vector/rest.rs index 7668dbcc3..3b1222795 100644 --- a/crates/meilisearch/tests/vector/rest.rs +++ b/crates/meilisearch/tests/vector/rest.rs @@ -2184,6 +2184,7 @@ async fn last_error_stats() { ".progress" => "[ignored]", ".stats.embedderRequests.total" => "[ignored]", ".stats.embedderRequests.failed" => "[ignored]", + ".stats.progressTrace" => "[ignored]", ".startedAt" => "[ignored]" }), @r#" { @@ -2204,6 +2205,7 @@ async fn last_error_stats() { "indexUids": { "doggo": 1 }, + "progressTrace": "[ignored]", "embedderRequests": { "total": "[ignored]", "failed": "[ignored]", diff --git a/crates/milli/src/update/new/indexer/enterprise_edition/mod.rs b/crates/milli/src/update/new/indexer/enterprise_edition/mod.rs index a0a5b0e53..9f89e8e31 100644 --- a/crates/milli/src/update/new/indexer/enterprise_edition/mod.rs +++ b/crates/milli/src/update/new/indexer/enterprise_edition/mod.rs @@ -1,6 +1,6 @@ // Copyright © 2025 Meilisearch Some Rights Reserved // This file is part of Meilisearch Enterprise Edition (EE). // Use of this source code is governed by the Business Source License 1.1, -// as found in the LICENSE-EE.md file or at +// as found in the LICENSE-EE file or at pub mod sharding; diff --git a/crates/milli/src/update/new/indexer/enterprise_edition/sharding.rs b/crates/milli/src/update/new/indexer/enterprise_edition/sharding.rs index bb30feff7..c0322f868 100644 --- a/crates/milli/src/update/new/indexer/enterprise_edition/sharding.rs +++ b/crates/milli/src/update/new/indexer/enterprise_edition/sharding.rs @@ -1,7 +1,7 @@ // Copyright © 2025 Meilisearch Some Rights Reserved // This file is part of Meilisearch Enterprise Edition (EE). // Use of this source code is governed by the Business Source License 1.1, -// as found in the LICENSE-EE.md file or at +// as found in the LICENSE-EE file or at use std::hash::{BuildHasher as _, BuildHasherDefault}; diff --git a/crates/openapi-generator/Cargo.toml b/crates/openapi-generator/Cargo.toml index 652f6fc57..03a410fe5 100644 --- a/crates/openapi-generator/Cargo.toml +++ b/crates/openapi-generator/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" publish = false [dependencies] -meilisearch = { path = "../meilisearch" } +meilisearch = { path = "../meilisearch" , default-features = false} serde_json = "1.0" clap = { version = "4.5.40", features = ["derive"] } anyhow = "1.0.98" diff --git a/crates/tracing-trace/Cargo.toml b/crates/tracing-trace/Cargo.toml index 866a982a0..fe28febaf 100644 --- a/crates/tracing-trace/Cargo.toml +++ b/crates/tracing-trace/Cargo.toml @@ -12,7 +12,7 @@ serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" tracing = "0.1.41" tracing-error = "0.2.1" -tracing-subscriber = "0.3.19" +tracing-subscriber = "0.3.20" byte-unit = { version = "5.1.6", default-features = false, features = [ "std", "byte", diff --git a/crates/xtask/Cargo.toml b/crates/xtask/Cargo.toml index 5fdf157df..f95984832 100644 --- a/crates/xtask/Cargo.toml +++ b/crates/xtask/Cargo.toml @@ -39,6 +39,6 @@ tokio = { version = "1.45.1", features = [ "signal", ] } tracing = "0.1.41" -tracing-subscriber = "0.3.19" +tracing-subscriber = "0.3.20" tracing-trace = { version = "0.1.0", path = "../tracing-trace" } uuid = { version = "1.17.0", features = ["v7", "serde"] }