From 71bf9b5b9be92a05e493e37d4a615857cf57a690 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Tue, 14 Jun 2022 20:38:45 -0500 Subject: [PATCH 01/41] docs: Readability improvements in `tasks/` Signed-off-by: Ryan Russell --- meilisearch-lib/src/tasks/batch.rs | 2 +- meilisearch-lib/src/tasks/mod.rs | 2 +- meilisearch-lib/src/tasks/scheduler.rs | 2 +- meilisearch-lib/src/tasks/task.rs | 2 +- meilisearch-lib/src/tasks/task_store/mod.rs | 2 +- meilisearch-lib/src/tasks/update_loop.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meilisearch-lib/src/tasks/batch.rs b/meilisearch-lib/src/tasks/batch.rs index 7173ecd33..5fa2e224a 100644 --- a/meilisearch-lib/src/tasks/batch.rs +++ b/meilisearch-lib/src/tasks/batch.rs @@ -38,7 +38,7 @@ impl BatchContent { #[derive(Debug)] pub struct Batch { - // Only batches that contains a persistant tasks are given an id. Snapshot batches don't have + // Only batches that contains a persistent tasks are given an id. Snapshot batches don't have // an id. pub id: Option, pub created_at: OffsetDateTime, diff --git a/meilisearch-lib/src/tasks/mod.rs b/meilisearch-lib/src/tasks/mod.rs index d8bc25bb7..fe722a987 100644 --- a/meilisearch-lib/src/tasks/mod.rs +++ b/meilisearch-lib/src/tasks/mod.rs @@ -33,7 +33,7 @@ pub trait BatchHandler: Sync + Send + 'static { /// `accept` beforehand. async fn process_batch(&self, batch: Batch) -> Batch; - /// `finish` is called when the result of `process` has been commited to the task store. This + /// `finish` is called when the result of `process` has been committed to the task store. This /// method can be used to perform cleanup after the update has been completed for example. async fn finish(&self, batch: &Batch); } diff --git a/meilisearch-lib/src/tasks/scheduler.rs b/meilisearch-lib/src/tasks/scheduler.rs index 8ce14fe8c..9c181b86b 100644 --- a/meilisearch-lib/src/tasks/scheduler.rs +++ b/meilisearch-lib/src/tasks/scheduler.rs @@ -189,7 +189,7 @@ impl TaskQueue { Entry::Occupied(entry) => { // A task list already exists for this index, all we have to to is to push the new // update to the end of the list. This won't change the order since ids are - // monotically increasing. + // monotonically increasing. let mut list = entry.get().borrow_mut(); // We only need the first element to be lower than the one we want to diff --git a/meilisearch-lib/src/tasks/task.rs b/meilisearch-lib/src/tasks/task.rs index bd5579151..42f75834f 100644 --- a/meilisearch-lib/src/tasks/task.rs +++ b/meilisearch-lib/src/tasks/task.rs @@ -78,7 +78,7 @@ impl TaskEvent { /// A task represents an operation that Meilisearch must do. /// It's stored on disk and executed from the lowest to highest Task id. -/// Everytime a new task is created it has a higher Task id than the previous one. +/// Every time a new task is created it has a higher Task id than the previous one. /// See also `Job`. #[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] #[cfg_attr(test, derive(proptest_derive::Arbitrary))] diff --git a/meilisearch-lib/src/tasks/task_store/mod.rs b/meilisearch-lib/src/tasks/task_store/mod.rs index e2b01afb8..96777d628 100644 --- a/meilisearch-lib/src/tasks/task_store/mod.rs +++ b/meilisearch-lib/src/tasks/task_store/mod.rs @@ -122,7 +122,7 @@ impl TaskStore { } /// This methods takes a `Processing` which contains the next task ids to process, and returns - /// the coresponding tasks along with the ownership to the passed processing. + /// the corresponding tasks along with the ownership to the passed processing. /// /// We need get_processing_tasks to take ownership over `Processing` because we need it to be /// valid for 'static. diff --git a/meilisearch-lib/src/tasks/update_loop.rs b/meilisearch-lib/src/tasks/update_loop.rs index 01e88755a..b99eb54b5 100644 --- a/meilisearch-lib/src/tasks/update_loop.rs +++ b/meilisearch-lib/src/tasks/update_loop.rs @@ -49,7 +49,7 @@ impl UpdateLoop { }; if let Err(e) = self.process_next_batch().await { - log::error!("an error occured while processing an update batch: {}", e); + log::error!("an error occurred while processing an update batch: {}", e); } } } From 4016161035a3dbac97ae79c7ed7ce2f240fff63c Mon Sep 17 00:00:00 2001 From: janithPet Date: Wed, 15 Jun 2022 16:10:20 +0100 Subject: [PATCH 02/41] Provide all document related permissions for action document.* --- meilisearch-auth/src/action.rs | 5 +++++ meilisearch-auth/src/store.rs | 5 +++++ meilisearch-http/tests/auth/authorization.rs | 8 ++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index fab5263ec..674ed4824 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -8,6 +8,8 @@ pub enum Action { All = actions::ALL, #[serde(rename = "search")] Search = actions::SEARCH, + #[serde(rename = "documents.*")] + DocumentsAll = actions::DOCUMENTS_ALL, #[serde(rename = "documents.add")] DocumentsAdd = actions::DOCUMENTS_ADD, #[serde(rename = "documents.get")] @@ -50,6 +52,7 @@ impl Action { match repr { ALL => Some(Self::All), SEARCH => Some(Self::Search), + DOCUMENTS_ALL => Some(Self::DocumentsAll), DOCUMENTS_ADD => Some(Self::DocumentsAdd), DOCUMENTS_GET => Some(Self::DocumentsGet), DOCUMENTS_DELETE => Some(Self::DocumentsDelete), @@ -76,6 +79,7 @@ impl Action { match self { Self::All => ALL, Self::Search => SEARCH, + Self::DocumentsAll => DOCUMENTS_ALL, Self::DocumentsAdd => DOCUMENTS_ADD, Self::DocumentsGet => DOCUMENTS_GET, Self::DocumentsDelete => DOCUMENTS_DELETE, @@ -100,6 +104,7 @@ impl Action { pub mod actions { pub(crate) const ALL: u8 = 0; pub const SEARCH: u8 = 1; + pub const DOCUMENTS_ALL: u8 = 20; pub const DOCUMENTS_ADD: u8 = 2; pub const DOCUMENTS_GET: u8 = 3; pub const DOCUMENTS_DELETE: u8 = 4; diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 0355c4579..65de64e56 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -90,6 +90,11 @@ impl HeedAuthStore { let actions = if key.actions.contains(&Action::All) { // if key.actions contains All, we iterate over all actions. Action::into_enum_iter().collect() + } else if key.actions.contains(&Action::DocumentsAll) { + // if key.actions.contains.DocumentsAll add all actions related to documents. + let mut actions = key.actions.clone(); + actions.append(&mut vec![Action::DocumentsAdd, Action::DocumentsGet, Action::DocumentsDelete]); + actions } else { key.actions.clone() }; diff --git a/meilisearch-http/tests/auth/authorization.rs b/meilisearch-http/tests/auth/authorization.rs index e5826a675..e790d1e4a 100644 --- a/meilisearch-http/tests/auth/authorization.rs +++ b/meilisearch-http/tests/auth/authorization.rs @@ -11,10 +11,10 @@ pub static AUTHORIZATIONS: Lazy hashset!{"search", "*"}, ("GET", "/indexes/products/search") => hashset!{"search", "*"}, - ("POST", "/indexes/products/documents") => hashset!{"documents.add", "*"}, - ("GET", "/indexes/products/documents") => hashset!{"documents.get", "*"}, - ("GET", "/indexes/products/documents/0") => hashset!{"documents.get", "*"}, - ("DELETE", "/indexes/products/documents/0") => hashset!{"documents.delete", "*"}, + ("POST", "/indexes/products/documents") => hashset!{"documents.add", "documents.*", "*"}, + ("GET", "/indexes/products/documents") => hashset!{"documents.get", "documents.*", "*"}, + ("GET", "/indexes/products/documents/0") => hashset!{"documents.get", "documents.*", "*"}, + ("DELETE", "/indexes/products/documents/0") => hashset!{"documents.delete", "documents.*", "*"}, ("GET", "/tasks") => hashset!{"tasks.get", "*"}, ("GET", "/tasks?indexUid=products") => hashset!{"tasks.get", "*"}, ("GET", "/tasks/0") => hashset!{"tasks.get", "*"}, From 9a8fb6c55a43c090490ed401fcb0667cd81e9c80 Mon Sep 17 00:00:00 2001 From: janithPet Date: Wed, 15 Jun 2022 17:27:41 +0100 Subject: [PATCH 03/41] Updated actions identifiers to be in a more pleasing order --- meilisearch-auth/src/action.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index 674ed4824..5d79fea7c 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -104,19 +104,19 @@ impl Action { pub mod actions { pub(crate) const ALL: u8 = 0; pub const SEARCH: u8 = 1; - pub const DOCUMENTS_ALL: u8 = 20; - pub const DOCUMENTS_ADD: u8 = 2; - pub const DOCUMENTS_GET: u8 = 3; - pub const DOCUMENTS_DELETE: u8 = 4; - pub const INDEXES_CREATE: u8 = 5; - pub const INDEXES_GET: u8 = 6; - pub const INDEXES_UPDATE: u8 = 7; - pub const INDEXES_DELETE: u8 = 8; - pub const TASKS_GET: u8 = 9; - pub const SETTINGS_GET: u8 = 10; - pub const SETTINGS_UPDATE: u8 = 11; - pub const STATS_GET: u8 = 12; - pub const DUMPS_CREATE: u8 = 13; + pub const DOCUMENTS_ALL: u8 = 2; + pub const DOCUMENTS_ADD: u8 = 3; + pub const DOCUMENTS_GET: u8 = 4; + pub const DOCUMENTS_DELETE: u8 = 5; + pub const INDEXES_CREATE: u8 = 6; + pub const INDEXES_GET: u8 = 7; + pub const INDEXES_UPDATE: u8 = 8; + pub const INDEXES_DELETE: u8 = 9; + pub const TASKS_GET: u8 = 10; + pub const SETTINGS_GET: u8 = 11; + pub const SETTINGS_UPDATE: u8 = 12; + pub const STATS_GET: u8 = 13; + pub const DUMPS_CREATE: u8 = 14; pub const VERSION: u8 = 15; pub const KEYS_CREATE: u8 = 16; pub const KEYS_GET: u8 = 17; From 6f910f89eb9ebc528c677df81405f43b4f01c16c Mon Sep 17 00:00:00 2001 From: janithPet Date: Wed, 15 Jun 2022 22:23:38 +0100 Subject: [PATCH 04/41] Ran formatter on the code. --- meilisearch-auth/src/action.rs | 2 +- meilisearch-auth/src/store.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index 5d79fea7c..ef11c3a00 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -8,7 +8,7 @@ pub enum Action { All = actions::ALL, #[serde(rename = "search")] Search = actions::SEARCH, - #[serde(rename = "documents.*")] + #[serde(rename = "documents.*")] DocumentsAll = actions::DOCUMENTS_ALL, #[serde(rename = "documents.add")] DocumentsAdd = actions::DOCUMENTS_ADD, diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 65de64e56..f9d6e7728 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -93,7 +93,11 @@ impl HeedAuthStore { } else if key.actions.contains(&Action::DocumentsAll) { // if key.actions.contains.DocumentsAll add all actions related to documents. let mut actions = key.actions.clone(); - actions.append(&mut vec![Action::DocumentsAdd, Action::DocumentsGet, Action::DocumentsDelete]); + actions.append(&mut vec![ + Action::DocumentsAdd, + Action::DocumentsGet, + Action::DocumentsDelete, + ]); actions } else { key.actions.clone() From 5ae5b060188b491f64be98b43281058581f9d847 Mon Sep 17 00:00:00 2001 From: Janith Petangoda <22471198+janithpet@users.noreply.github.com> Date: Wed, 15 Jun 2022 09:45:18 +0100 Subject: [PATCH 05/41] Improve docker CI: push `vX.Y` tag (without patch) to DockerHub (#2507) * 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.. Add minor changes on CI --- .github/workflows/publish-docker-images.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index b9ea50cb3..8d24c1123 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -27,6 +27,20 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Check tag format + id: check-tag-format + run: | + # Escape submitted tag name + escaped_tag=$(printf "%q" ${{ github.ref_name }}) + + # Check if tag has format v.. and set output.match + # to create a vX.Y (without patch version) Docker tag + if [[ $escaped_tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo ::set-output name=match::true + else + echo ::set-output name=match::false + fi + - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -37,6 +51,7 @@ jobs: flavor: latest=false tags: | type=ref,event=tag + type=semver,pattern=v{{major}}.{{minor}},enable=${{ steps.check-tag-format.outputs.match }} type=raw,value=latest,enable=${{ github.event_name == 'release' }} - name: Build and push From 8b98303191de6b7947751197f9f3c852607e3cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Mon, 20 Jun 2022 10:36:34 +0200 Subject: [PATCH 06/41] Change information place regarding release assets --- .github/workflows/README.md | 20 -------------------- CONTRIBUTING.md | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/README.md diff --git a/.github/workflows/README.md b/.github/workflows/README.md deleted file mode 100644 index ffb401a6c..000000000 --- a/.github/workflows/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# GitHub Actions Workflow for Meilisearch - -> **Note:** - -> - We do not use [cache](https://github.com/actions/cache) yet but we could use it to speed up CI - -## Workflow - -- On each pull request, we trigger `cargo test`. -- On each tag, we build: - - the tagged Docker image and publish it to Docker Hub - - the binaries for MacOS, Ubuntu, and Windows - - the Debian package -- On each stable release (`v*.*.*` tag): - - we build the `latest` Docker image and publish it to Docker Hub - - we publish the binary to Hombrew and Gemfury - -## Problems - -- We do not test on Windows because we are unable to make it work, there is a disk space problem. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9b733665c..b99a92c59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,6 +5,7 @@ First, thank you for contributing to Meilisearch! The goal of this document is t Remember that there are many ways to contribute other than writing code: writing [tutorials or blog posts](https://github.com/meilisearch/awesome-meilisearch), improving [the documentation](https://github.com/meilisearch/documentation), submitting [bug reports](https://github.com/meilisearch/meilisearch/issues/new?assignees=&labels=&template=bug_report.md&title=) and [feature requests](https://github.com/meilisearch/product/discussions/categories/feedback-feature-proposal)... ## Table of Contents + - [Assumptions](#assumptions) - [How to Contribute](#how-to-contribute) - [Development Workflow](#development-workflow) @@ -13,7 +14,7 @@ Remember that there are many ways to contribute other than writing code: writing ## Assumptions -1. **You're familiar with [Github](https://github.com) and the [Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)(PR) workflow.** +1. **You're familiar with [GitHub](https://github.com) and the [Pull Requests](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)(PR) workflow.** 2. **You've read the Meilisearch [documentation](https://docs.meilisearch.com).** 3. **You know about the [Meilisearch community](https://docs.meilisearch.com/learn/what_is_meilisearch/contact.html). Please use this for help.** @@ -23,7 +24,7 @@ Remember that there are many ways to contribute other than writing code: writing 1. Ensure your change has an issue! Find an [existing issue](https://github.com/meilisearch/meilisearch/issues/) or [open a new issue](https://github.com/meilisearch/meilisearch/issues/new). * This is where you can get a feel if the change will be accepted or not. -2. Once approved, [fork the Meilisearch repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) in your own Github account. +2. Once approved, [fork the Meilisearch repository](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) in your own GitHub account. 3. [Create a new Git branch](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository) 4. Review the [Development Workflow](#development-workflow) section that describes the steps to maintain the repository. 5. Make your changes on your branch. @@ -45,6 +46,8 @@ We recommend using the `--release` flag to test the full performance of Meilisea cargo test ``` +This command will be triggered to each PR as a requirement for merging it. + If you get a "Too many open files" error you might want to increase the open file limit using this command: ```bash @@ -69,7 +72,7 @@ As minimal requirements, your commit message should: We don't follow any other convention, but if you want to use one, we recommend [the Chris Beams one](https://chris.beams.io/posts/git-commit/). -### Github Pull Requests +### GitHub Pull Requests Some notes on GitHub PRs: @@ -92,6 +95,16 @@ _[Read more about this](https://github.com/meilisearch/integration-guides/blob/m The full Meilisearch release process is described in [this guide](https://github.com/meilisearch/core-team/blob/main/resources/meilisearch-release.md). Please follow it carefully before doing any release. +### Release assets + +For each release, the following assets are created: +- Binaries for differents platforms (Linux, MacOS, Windows and ARM architectures) are attached to the GitHub release +- Binaries are pushed to HomeBrew and APT (not published for RC) +- Docker tags are created/updated: + - `vX.Y.Z` + - `vX.Y` (not published for RC) + - `latest` (not published for RC) +
Thank you again for reading this through, we can not wait to begin to work with you if you made your way through this contributing guide ❤️ From 06e05cc4f8c35ef263e68ae73115d4c9a4dbd4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Mon, 20 Jun 2022 14:39:50 +0200 Subject: [PATCH 07/41] Update Docker credentials --- .github/workflows/publish-docker-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 8d24c1123..7d2d79abf 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -24,8 +24,8 @@ jobs: if: github.event_name != 'schedule' uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Check tag format id: check-tag-format From f8aa21bc1612a0a7f243ded8633dd72a1f2d97c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Wed, 22 Jun 2022 14:39:47 +0200 Subject: [PATCH 08/41] Fix content of dump/assets for testing 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 --- .../v3_v0.24.0_rubygems_with_settings.dump | Bin 7060 -> 7213 bytes .../v4_v0.25.2_rubygems_with_settings.dump | Bin 7511 -> 7649 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/meilisearch-http/tests/assets/v3_v0.24.0_rubygems_with_settings.dump b/meilisearch-http/tests/assets/v3_v0.24.0_rubygems_with_settings.dump index 7f7baeab590638ce74e8a2fee82e2304ae503754..aeed58859e4a8729fca1be7e2b64b7512d91feb8 100644 GIT binary patch literal 7213 zcmW+)WmuG55T#3ESsIa&TDnWArMpwQkp_{L?rxB!QBn|Cm+tPC?v`#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YVAb@8#!wc({K&-d=8A%0Hcs=hwd|gPv@I& h8AdPE%TtQ-chAT3@q9cV&&U6E`~_*5KbQdU004!xmbCx? From 13f258513f78e047f975502cb8a8a9abd0422ed5 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 22 Jun 2022 16:44:16 +0200 Subject: [PATCH 09/41] meilisearch-lib was missing a feature in its cargo.toml --- meilisearch-lib/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-lib/Cargo.toml b/meilisearch-lib/Cargo.toml index 094c79901..be26663b8 100644 --- a/meilisearch-lib/Cargo.toml +++ b/meilisearch-lib/Cargo.toml @@ -11,7 +11,7 @@ anyhow = { version = "1.0.56", features = ["backtrace"] } async-stream = "0.3.3" async-trait = "0.1.52" atomic_refcell = "0.1.8" -byte-unit = { version = "4.0.14", default-features = false, features = ["std"] } +byte-unit = { version = "4.0.14", default-features = false, features = ["std", "serde"] } bytes = "1.1.0" clap = { version = "3.1.6", features = ["derive", "env"] } crossbeam-channel = "0.5.2" From f98c8d7f8b23f4608932072fc1e98f5de11718f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Tue, 28 Jun 2022 18:58:23 +0200 Subject: [PATCH 10/41] Add dependabot for GHA --- .github/dependabot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..2998c8d37 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Set update schedule for GitHub Actions only + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" From 7ced5c2cc7905c64411eca42a3a981b45ba69e06 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:21:32 +0000 Subject: [PATCH 11/41] Bump docker/metadata-action from 3 to 4 Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v3...v4) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 8d24c1123..80c605063 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -43,7 +43,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: getmeili/meilisearch # The lastest tag is only pushed for the official Meilisearch release From 8e703fbabe39cb387fa7c84eb361deac2a742ba7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:21:35 +0000 Subject: [PATCH 12/41] Bump codecov/codecov-action from 1 to 3 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v1...v3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 7c15deaf2..e70c3a21c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -25,7 +25,7 @@ jobs: RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=unwind -Zpanic_abort_tests" - uses: actions-rs/grcov@v0.1 - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} file: ${{ steps.coverage.outputs.report }} From f7b47b43f47b0af8288b4d6cf1088a44d116a746 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:21:38 +0000 Subject: [PATCH 13/41] Bump docker/setup-qemu-action from 1 to 2 Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 8d24c1123..3be98a397 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -15,7 +15,7 @@ jobs: runs-on: docker steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 From ed185fb6366da76283309847e36c403a41e59de9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:21:41 +0000 Subject: [PATCH 14/41] Bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/coverage.yml | 2 +- .github/workflows/flaky.yml | 2 +- .github/workflows/publish-binaries.yml | 4 ++-- .github/workflows/publish-deb-brew-pkg.yml | 2 +- .github/workflows/rust.yml | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 7c15deaf2..ddc4a2c7a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,7 +8,7 @@ jobs: nightly-coverage: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: toolchain: nightly diff --git a/.github/workflows/flaky.yml b/.github/workflows/flaky.yml index 570bc532e..8d34da4d9 100644 --- a/.github/workflows/flaky.yml +++ b/.github/workflows/flaky.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install cargo-flaky run: cargo install cargo-flaky - name: Run cargo flaky 100 times diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml index 304798d75..d99d1ec41 100644 --- a/.github/workflows/publish-binaries.yml +++ b/.github/workflows/publish-binaries.yml @@ -27,7 +27,7 @@ jobs: - uses: hecrj/setup-rust-action@master with: rust-version: stable - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build run: cargo build --release --locked - name: Upload binaries to release @@ -55,7 +55,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Installing Rust toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/publish-deb-brew-pkg.yml b/.github/workflows/publish-deb-brew-pkg.yml index 6a5a21287..cbf2e54d8 100644 --- a/.github/workflows/publish-deb-brew-pkg.yml +++ b/.github/workflows/publish-deb-brew-pkg.yml @@ -14,7 +14,7 @@ jobs: rust-version: stable - name: Install cargo-deb run: cargo install cargo-deb - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build deb package run: cargo deb -p meilisearch-http -o target/debian/meilisearch.deb - name: Upload debian pkg to release diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 748c5d690..71c20fd7a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [ubuntu-18.04, macos-latest, windows-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Cache dependencies uses: Swatinem/rust-cache@v1.3.0 - name: Run cargo check without any default features @@ -42,7 +42,7 @@ jobs: name: Run tests in debug runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -60,7 +60,7 @@ jobs: name: Run Clippy runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal @@ -79,7 +79,7 @@ jobs: name: Run Rustfmt runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: profile: minimal From 38b85ec547f65b1c8a0fb7553b08a129360504a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Jun 2022 20:21:43 +0000 Subject: [PATCH 15/41] Bump docker/setup-buildx-action from 1 to 2 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index 8d24c1123..078ae0f6b 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -18,7 +18,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub if: github.event_name != 'schedule' From 9b660e1058eabe31ff1ebde64043f6970afee851 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Mon, 27 Jun 2022 17:57:48 -0500 Subject: [PATCH 16/41] chore(routes): correct typo Signed-off-by: Ryan Russell --- meilisearch-http/src/routes/indexes/documents.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meilisearch-http/src/routes/indexes/documents.rs b/meilisearch-http/src/routes/indexes/documents.rs index 2becc6db1..3e3db86b2 100644 --- a/meilisearch-http/src/routes/indexes/documents.rs +++ b/meilisearch-http/src/routes/indexes/documents.rs @@ -46,7 +46,7 @@ fn payload_to_stream(mut payload: Payload) -> impl Stream Result, MeilisearchHttpError> { match req.mime_type() { Ok(Some(mime)) => Ok(Some(mime)), From a626cf4c99100e729da1757dbeaf83b84ef33276 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Mon, 27 Jun 2022 17:58:11 -0500 Subject: [PATCH 17/41] chore: test comment readability improvements Signed-off-by: Ryan Russell --- meilisearch-http/tests/documents/add_documents.rs | 2 +- meilisearch-http/tests/search/mod.rs | 2 +- meilisearch-http/tests/tasks/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch-http/tests/documents/add_documents.rs b/meilisearch-http/tests/documents/add_documents.rs index c3baf0cb0..85b88ca36 100644 --- a/meilisearch-http/tests/documents/add_documents.rs +++ b/meilisearch-http/tests/documents/add_documents.rs @@ -625,7 +625,7 @@ async fn add_documents_no_index_creation() { OffsetDateTime::parse(response["enqueuedAt"].as_str().unwrap(), &Rfc3339).unwrap(); assert!(processed_at > enqueued_at); - // index was created, and primary key was infered. + // index was created, and primary key was inferred. let (response, code) = index.get().await; assert_eq!(code, 200); assert_eq!(response["primaryKey"], "id"); diff --git a/meilisearch-http/tests/search/mod.rs b/meilisearch-http/tests/search/mod.rs index 02cdc751f..5b23f9d34 100644 --- a/meilisearch-http/tests/search/mod.rs +++ b/meilisearch-http/tests/search/mod.rs @@ -1,4 +1,4 @@ -// This modules contains all the test concerning search. Each particular feture of the search +// This modules contains all the test concerning search. Each particular feature of the search // should be tested in its own module to isolate tests and keep the tests readable. mod errors; diff --git a/meilisearch-http/tests/tasks/mod.rs b/meilisearch-http/tests/tasks/mod.rs index 9d0940562..785e0284e 100644 --- a/meilisearch-http/tests/tasks/mod.rs +++ b/meilisearch-http/tests/tasks/mod.rs @@ -39,7 +39,7 @@ async fn get_task_status() { index.wait_task(0).await; let (_response, code) = index.get_task(1).await; assert_eq!(code, 200); - // TODO check resonse format, as per #48 + // TODO check response format, as per #48 } #[actix_rt::test] From 28609c41768eeb17b4b457ab39c6f6c028de8064 Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Mon, 27 Jun 2022 17:59:33 -0500 Subject: [PATCH 18/41] chore(auth test): Correct `compute_authorized_search` macro Signed-off-by: Ryan Russell --- meilisearch-http/tests/auth/tenant_token.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meilisearch-http/tests/auth/tenant_token.rs b/meilisearch-http/tests/auth/tenant_token.rs index d82e170aa..6e2127aeb 100644 --- a/meilisearch-http/tests/auth/tenant_token.rs +++ b/meilisearch-http/tests/auth/tenant_token.rs @@ -115,7 +115,7 @@ static REFUSED_KEYS: Lazy> = Lazy::new(|| { ] }); -macro_rules! compute_autorized_search { +macro_rules! compute_authorized_search { ($tenant_tokens:expr, $filter:expr, $expected_count:expr) => { let mut server = Server::new_auth().await; server.use_admin_key("MASTER_KEY").await; @@ -251,7 +251,7 @@ async fn search_authorized_simple_token() { }, ]; - compute_autorized_search!(tenant_tokens, {}, 5); + compute_authorized_search!(tenant_tokens, {}, 5); } #[actix_rt::test] @@ -305,7 +305,7 @@ async fn search_authorized_filter_token() { }, ]; - compute_autorized_search!(tenant_tokens, {}, 3); + compute_authorized_search!(tenant_tokens, {}, 3); } #[actix_rt::test] @@ -359,7 +359,7 @@ async fn filter_search_authorized_filter_token() { }, ]; - compute_autorized_search!(tenant_tokens, "color = yellow", 1); + compute_authorized_search!(tenant_tokens, "color = yellow", 1); } #[actix_rt::test] From 19f732e62319ce3bd3dc8024d961629553da1c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Wed, 29 Jun 2022 11:35:41 +0200 Subject: [PATCH 19/41] Update manifest for dependabot --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 2998c8d37..4a711a2c7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,3 +7,7 @@ updates: directory: "/" schedule: interval: "monthly" + labels: + - 'skip changelog' + - 'dependencies' + rebase-strategy: disabled From 9ea96fa5c1060c6d11b6923584b161f5b6e72a01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:06:38 +0000 Subject: [PATCH 20/41] Bump docker/login-action from 1 to 2 Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index be38d4844..fcadb5196 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -22,7 +22,7 @@ jobs: - name: Login to DockerHub if: github.event_name != 'schedule' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From 6f7a4d95d9c37af2978ad4013df018c15f3a5c0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:06:40 +0000 Subject: [PATCH 21/41] Bump Swatinem/rust-cache from 1.3.0 to 1.4.0 Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 1.3.0 to 1.4.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/v1/CHANGELOG.md) - [Commits](https://github.com/Swatinem/rust-cache/compare/v1.3.0...v1.4.0) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/rust.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 71c20fd7a..183365f4f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Cache dependencies - uses: Swatinem/rust-cache@v1.3.0 + uses: Swatinem/rust-cache@v1.4.0 - name: Run cargo check without any default features uses: actions-rs/cargo@v1 with: @@ -49,7 +49,7 @@ jobs: toolchain: stable override: true - name: Cache dependencies - uses: Swatinem/rust-cache@v1.3.0 + uses: Swatinem/rust-cache@v1.4.0 - name: Run tests in debug uses: actions-rs/cargo@v1 with: @@ -68,7 +68,7 @@ jobs: override: true components: clippy - name: Cache dependencies - uses: Swatinem/rust-cache@v1.3.0 + uses: Swatinem/rust-cache@v1.4.0 - name: Run cargo clippy uses: actions-rs/cargo@v1 with: @@ -87,6 +87,6 @@ jobs: override: true components: rustfmt - name: Cache dependencies - uses: Swatinem/rust-cache@v1.3.0 + uses: Swatinem/rust-cache@v1.4.0 - name: Run cargo fmt run: cargo fmt --all -- --check From d1296d03ea31eeaf0124fafe49b1cac4f893f6ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:06:44 +0000 Subject: [PATCH 22/41] Bump docker/build-push-action from 2 to 3 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/publish-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-images.yml b/.github/workflows/publish-docker-images.yml index be38d4844..625352998 100644 --- a/.github/workflows/publish-docker-images.yml +++ b/.github/workflows/publish-docker-images.yml @@ -56,7 +56,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: # We do not push tags for the cron jobs, this is only for test purposes push: ${{ github.event_name != 'schedule' }} From aff8cd17746193a50814aa4d34793aef6436f747 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Mon, 4 Jul 2022 12:00:03 +0200 Subject: [PATCH 23/41] Make clippy happy --- meilisearch-http/src/lib.rs | 2 +- meilisearch-http/src/routes/indexes/search.rs | 7 +++---- meilisearch-http/tests/common/index.rs | 13 +++++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/meilisearch-http/src/lib.rs b/meilisearch-http/src/lib.rs index bfdb829d4..6485784fc 100644 --- a/meilisearch-http/src/lib.rs +++ b/meilisearch-http/src/lib.rs @@ -31,7 +31,7 @@ pub fn setup_meilisearch(opt: &Opt) -> anyhow::Result { let mut meilisearch = MeiliSearch::builder(); // enable autobatching? - let _ = AUTOBATCHING_ENABLED.store( + AUTOBATCHING_ENABLED.store( opt.scheduler_options.enable_auto_batching, std::sync::atomic::Ordering::Relaxed, ); diff --git a/meilisearch-http/src/routes/indexes/search.rs b/meilisearch-http/src/routes/indexes/search.rs index 3f8fecd5c..a5d1f1a5c 100644 --- a/meilisearch-http/src/routes/indexes/search.rs +++ b/meilisearch-http/src/routes/indexes/search.rs @@ -108,10 +108,9 @@ fn fix_sort_query_parameters(sort_query: &str) -> Vec { sort_parameters.push(current_sort.to_string()); merge = true; } else if merge && !sort_parameters.is_empty() { - sort_parameters - .last_mut() - .unwrap() - .push_str(&format!(",{}", current_sort)); + let s = sort_parameters.last_mut().unwrap(); + s.push(','); + s.push_str(current_sort); if current_sort.ends_with("):desc") || current_sort.ends_with("):asc") { merge = false; } diff --git a/meilisearch-http/tests/common/index.rs b/meilisearch-http/tests/common/index.rs index 010535e21..54618442c 100644 --- a/meilisearch-http/tests/common/index.rs +++ b/meilisearch-http/tests/common/index.rs @@ -1,4 +1,5 @@ use std::{ + fmt::Write, panic::{catch_unwind, resume_unwind, UnwindSafe}, time::Duration, }; @@ -118,10 +119,10 @@ impl Index<'_> { pub async fn filtered_tasks(&self, type_: &[&str], status: &[&str]) -> (Value, StatusCode) { let mut url = format!("/tasks?indexUid={}", self.uid); if !type_.is_empty() { - url += &format!("&type={}", type_.join(",")); + let _ = write!(url, "&type={}", type_.join(",")); } if !status.is_empty() { - url += &format!("&status={}", status.join(",")); + let _ = write!(url, "&status={}", status.join(",")); } self.service.get(url).await } @@ -133,7 +134,7 @@ impl Index<'_> { ) -> (Value, StatusCode) { let mut url = format!("/indexes/{}/documents/{}", encode(self.uid.as_ref()), id); if let Some(fields) = options.and_then(|o| o.fields) { - url.push_str(&format!("?fields={}", fields.join(","))); + let _ = write!(url, "?fields={}", fields.join(",")); } self.service.get(url).await } @@ -141,15 +142,15 @@ impl Index<'_> { pub async fn get_all_documents(&self, options: GetAllDocumentsOptions) -> (Value, StatusCode) { let mut url = format!("/indexes/{}/documents?", encode(self.uid.as_ref())); if let Some(limit) = options.limit { - url.push_str(&format!("limit={}&", limit)); + let _ = write!(url, "limit={}&", limit); } if let Some(offset) = options.offset { - url.push_str(&format!("offset={}&", offset)); + let _ = write!(url, "offset={}&", offset); } if let Some(attributes_to_retrieve) = options.attributes_to_retrieve { - url.push_str(&format!("fields={}&", attributes_to_retrieve.join(","))); + let _ = write!(url, "fields={}&", attributes_to_retrieve.join(",")); } self.service.get(url).await From 1dc3724c1f8e5492d00cb2dbb2e6183da94c0b3e Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Mon, 4 Jul 2022 13:33:46 -0400 Subject: [PATCH 24/41] Added [...]_ALL enum members in action.rs --- meilisearch-auth/src/action.rs | 53 +++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index ef11c3a00..127fb8e1a 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -16,6 +16,8 @@ pub enum Action { DocumentsGet = actions::DOCUMENTS_GET, #[serde(rename = "documents.delete")] DocumentsDelete = actions::DOCUMENTS_DELETE, + #[serde(rename = "indexes.*")] + IndexAll = actions::INDEXES_ALL, #[serde(rename = "indexes.create")] IndexesAdd = actions::INDEXES_CREATE, #[serde(rename = "indexes.get")] @@ -24,14 +26,22 @@ pub enum Action { IndexesUpdate = actions::INDEXES_UPDATE, #[serde(rename = "indexes.delete")] IndexesDelete = actions::INDEXES_DELETE, + #[serde(rename = "tasks.*")] + TasksAll = actions::TASKS_ALL, #[serde(rename = "tasks.get")] TasksGet = actions::TASKS_GET, + #[serde(rename = "settings.*")] + SettingsAll = actions::SETTINGS_ALL, #[serde(rename = "settings.get")] SettingsGet = actions::SETTINGS_GET, #[serde(rename = "settings.update")] SettingsUpdate = actions::SETTINGS_UPDATE, + #[serde(rename = "stats.*")] + StatsAll = actions::STATS_ALL, #[serde(rename = "stats.get")] StatsGet = actions::STATS_GET, + #[serde(rename = "dumps.*")] + DumpsAll = actions::DUMPS_ALL, #[serde(rename = "dumps.create")] DumpsCreate = actions::DUMPS_CREATE, #[serde(rename = "version")] @@ -56,14 +66,19 @@ impl Action { DOCUMENTS_ADD => Some(Self::DocumentsAdd), DOCUMENTS_GET => Some(Self::DocumentsGet), DOCUMENTS_DELETE => Some(Self::DocumentsDelete), + INDEXES_ALL => Some(Self::IndexAll), INDEXES_CREATE => Some(Self::IndexesAdd), INDEXES_GET => Some(Self::IndexesGet), INDEXES_UPDATE => Some(Self::IndexesUpdate), INDEXES_DELETE => Some(Self::IndexesDelete), + TASKS_ALL => Some(Self::TasksAll), TASKS_GET => Some(Self::TasksGet), + SETTINGS_ALL => Some(Self::SettingsAll), SETTINGS_GET => Some(Self::SettingsGet), SETTINGS_UPDATE => Some(Self::SettingsUpdate), + STATS_ALL => Some(Self::StatsAll), STATS_GET => Some(Self::StatsGet), + DUMPS_ALL => Some(Self::DumpsAll), DUMPS_CREATE => Some(Self::DumpsCreate), VERSION => Some(Self::Version), KEYS_CREATE => Some(Self::KeysAdd), @@ -83,14 +98,19 @@ impl Action { Self::DocumentsAdd => DOCUMENTS_ADD, Self::DocumentsGet => DOCUMENTS_GET, Self::DocumentsDelete => DOCUMENTS_DELETE, + Self::IndexAll => INDEXES_ALL, Self::IndexesAdd => INDEXES_CREATE, Self::IndexesGet => INDEXES_GET, Self::IndexesUpdate => INDEXES_UPDATE, Self::IndexesDelete => INDEXES_DELETE, + Self::TasksAll => TASKS_ALL, Self::TasksGet => TASKS_GET, + Self::SettingsAll => SETTINGS_ALL, Self::SettingsGet => SETTINGS_GET, Self::SettingsUpdate => SETTINGS_UPDATE, + Self::StatsAll => STATS_ALL, Self::StatsGet => STATS_GET, + Self::DumpsAll => DUMPS_ALL, Self::DumpsCreate => DUMPS_CREATE, Self::Version => VERSION, Self::KeysAdd => KEYS_CREATE, @@ -108,18 +128,23 @@ pub mod actions { pub const DOCUMENTS_ADD: u8 = 3; pub const DOCUMENTS_GET: u8 = 4; pub const DOCUMENTS_DELETE: u8 = 5; - pub const INDEXES_CREATE: u8 = 6; - pub const INDEXES_GET: u8 = 7; - pub const INDEXES_UPDATE: u8 = 8; - pub const INDEXES_DELETE: u8 = 9; - pub const TASKS_GET: u8 = 10; - pub const SETTINGS_GET: u8 = 11; - pub const SETTINGS_UPDATE: u8 = 12; - pub const STATS_GET: u8 = 13; - pub const DUMPS_CREATE: u8 = 14; - pub const VERSION: u8 = 15; - pub const KEYS_CREATE: u8 = 16; - pub const KEYS_GET: u8 = 17; - pub const KEYS_UPDATE: u8 = 18; - pub const KEYS_DELETE: u8 = 19; + pub const INDEXES_ALL: u8 = 6; + pub const INDEXES_CREATE: u8 = 7; + pub const INDEXES_GET: u8 = 8; + pub const INDEXES_UPDATE: u8 = 9; + pub const INDEXES_DELETE: u8 = 10; + pub const TASKS_ALL: u8 = 11; + pub const TASKS_GET: u8 = 12; + pub const SETTINGS_ALL: u8 = 13; + pub const SETTINGS_GET: u8 = 14; + pub const SETTINGS_UPDATE: u8 = 15; + pub const STATS_ALL: u8 = 16; + pub const STATS_GET: u8 = 17; + pub const DUMPS_ALL: u8 = 18; + pub const DUMPS_CREATE: u8 = 19; + pub const VERSION: u8 = 20; + pub const KEYS_CREATE: u8 = 21; + pub const KEYS_GET: u8 = 22; + pub const KEYS_UPDATE: u8 = 23; + pub const KEYS_DELETE: u8 = 24; } From c251b527b00304c3c0691d186b26fdbdbb5c216e Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Mon, 4 Jul 2022 21:07:47 -0400 Subject: [PATCH 25/41] Add iterators over * for stats, dumps, tasks, settings, and indexes; change documents impl to prevent duplication --- meilisearch-auth/src/store.rs | 78 +++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 7 deletions(-) diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index f9d6e7728..13515ca7c 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -92,13 +92,77 @@ impl HeedAuthStore { Action::into_enum_iter().collect() } else if key.actions.contains(&Action::DocumentsAll) { // if key.actions.contains.DocumentsAll add all actions related to documents. - let mut actions = key.actions.clone(); - actions.append(&mut vec![ - Action::DocumentsAdd, - Action::DocumentsGet, - Action::DocumentsDelete, - ]); - actions + key.actions.iter() + .cloned() + .filter(|action|{ // Prevents duplicate entries in the actions vector + *action != Action::DocumentsAdd && + *action != Action::DocumentsDelete && + *action != Action::DocumentsGet + }) + .chain(vec![ + Action::DocumentsAdd, + Action::DocumentsDelete, + Action::DocumentsGet + ]) + .collect() + } else if key.actions.contains(&Action::IndexesAll) { + key.actions.iter() + .cloned() + .filter(|action|{ + *action != Action::IndexesAdd && + *action != Action::IndexesGet && + *action != Action::IndexesDelete && + *action != Action::IndexesUpdate + }) + .chain(vec![ + Action::IndexesAdd, + Action::IndexesGet, + Action::IndexesDelete, + Action::IndexesUpdate + ]) + .collect() + } else if key.actions.contains(&Action::SettingsAll) { + key.actions.iter() + .cloned() + .filter(|action|{ + *action != Action::SettingsGet && + *action != Action::SettingsUpdate + }) + .chain(vec![ + Action::SettingsGet, + Action::SettingsUpdate + ]) + .collect() + } else if key.actions.contains(&Action::TasksAll) { + key.actions.iter() + .cloned() + .filter(|action|{ + *action != Action::TasksGet + }) + .chain(vec![ + Action::TasksGet + ]) + .collect() + } else if key.actions.contains(&Action::DumpsAll) { + key.actions.iter() + .cloned() + .filter(|action|{ + *action != Action::DumpsCreate + }) + .chain(vec![ + Action::DumpsCreate + ]) + .collect() + } else if key.actions.contains(&Action::StatsAll) { + key.actions.iter() + .cloned() + .filter(|action|{ + *action != Action::StatsGet + }) + .chain(vec![ + Action::StatsGet + ]) + .collect() } else { key.actions.clone() }; From be1c6f9dc47b82b16a335334e710e2d01c214f65 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Mon, 4 Jul 2022 21:30:24 -0400 Subject: [PATCH 26/41] Update tests to include .* permissions for tasks, indexes, dumps, stats, and settings --- meilisearch-http/tests/auth/authorization.rs | 62 ++++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/meilisearch-http/tests/auth/authorization.rs b/meilisearch-http/tests/auth/authorization.rs index e790d1e4a..27a22de38 100644 --- a/meilisearch-http/tests/auth/authorization.rs +++ b/meilisearch-http/tests/auth/authorization.rs @@ -15,37 +15,37 @@ pub static AUTHORIZATIONS: Lazy hashset!{"documents.get", "documents.*", "*"}, ("GET", "/indexes/products/documents/0") => hashset!{"documents.get", "documents.*", "*"}, ("DELETE", "/indexes/products/documents/0") => hashset!{"documents.delete", "documents.*", "*"}, - ("GET", "/tasks") => hashset!{"tasks.get", "*"}, - ("GET", "/tasks?indexUid=products") => hashset!{"tasks.get", "*"}, - ("GET", "/tasks/0") => hashset!{"tasks.get", "*"}, - ("PATCH", "/indexes/products/") => hashset!{"indexes.update", "*"}, - ("GET", "/indexes/products/") => hashset!{"indexes.get", "*"}, - ("DELETE", "/indexes/products/") => hashset!{"indexes.delete", "*"}, - ("POST", "/indexes") => hashset!{"indexes.create", "*"}, - ("GET", "/indexes") => hashset!{"indexes.get", "*"}, - ("GET", "/indexes/products/settings") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/ranking-rules") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/stop-words") => hashset!{"settings.get", "*"}, - ("GET", "/indexes/products/settings/synonyms") => hashset!{"settings.get", "*"}, - ("DELETE", "/indexes/products/settings") => hashset!{"settings.update", "*"}, - ("PATCH", "/indexes/products/settings") => hashset!{"settings.update", "*"}, - ("PATCH", "/indexes/products/settings/typo-tolerance") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/ranking-rules") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/stop-words") => hashset!{"settings.update", "*"}, - ("PUT", "/indexes/products/settings/synonyms") => hashset!{"settings.update", "*"}, - ("GET", "/indexes/products/stats") => hashset!{"stats.get", "*"}, - ("GET", "/stats") => hashset!{"stats.get", "*"}, - ("POST", "/dumps") => hashset!{"dumps.create", "*"}, + ("GET", "/tasks") => hashset!{"tasks.get", "tasks.*", "*"}, + ("GET", "/tasks?indexUid=products") => hashset!{"tasks.get", "tasks.*", "*"}, + ("GET", "/tasks/0") => hashset!{"tasks.get", "tasks.*", "*"}, + ("PATCH", "/indexes/products/") => hashset!{"indexes.update", "indexes.*", "*"}, + ("GET", "/indexes/products/") => hashset!{"indexes.get", "indexes.*", "*"}, + ("DELETE", "/indexes/products/") => hashset!{"indexes.delete", "indexes.*", "*"}, + ("POST", "/indexes") => hashset!{"indexes.create", "indexes.*", "*"}, + ("GET", "/indexes") => hashset!{"indexes.get", "indexes.*", "*"}, + ("GET", "/indexes/products/settings") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/ranking-rules") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/stop-words") => hashset!{"settings.get", "settings.*", "*"}, + ("GET", "/indexes/products/settings/synonyms") => hashset!{"settings.get", "settings.*", "*"}, + ("DELETE", "/indexes/products/settings") => hashset!{"settings.update", "settings.*", "*"}, + ("PATCH", "/indexes/products/settings") => hashset!{"settings.update", "settings.*", "*"}, + ("PATCH", "/indexes/products/settings/typo-tolerance") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/displayed-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/distinct-attribute") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/filterable-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/ranking-rules") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/searchable-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/sortable-attributes") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/stop-words") => hashset!{"settings.update", "settings.*", "*"}, + ("PUT", "/indexes/products/settings/synonyms") => hashset!{"settings.update", "settings.*", "*"}, + ("GET", "/indexes/products/stats") => hashset!{"stats.get", "stats.*", "*"}, + ("GET", "/stats") => hashset!{"stats.get", "stats.*", "*"}, + ("POST", "/dumps") => hashset!{"dumps.create", "dumps.*", "*"}, ("GET", "/version") => hashset!{"version", "*"}, ("PATCH", "/keys/mykey/") => hashset!{"keys.update", "*"}, ("GET", "/keys/mykey/") => hashset!{"keys.get", "*"}, From 63e1fb4f96b31024b595efbed89ba6620a747323 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Mon, 4 Jul 2022 21:49:40 -0400 Subject: [PATCH 27/41] Run the code formatter --- meilisearch-auth/src/action.rs | 6 +- meilisearch-auth/src/store.rs | 123 +++++++++++++++------------------ 2 files changed, 60 insertions(+), 69 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index 127fb8e1a..cecc919aa 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -17,7 +17,7 @@ pub enum Action { #[serde(rename = "documents.delete")] DocumentsDelete = actions::DOCUMENTS_DELETE, #[serde(rename = "indexes.*")] - IndexAll = actions::INDEXES_ALL, + IndexesAll = actions::INDEXES_ALL, #[serde(rename = "indexes.create")] IndexesAdd = actions::INDEXES_CREATE, #[serde(rename = "indexes.get")] @@ -66,7 +66,7 @@ impl Action { DOCUMENTS_ADD => Some(Self::DocumentsAdd), DOCUMENTS_GET => Some(Self::DocumentsGet), DOCUMENTS_DELETE => Some(Self::DocumentsDelete), - INDEXES_ALL => Some(Self::IndexAll), + INDEXES_ALL => Some(Self::IndexesAll), INDEXES_CREATE => Some(Self::IndexesAdd), INDEXES_GET => Some(Self::IndexesGet), INDEXES_UPDATE => Some(Self::IndexesUpdate), @@ -98,7 +98,7 @@ impl Action { Self::DocumentsAdd => DOCUMENTS_ADD, Self::DocumentsGet => DOCUMENTS_GET, Self::DocumentsDelete => DOCUMENTS_DELETE, - Self::IndexAll => INDEXES_ALL, + Self::IndexesAll => INDEXES_ALL, Self::IndexesAdd => INDEXES_CREATE, Self::IndexesGet => INDEXES_GET, Self::IndexesUpdate => INDEXES_UPDATE, diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 13515ca7c..06bb87275 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -92,77 +92,68 @@ impl HeedAuthStore { Action::into_enum_iter().collect() } else if key.actions.contains(&Action::DocumentsAll) { // if key.actions.contains.DocumentsAll add all actions related to documents. - key.actions.iter() - .cloned() - .filter(|action|{ // Prevents duplicate entries in the actions vector - *action != Action::DocumentsAdd && - *action != Action::DocumentsDelete && - *action != Action::DocumentsGet - }) - .chain(vec![ - Action::DocumentsAdd, - Action::DocumentsDelete, - Action::DocumentsGet - ]) - .collect() + key.actions + .iter() + .cloned() + .filter(|action| { + // Prevents duplicate entries in the actions vector + *action != Action::DocumentsAdd + && *action != Action::DocumentsDelete + && *action != Action::DocumentsGet + }) + .chain(vec![ + Action::DocumentsAdd, + Action::DocumentsDelete, + Action::DocumentsGet, + ]) + .collect() } else if key.actions.contains(&Action::IndexesAll) { - key.actions.iter() - .cloned() - .filter(|action|{ - *action != Action::IndexesAdd && - *action != Action::IndexesGet && - *action != Action::IndexesDelete && - *action != Action::IndexesUpdate - }) - .chain(vec![ - Action::IndexesAdd, - Action::IndexesGet, - Action::IndexesDelete, - Action::IndexesUpdate - ]) - .collect() + key.actions + .iter() + .cloned() + .filter(|action| { + *action != Action::IndexesAdd + && *action != Action::IndexesGet + && *action != Action::IndexesDelete + && *action != Action::IndexesUpdate + }) + .chain(vec![ + Action::IndexesAdd, + Action::IndexesGet, + Action::IndexesDelete, + Action::IndexesUpdate, + ]) + .collect() } else if key.actions.contains(&Action::SettingsAll) { - key.actions.iter() - .cloned() - .filter(|action|{ - *action != Action::SettingsGet && - *action != Action::SettingsUpdate - }) - .chain(vec![ - Action::SettingsGet, - Action::SettingsUpdate - ]) - .collect() + key.actions + .iter() + .cloned() + .filter(|action| { + *action != Action::SettingsGet && *action != Action::SettingsUpdate + }) + .chain(vec![Action::SettingsGet, Action::SettingsUpdate]) + .collect() } else if key.actions.contains(&Action::TasksAll) { - key.actions.iter() - .cloned() - .filter(|action|{ - *action != Action::TasksGet - }) - .chain(vec![ - Action::TasksGet - ]) - .collect() + key.actions + .iter() + .cloned() + .filter(|action| *action != Action::TasksGet) + .chain(vec![Action::TasksGet]) + .collect() } else if key.actions.contains(&Action::DumpsAll) { - key.actions.iter() - .cloned() - .filter(|action|{ - *action != Action::DumpsCreate - }) - .chain(vec![ - Action::DumpsCreate - ]) - .collect() + key.actions + .iter() + .cloned() + .filter(|action| *action != Action::DumpsCreate) + .chain(vec![Action::DumpsCreate]) + .collect() } else if key.actions.contains(&Action::StatsAll) { - key.actions.iter() - .cloned() - .filter(|action|{ - *action != Action::StatsGet - }) - .chain(vec![ - Action::StatsGet - ]) - .collect() + key.actions + .iter() + .cloned() + .filter(|action| *action != Action::StatsGet) + .chain(vec![Action::StatsGet]) + .collect() } else { key.actions.clone() }; From 2c300c72c9bf5c4d0c319fef2d086a1ff3fa8c28 Mon Sep 17 00:00:00 2001 From: Vasiliy Soldatkin Date: Tue, 5 Jul 2022 18:28:29 +0300 Subject: [PATCH 28/41] Add CI creates issue updating dependencies --- .github/ISSUE_TEMPLATE/update_dependencies.md | 3 +++ .github/workflows/create-issue-dependencies.yml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/update_dependencies.md create mode 100644 .github/workflows/create-issue-dependencies.yml diff --git a/.github/ISSUE_TEMPLATE/update_dependencies.md b/.github/ISSUE_TEMPLATE/update_dependencies.md new file mode 100644 index 000000000..a28eed5f0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/update_dependencies.md @@ -0,0 +1,3 @@ +We need to update the dependencies of the Meilisearch repository, and, if possible, the dependencies of all the core-team repositories that Meilisearch depends on (milli, charabia, heed...). + +⚠️ This issue should only be done at the beginning of the sprint! diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml new file mode 100644 index 000000000..c9e7fd9ca --- /dev/null +++ b/.github/workflows/create-issue-dependencies.yml @@ -0,0 +1,16 @@ +name: Create Issue "Upgrade dependencies" +on: + schedule: + - cron: '0 0 1 */3 *' + workflow_dispatch: + +jobs: + create-issue: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v1 + - run: gh issue create --title "Upgrade dependencies" --label "dependencies,maintenance" --body-file ".github/ISSUE_TEMPLATE/update_dependencies.md" + + From b0757e75c4cd6f43b10843890eeedd0f2407b879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Tue, 5 Jul 2022 19:34:49 +0200 Subject: [PATCH 29/41] Update .github/workflows/create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index c9e7fd9ca..569b3b09b 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -12,5 +12,3 @@ jobs: steps: - uses: actions/checkout@v1 - run: gh issue create --title "Upgrade dependencies" --label "dependencies,maintenance" --body-file ".github/ISSUE_TEMPLATE/update_dependencies.md" - - From 5588a6415a00e2a8e8ebe8160e839812de6010c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Tue, 5 Jul 2022 19:34:57 +0200 Subject: [PATCH 30/41] Update .github/workflows/create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index 569b3b09b..30f91471d 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -1,4 +1,4 @@ -name: Create Issue "Upgrade dependencies" +name: Create issue to upgrade dependencies on: schedule: - cron: '0 0 1 */3 *' From 43fecbf382a9a93272a793a98fde513471170c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Tue, 5 Jul 2022 19:35:09 +0200 Subject: [PATCH 31/41] Update .github/workflows/create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index 30f91471d..41d793c0d 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -10,5 +10,5 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - run: gh issue create --title "Upgrade dependencies" --label "dependencies,maintenance" --body-file ".github/ISSUE_TEMPLATE/update_dependencies.md" From 480b881e1547c8658223fabfa80d9e6e3929bba0 Mon Sep 17 00:00:00 2001 From: Vasiliy Soldatkin Date: Tue, 5 Jul 2022 21:08:59 +0300 Subject: [PATCH 32/41] Remove template and add GHA from review --- .github/ISSUE_TEMPLATE/update_dependencies.md | 3 --- .../workflows/create-issue-dependencies.yml | 21 +++++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/update_dependencies.md diff --git a/.github/ISSUE_TEMPLATE/update_dependencies.md b/.github/ISSUE_TEMPLATE/update_dependencies.md deleted file mode 100644 index a28eed5f0..000000000 --- a/.github/ISSUE_TEMPLATE/update_dependencies.md +++ /dev/null @@ -1,3 +0,0 @@ -We need to update the dependencies of the Meilisearch repository, and, if possible, the dependencies of all the core-team repositories that Meilisearch depends on (milli, charabia, heed...). - -⚠️ This issue should only be done at the beginning of the sprint! diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index 41d793c0d..8b6e3cbcf 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -7,8 +7,21 @@ on: jobs: create-issue: runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 - - run: gh issue create --title "Upgrade dependencies" --label "dependencies,maintenance" --body-file ".github/ISSUE_TEMPLATE/update_dependencies.md" + - uses: actions/checkout@v3 + - name: Create an issue + uses: actions-ecosystem/action-create-issue@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + title: Upgrade dependencies + body: | + We need to update the dependencies of the Meilisearch + repository, and, if possible, the dependencies of all + the core-team repositories that Meilisearch depends on + (milli, charabia, heed...). + + ⚠️ This issue should only be done at the beginning of the sprint! + + labels: | + dependencies + maintenance \ No newline at end of file From 6f95ae9879438ad2a8c27e8c39a5e0850a29610b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Tue, 5 Jul 2022 21:02:32 +0200 Subject: [PATCH 33/41] Update .github/workflows/create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index 8b6e3cbcf..afd8c73e1 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -21,7 +21,6 @@ jobs: (milli, charabia, heed...). ⚠️ This issue should only be done at the beginning of the sprint! - labels: | dependencies maintenance \ No newline at end of file From 05ffe24d645d3b6dce270b94800a2b17ab024fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Tue, 5 Jul 2022 21:02:40 +0200 Subject: [PATCH 34/41] Update .github/workflows/create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index afd8c73e1..266656f7b 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -23,4 +23,4 @@ jobs: ⚠️ This issue should only be done at the beginning of the sprint! labels: | dependencies - maintenance \ No newline at end of file + maintenance \ No newline at end of file From bba5fab5e56287edac779b09aff9c3754f286519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Tue, 5 Jul 2022 21:03:08 +0200 Subject: [PATCH 35/41] Update .github/workflows/create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index 266656f7b..625e6e182 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -23,4 +23,4 @@ jobs: ⚠️ This issue should only be done at the beginning of the sprint! labels: | dependencies - maintenance \ No newline at end of file + maintenance From 5d80ff41a29feebbe03069d00616af1c5c7b1b17 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 5 Jul 2022 21:06:58 -0400 Subject: [PATCH 36/41] Clean up put_key impl --- meilisearch-auth/src/action.rs | 3 +- meilisearch-auth/src/store.rs | 86 +++++++--------------------------- 2 files changed, 18 insertions(+), 71 deletions(-) diff --git a/meilisearch-auth/src/action.rs b/meilisearch-auth/src/action.rs index cecc919aa..94a15eb9d 100644 --- a/meilisearch-auth/src/action.rs +++ b/meilisearch-auth/src/action.rs @@ -1,7 +1,8 @@ use enum_iterator::IntoEnumIterator; use serde::{Deserialize, Serialize}; +use std::hash::Hash; -#[derive(IntoEnumIterator, Copy, Clone, Serialize, Deserialize, Debug, Eq, PartialEq)] +#[derive(IntoEnumIterator, Copy, Clone, Serialize, Deserialize, Debug, Eq, PartialEq, Hash)] #[repr(u8)] pub enum Action { #[serde(rename = "*")] diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 06bb87275..8697afc38 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -7,6 +7,7 @@ use std::ops::Deref; use std::path::Path; use std::str; use std::sync::Arc; +use std::collections::HashSet; use enum_iterator::IntoEnumIterator; use hmac::{Hmac, Mac}; @@ -87,76 +88,21 @@ impl HeedAuthStore { // create inverted database. let db = self.action_keyid_index_expiration; - let actions = if key.actions.contains(&Action::All) { - // if key.actions contains All, we iterate over all actions. - Action::into_enum_iter().collect() - } else if key.actions.contains(&Action::DocumentsAll) { - // if key.actions.contains.DocumentsAll add all actions related to documents. - key.actions - .iter() - .cloned() - .filter(|action| { - // Prevents duplicate entries in the actions vector - *action != Action::DocumentsAdd - && *action != Action::DocumentsDelete - && *action != Action::DocumentsGet - }) - .chain(vec![ - Action::DocumentsAdd, - Action::DocumentsDelete, - Action::DocumentsGet, - ]) - .collect() - } else if key.actions.contains(&Action::IndexesAll) { - key.actions - .iter() - .cloned() - .filter(|action| { - *action != Action::IndexesAdd - && *action != Action::IndexesGet - && *action != Action::IndexesDelete - && *action != Action::IndexesUpdate - }) - .chain(vec![ - Action::IndexesAdd, - Action::IndexesGet, - Action::IndexesDelete, - Action::IndexesUpdate, - ]) - .collect() - } else if key.actions.contains(&Action::SettingsAll) { - key.actions - .iter() - .cloned() - .filter(|action| { - *action != Action::SettingsGet && *action != Action::SettingsUpdate - }) - .chain(vec![Action::SettingsGet, Action::SettingsUpdate]) - .collect() - } else if key.actions.contains(&Action::TasksAll) { - key.actions - .iter() - .cloned() - .filter(|action| *action != Action::TasksGet) - .chain(vec![Action::TasksGet]) - .collect() - } else if key.actions.contains(&Action::DumpsAll) { - key.actions - .iter() - .cloned() - .filter(|action| *action != Action::DumpsCreate) - .chain(vec![Action::DumpsCreate]) - .collect() - } else if key.actions.contains(&Action::StatsAll) { - key.actions - .iter() - .cloned() - .filter(|action| *action != Action::StatsGet) - .chain(vec![Action::StatsGet]) - .collect() - } else { - key.actions.clone() - }; + let mut actions = HashSet::new(); + for action in &key.actions { + match action { + Action::All => actions.extend(Action::into_enum_iter()), + Action::DocumentsAll => { actions.extend([Action::DocumentsGet, Action::DocumentsDelete, Action::DocumentsGet].iter()); }, + Action::IndexesAll => { actions.extend([Action::IndexesAdd, Action::IndexesDelete, Action::IndexesUpdate, Action::IndexesUpdate].iter()); }, + Action::SettingsAll => { actions.extend([Action::SettingsGet, Action::SettingsUpdate].iter()); }, + Action::DumpsAll => { actions.insert(Action::DumpsCreate); }, + Action::TasksAll => { actions.insert(Action::TasksGet); }, + Action::StatsAll => { actions.insert(Action::StatsGet); }, + other => { actions.insert(*other); } + } + } + + let actions = actions.iter().collect::>(); let no_index_restriction = key.indexes.contains(&StarOr::Star); for action in actions { From 23f02f241e4531d9dcc12eebd8b1e77f757aa33e Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 5 Jul 2022 21:08:19 -0400 Subject: [PATCH 37/41] Run the code formatter --- meilisearch-auth/src/store.rs | 45 ++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 8697afc38..9b9cf41e0 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -1,5 +1,6 @@ use std::borrow::Cow; use std::cmp::Reverse; +use std::collections::HashSet; use std::convert::TryFrom; use std::convert::TryInto; use std::fs::create_dir_all; @@ -7,7 +8,6 @@ use std::ops::Deref; use std::path::Path; use std::str; use std::sync::Arc; -use std::collections::HashSet; use enum_iterator::IntoEnumIterator; use hmac::{Hmac, Mac}; @@ -92,13 +92,42 @@ impl HeedAuthStore { for action in &key.actions { match action { Action::All => actions.extend(Action::into_enum_iter()), - Action::DocumentsAll => { actions.extend([Action::DocumentsGet, Action::DocumentsDelete, Action::DocumentsGet].iter()); }, - Action::IndexesAll => { actions.extend([Action::IndexesAdd, Action::IndexesDelete, Action::IndexesUpdate, Action::IndexesUpdate].iter()); }, - Action::SettingsAll => { actions.extend([Action::SettingsGet, Action::SettingsUpdate].iter()); }, - Action::DumpsAll => { actions.insert(Action::DumpsCreate); }, - Action::TasksAll => { actions.insert(Action::TasksGet); }, - Action::StatsAll => { actions.insert(Action::StatsGet); }, - other => { actions.insert(*other); } + Action::DocumentsAll => { + actions.extend( + [ + Action::DocumentsGet, + Action::DocumentsDelete, + Action::DocumentsGet, + ] + .iter(), + ); + } + Action::IndexesAll => { + actions.extend( + [ + Action::IndexesAdd, + Action::IndexesDelete, + Action::IndexesUpdate, + Action::IndexesUpdate, + ] + .iter(), + ); + } + Action::SettingsAll => { + actions.extend([Action::SettingsGet, Action::SettingsUpdate].iter()); + } + Action::DumpsAll => { + actions.insert(Action::DumpsCreate); + } + Action::TasksAll => { + actions.insert(Action::TasksGet); + } + Action::StatsAll => { + actions.insert(Action::StatsGet); + } + other => { + actions.insert(*other); + } } } From fb9b298645e31bf9d38fdb81bf79771c3c19e972 Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Tue, 5 Jul 2022 21:52:50 -0400 Subject: [PATCH 38/41] Leave actions as HashSet --- meilisearch-auth/src/store.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 9b9cf41e0..3a32b9f20 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -131,8 +131,6 @@ impl HeedAuthStore { } } - let actions = actions.iter().collect::>(); - let no_index_restriction = key.indexes.contains(&StarOr::Star); for action in actions { if no_index_restriction { From bb5b18b82ca1c762afedd1cbc865555aff6b211f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar=20-=20curqui?= Date: Wed, 6 Jul 2022 11:01:25 +0200 Subject: [PATCH 39/41] Update create-issue-dependencies.yml --- .github/workflows/create-issue-dependencies.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/create-issue-dependencies.yml b/.github/workflows/create-issue-dependencies.yml index 625e6e182..638088c2e 100644 --- a/.github/workflows/create-issue-dependencies.yml +++ b/.github/workflows/create-issue-dependencies.yml @@ -15,10 +15,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} title: Upgrade dependencies body: | - We need to update the dependencies of the Meilisearch - repository, and, if possible, the dependencies of all - the core-team repositories that Meilisearch depends on - (milli, charabia, heed...). + We need to update the dependencies of the Meilisearch repository, and, if possible, the dependencies of all the core-team repositories that Meilisearch depends on (milli, charabia, heed...). ⚠️ This issue should only be done at the beginning of the sprint! labels: | From 074a6a0ccee60dc5c995cddb97e1581d7cf2959c Mon Sep 17 00:00:00 2001 From: Phillip Davis Date: Wed, 6 Jul 2022 22:24:46 -0400 Subject: [PATCH 40/41] Fix typos in HeadAuthStore::put_api_key --- meilisearch-auth/src/store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-auth/src/store.rs b/meilisearch-auth/src/store.rs index 3a32b9f20..f21382068 100644 --- a/meilisearch-auth/src/store.rs +++ b/meilisearch-auth/src/store.rs @@ -97,7 +97,7 @@ impl HeedAuthStore { [ Action::DocumentsGet, Action::DocumentsDelete, - Action::DocumentsGet, + Action::DocumentsAdd, ] .iter(), ); @@ -107,7 +107,7 @@ impl HeedAuthStore { [ Action::IndexesAdd, Action::IndexesDelete, - Action::IndexesUpdate, + Action::IndexesGet, Action::IndexesUpdate, ] .iter(), From 2de68688588257010003ea598aa973db2fb98e24 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Thu, 7 Jul 2022 13:48:47 +0200 Subject: [PATCH 41/41] Chores: Add a dedicated section for Language Support in the issue template This new section in put apper than feature proposal because language-support is kind of a sub-category of it, and so, in the reading order, we choose to create a feature proposal only if it is not related to Language. --- .github/ISSUE_TEMPLATE/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0a5835b86..1006a064d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,7 @@ contact_links: + - name: Language support request & feedback + url: https://github.com/meilisearch/product/discussions/categories/feedback-feature-proposal?discussions_q=label%3Aproduct%3Acore%3Atokenizer+category%3A%22Feedback+%26+Feature+Proposal%22 + about: The requests and feedback regarding Language support are not managed in this repository. Please upvote the related discussion in our dedicated product repository or open a new one if it doesn't exist. - name: Feature request & feedback url: https://github.com/meilisearch/product/discussions/categories/feedback-feature-proposal about: The feature requests and feedback regarding the already existing features are not managed in this repository. Please open a discussion in our dedicated product repository