diff --git a/.github/ISSUE_TEMPLATE/sprint_issue.md b/.github/ISSUE_TEMPLATE/sprint_issue.md
index 84b8f1066..30b5e16ff 100644
--- a/.github/ISSUE_TEMPLATE/sprint_issue.md
+++ b/.github/ISSUE_TEMPLATE/sprint_issue.md
@@ -22,6 +22,10 @@ Related product discussion:
+### Are you modifying a database?
+- [ ] If not, add the `no db change` label to your PR, and you're good to merge.
+- [ ] If yes, add the `db change` label to your PR. You'll receive a message explaining you what to do.
+
### Reminders when modifying the API
- [ ] Update the openAPI file with utoipa:
diff --git a/.github/workflows/bench-manual.yml b/.github/workflows/bench-manual.yml
index 09699d94f..afa408bea 100644
--- a/.github/workflows/bench-manual.yml
+++ b/.github/workflows/bench-manual.yml
@@ -1,28 +1,27 @@
name: Bench (manual)
on:
- workflow_dispatch:
- inputs:
- workload:
- description: 'The path to the workloads to execute (workloads/...)'
- required: true
- default: 'workloads/movies.json'
+ workflow_dispatch:
+ inputs:
+ workload:
+ description: "The path to the workloads to execute (workloads/...)"
+ required: true
+ default: "workloads/movies.json"
env:
- WORKLOAD_NAME: ${{ github.event.inputs.workload }}
+ WORKLOAD_NAME: ${{ github.event.inputs.workload }}
jobs:
- benchmarks:
- name: Run and upload benchmarks
- runs-on: benchmarks
- timeout-minutes: 180 # 3h
- steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
- with:
- profile: minimal
-
- - name: Run benchmarks - workload ${WORKLOAD_NAME} - branch ${{ github.ref }} - commit ${{ github.sha }}
- run: |
- cargo xtask bench --api-key "${{ secrets.BENCHMARK_API_KEY }}" --dashboard-url "${{ vars.BENCHMARK_DASHBOARD_URL }}" --reason "Manual [Run #${{ github.run_id }}](https://github.com/meilisearch/meilisearch/actions/runs/${{ github.run_id }})" -- ${WORKLOAD_NAME}
+ benchmarks:
+ name: Run and upload benchmarks
+ runs-on: benchmarks
+ timeout-minutes: 180 # 3h
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dtolnay/rust-toolchain@1.85
+ with:
+ profile: minimal
+ - name: Run benchmarks - workload ${WORKLOAD_NAME} - branch ${{ github.ref }} - commit ${{ github.sha }}
+ run: |
+ cargo xtask bench --api-key "${{ secrets.BENCHMARK_API_KEY }}" --dashboard-url "${{ vars.BENCHMARK_DASHBOARD_URL }}" --reason "Manual [Run #${{ github.run_id }}](https://github.com/meilisearch/meilisearch/actions/runs/${{ github.run_id }})" -- ${WORKLOAD_NAME}
diff --git a/.github/workflows/bench-pr.yml b/.github/workflows/bench-pr.yml
index 1bcf16bfc..b533b47c5 100644
--- a/.github/workflows/bench-pr.yml
+++ b/.github/workflows/bench-pr.yml
@@ -1,82 +1,82 @@
name: Bench (PR)
on:
- issue_comment:
- types: [created]
+ issue_comment:
+ types: [created]
permissions:
- issues: write
+ issues: write
env:
- GH_TOKEN: ${{ secrets.MEILI_BOT_GH_PAT }}
+ GH_TOKEN: ${{ secrets.MEILI_BOT_GH_PAT }}
jobs:
- run-benchmarks-on-comment:
- if: startsWith(github.event.comment.body, '/bench')
- name: Run and upload benchmarks
- runs-on: benchmarks
- timeout-minutes: 180 # 3h
- steps:
- - name: Check permissions
- id: permission
- env:
- PR_AUTHOR: ${{github.event.issue.user.login }}
- COMMENT_AUTHOR: ${{github.event.comment.user.login }}
- REPOSITORY: ${{github.repository}}
- PR_ID: ${{github.event.issue.number}}
- run: |
- PR_REPOSITORY=$(gh api /repos/"$REPOSITORY"/pulls/"$PR_ID" --jq .head.repo.full_name)
- if $(gh api /repos/"$REPOSITORY"/collaborators/"$PR_AUTHOR"/permission --jq .user.permissions.push)
- then
- echo "::notice title=Authentication success::PR author authenticated"
- else
- echo "::error title=Authentication error::PR author doesn't have push permission on this repository"
- exit 1
- fi
- if $(gh api /repos/"$REPOSITORY"/collaborators/"$COMMENT_AUTHOR"/permission --jq .user.permissions.push)
- then
- echo "::notice title=Authentication success::Comment author authenticated"
- else
- echo "::error title=Authentication error::Comment author doesn't have push permission on this repository"
- exit 1
- fi
- if [ "$PR_REPOSITORY" = "$REPOSITORY" ]
- then
- echo "::notice title=Authentication success::PR started from main repository"
- else
- echo "::error title=Authentication error::PR started from a fork"
- exit 1
- fi
+ run-benchmarks-on-comment:
+ if: startsWith(github.event.comment.body, '/bench')
+ name: Run and upload benchmarks
+ runs-on: benchmarks
+ timeout-minutes: 180 # 3h
+ steps:
+ - name: Check permissions
+ id: permission
+ env:
+ PR_AUTHOR: ${{github.event.issue.user.login }}
+ COMMENT_AUTHOR: ${{github.event.comment.user.login }}
+ REPOSITORY: ${{github.repository}}
+ PR_ID: ${{github.event.issue.number}}
+ run: |
+ PR_REPOSITORY=$(gh api /repos/"$REPOSITORY"/pulls/"$PR_ID" --jq .head.repo.full_name)
+ if $(gh api /repos/"$REPOSITORY"/collaborators/"$PR_AUTHOR"/permission --jq .user.permissions.push)
+ then
+ echo "::notice title=Authentication success::PR author authenticated"
+ else
+ echo "::error title=Authentication error::PR author doesn't have push permission on this repository"
+ exit 1
+ fi
+ if $(gh api /repos/"$REPOSITORY"/collaborators/"$COMMENT_AUTHOR"/permission --jq .user.permissions.push)
+ then
+ echo "::notice title=Authentication success::Comment author authenticated"
+ else
+ echo "::error title=Authentication error::Comment author doesn't have push permission on this repository"
+ exit 1
+ fi
+ if [ "$PR_REPOSITORY" = "$REPOSITORY" ]
+ then
+ echo "::notice title=Authentication success::PR started from main repository"
+ else
+ echo "::error title=Authentication error::PR started from a fork"
+ exit 1
+ fi
- - name: Check for Command
- id: command
- uses: xt0rted/slash-command-action@v2
- with:
- command: bench
- reaction-type: "rocket"
- repo-token: ${{ env.GH_TOKEN }}
+ - name: Check for Command
+ id: command
+ uses: xt0rted/slash-command-action@v2
+ with:
+ command: bench
+ reaction-type: "rocket"
+ repo-token: ${{ env.GH_TOKEN }}
- - uses: xt0rted/pull-request-comment-branch@v3
- id: comment-branch
- with:
- repo_token: ${{ env.GH_TOKEN }}
+ - uses: xt0rted/pull-request-comment-branch@v3
+ id: comment-branch
+ with:
+ repo_token: ${{ env.GH_TOKEN }}
- - uses: actions/checkout@v3
- if: success()
- with:
- fetch-depth: 0 # fetch full history to be able to get main commit sha
- ref: ${{ steps.comment-branch.outputs.head_ref }}
+ - uses: actions/checkout@v3
+ if: success()
+ with:
+ fetch-depth: 0 # fetch full history to be able to get main commit sha
+ ref: ${{ steps.comment-branch.outputs.head_ref }}
- - uses: dtolnay/rust-toolchain@1.81
- with:
- profile: minimal
+ - uses: dtolnay/rust-toolchain@1.85
+ with:
+ profile: minimal
- - name: Run benchmarks on PR ${{ github.event.issue.id }}
- run: |
- cargo xtask bench --api-key "${{ secrets.BENCHMARK_API_KEY }}" \
- --dashboard-url "${{ vars.BENCHMARK_DASHBOARD_URL }}" \
- --reason "[Comment](${{ github.event.comment.html_url }}) on [#${{ github.event.issue.number }}](${{ github.event.issue.html_url }})" \
- -- ${{ steps.command.outputs.command-arguments }} > benchlinks.txt
+ - name: Run benchmarks on PR ${{ github.event.issue.id }}
+ run: |
+ cargo xtask bench --api-key "${{ secrets.BENCHMARK_API_KEY }}" \
+ --dashboard-url "${{ vars.BENCHMARK_DASHBOARD_URL }}" \
+ --reason "[Comment](${{ github.event.comment.html_url }}) on [#${{ github.event.issue.number }}](${{ github.event.issue.html_url }})" \
+ -- ${{ steps.command.outputs.command-arguments }} > benchlinks.txt
- - name: Send comment in PR
- run: |
- gh pr comment ${{github.event.issue.number}} --body-file benchlinks.txt
+ - name: Send comment in PR
+ run: |
+ gh pr comment ${{github.event.issue.number}} --body-file benchlinks.txt
diff --git a/.github/workflows/bench-push-indexing.yml b/.github/workflows/bench-push-indexing.yml
index 0fca05f24..f35f60398 100644
--- a/.github/workflows/bench-push-indexing.yml
+++ b/.github/workflows/bench-push-indexing.yml
@@ -1,23 +1,22 @@
name: Indexing bench (push)
on:
- push:
- branches:
- - main
+ push:
+ branches:
+ - main
jobs:
- benchmarks:
- name: Run and upload benchmarks
- runs-on: benchmarks
- timeout-minutes: 180 # 3h
- steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
- with:
- profile: minimal
-
- # Run benchmarks
- - name: Run benchmarks - Dataset ${BENCH_NAME} - Branch main - Commit ${{ github.sha }}
- run: |
- cargo xtask bench --api-key "${{ secrets.BENCHMARK_API_KEY }}" --dashboard-url "${{ vars.BENCHMARK_DASHBOARD_URL }}" --reason "Push on `main` [Run #${{ github.run_id }}](https://github.com/meilisearch/meilisearch/actions/runs/${{ github.run_id }})" -- workloads/*.json
+ benchmarks:
+ name: Run and upload benchmarks
+ runs-on: benchmarks
+ timeout-minutes: 180 # 3h
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dtolnay/rust-toolchain@1.85
+ with:
+ profile: minimal
+ # Run benchmarks
+ - name: Run benchmarks - Dataset ${BENCH_NAME} - Branch main - Commit ${{ github.sha }}
+ run: |
+ cargo xtask bench --api-key "${{ secrets.BENCHMARK_API_KEY }}" --dashboard-url "${{ vars.BENCHMARK_DASHBOARD_URL }}" --reason "Push on `main` [Run #${{ github.run_id }}](https://github.com/meilisearch/meilisearch/actions/runs/${{ github.run_id }})" -- workloads/*.json
diff --git a/.github/workflows/benchmarks-manual.yml b/.github/workflows/benchmarks-manual.yml
index 044f8a827..27e736979 100644
--- a/.github/workflows/benchmarks-manual.yml
+++ b/.github/workflows/benchmarks-manual.yml
@@ -4,9 +4,9 @@ on:
workflow_dispatch:
inputs:
dataset_name:
- description: 'The name of the dataset used to benchmark (search_songs, search_wiki, search_geo or indexing)'
+ description: "The name of the dataset used to benchmark (search_songs, search_wiki, search_geo or indexing)"
required: false
- default: 'search_songs'
+ default: "search_songs"
env:
BENCH_NAME: ${{ github.event.inputs.dataset_name }}
@@ -18,7 +18,7 @@ jobs:
timeout-minutes: 4320 # 72h
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
@@ -67,7 +67,7 @@ jobs:
out_dir: critcmp_results
# Helper
- - name: 'README: compare with another benchmark'
+ - name: "README: compare with another benchmark"
run: |
echo "${{ steps.file.outputs.basename }}.json has just been pushed."
echo 'How to compare this benchmark with another one?'
diff --git a/.github/workflows/benchmarks-pr.yml b/.github/workflows/benchmarks-pr.yml
index 78f27541c..ad669b648 100644
--- a/.github/workflows/benchmarks-pr.yml
+++ b/.github/workflows/benchmarks-pr.yml
@@ -44,7 +44,7 @@ jobs:
exit 1
fi
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
diff --git a/.github/workflows/benchmarks-push-indexing.yml b/.github/workflows/benchmarks-push-indexing.yml
index 0144e20cf..996162d9c 100644
--- a/.github/workflows/benchmarks-push-indexing.yml
+++ b/.github/workflows/benchmarks-push-indexing.yml
@@ -16,7 +16,7 @@ jobs:
timeout-minutes: 4320 # 72h
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
@@ -69,7 +69,7 @@ jobs:
run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug
# Helper
- - name: 'README: compare with another benchmark'
+ - name: "README: compare with another benchmark"
run: |
echo "${{ steps.file.outputs.basename }}.json has just been pushed."
echo 'How to compare this benchmark with another one?'
diff --git a/.github/workflows/benchmarks-push-search-geo.yml b/.github/workflows/benchmarks-push-search-geo.yml
index cce6cb9b9..e9a81c6a3 100644
--- a/.github/workflows/benchmarks-push-search-geo.yml
+++ b/.github/workflows/benchmarks-push-search-geo.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: benchmarks
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
@@ -68,7 +68,7 @@ jobs:
run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug
# Helper
- - name: 'README: compare with another benchmark'
+ - name: "README: compare with another benchmark"
run: |
echo "${{ steps.file.outputs.basename }}.json has just been pushed."
echo 'How to compare this benchmark with another one?'
diff --git a/.github/workflows/benchmarks-push-search-songs.yml b/.github/workflows/benchmarks-push-search-songs.yml
index 2ba584a69..e5019063e 100644
--- a/.github/workflows/benchmarks-push-search-songs.yml
+++ b/.github/workflows/benchmarks-push-search-songs.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: benchmarks
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
@@ -68,7 +68,7 @@ jobs:
run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug
# Helper
- - name: 'README: compare with another benchmark'
+ - name: "README: compare with another benchmark"
run: |
echo "${{ steps.file.outputs.basename }}.json has just been pushed."
echo 'How to compare this benchmark with another one?'
diff --git a/.github/workflows/benchmarks-push-search-wiki.yml b/.github/workflows/benchmarks-push-search-wiki.yml
index 2436cc356..1e9d97a6e 100644
--- a/.github/workflows/benchmarks-push-search-wiki.yml
+++ b/.github/workflows/benchmarks-push-search-wiki.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: benchmarks
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
@@ -68,7 +68,7 @@ jobs:
run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug
# Helper
- - name: 'README: compare with another benchmark'
+ - name: "README: compare with another benchmark"
run: |
echo "${{ steps.file.outputs.basename }}.json has just been pushed."
echo 'How to compare this benchmark with another one?'
diff --git a/.github/workflows/db-change-comments.yml b/.github/workflows/db-change-comments.yml
new file mode 100644
index 000000000..794142044
--- /dev/null
+++ b/.github/workflows/db-change-comments.yml
@@ -0,0 +1,57 @@
+name: Comment when db change labels are added
+
+on:
+ pull_request:
+ types: [labeled]
+
+env:
+ MESSAGE: |
+ ### Hello, I'm a bot 🤖
+
+ You are receiving this message because you declared that this PR make changes to the Meilisearch database.
+ Depending on the nature of the change, additional actions might be required on your part. The following sections detail the additional actions depending on the nature of the change, please copy the relevant section in the description of your PR, and make sure to perform the required actions.
+
+ Thank you for contributing to Meilisearch :heart:
+
+ ## This PR makes forward-compatible changes
+
+ *Forward-compatible changes are changes to the database such that databases created in an older version of Meilisearch are still valid in the new version of Meilisearch. They usually represent additive changes, like adding a new optional attribute or setting.*
+
+ - [ ] Detail the change to the DB format and why they are forward compatible
+ - [ ] Forward-compatibility: A database created before this PR and using the features touched by this PR was able to be opened by a Meilisearch produced by the code of this PR.
+
+
+ ## This PR makes breaking changes
+
+ *Breaking changes are changes to the database such that databases created in an older version of Meilisearch need changes to remain valid in the new version of Meilisearch. This typically happens when the way to store the data changed (change of database, new required key, etc). This can also happen due to breaking changes in the API of an experimental feature. ⚠️ This kind of changes are more difficult to achieve safely, so proceed with caution and test dumpless upgrade right before merging the PR.*
+
+ - [ ] Detail the changes to the DB format,
+ - [ ] which are compatible, and why
+ - [ ] which are not compatible, why, and how they will be fixed up in the upgrade
+ - [ ] /!\ Ensure all the read operations still work!
+ - If the change happened in milli, you may need to check the version of the database before doing any read operation
+ - If the change happened in the index-scheduler, make sure the new code can immediately read the old database
+ - If the change happened in the meilisearch-auth database, reach out to the team; we don't know yet how to handle these changes
+ - [ ] Write the code to go from the old database to the new one
+ - If the change happened in milli, the upgrade function should be written and called [here](https://github.com/meilisearch/meilisearch/blob/3fd86e8d76d7d468b0095d679adb09211ca3b6c0/crates/milli/src/update/upgrade/mod.rs#L24-L47)
+ - If the change happened in the index-scheduler, we've never done it yet, but the right place to do it should be [here](https://github.com/meilisearch/meilisearch/blob/3fd86e8d76d7d468b0095d679adb09211ca3b6c0/crates/index-scheduler/src/scheduler/process_upgrade/mod.rs#L13)
+ - [ ] Write an integration test [here](https://github.com/meilisearch/meilisearch/blob/main/crates/meilisearch/tests/upgrade/mod.rs) ensuring you can read the old database, upgrade to the new database, and read the new database as expected
+
+
+jobs:
+ add-comment:
+ runs-on: ubuntu-latest
+ if: github.event.label.name == 'db change'
+ steps:
+ - name: Add comment
+ uses: actions/github-script@v6
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ script: |
+ const message = process.env.MESSAGE;
+ github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body: message
+ })
diff --git a/.github/workflows/db-change-missing.yml b/.github/workflows/db-change-missing.yml
new file mode 100644
index 000000000..dbd6bb82c
--- /dev/null
+++ b/.github/workflows/db-change-missing.yml
@@ -0,0 +1,28 @@
+name: Check db change labels
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened, labeled, unlabeled]
+
+env:
+ GH_TOKEN: ${{ secrets.MEILI_BOT_GH_PAT }}
+
+jobs:
+ check-labels:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+ - name: Check db change labels
+ id: check_labels
+ run: |
+ URL=/repos/meilisearch/meilisearch/pulls/${{ github.event.pull_request.number }}/labels
+ echo ${{ github.event.pull_request.number }}
+ echo $URL
+ LABELS=$(gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/meilisearch/meilisearch/issues/${{ github.event.pull_request.number }}/labels -q .[].name)
+ if [[ ! "$LABELS" =~ "db change" && ! "$LABELS" =~ "no db change" ]]; then
+ echo "::error::Pull request must contain either the 'db change' or 'no db change' label."
+ exit 1
+ else
+ echo "The label is set"
+ fi
diff --git a/.github/workflows/flaky-tests.yml b/.github/workflows/flaky-tests.yml
index a87869f13..66be5b823 100644
--- a/.github/workflows/flaky-tests.yml
+++ b/.github/workflows/flaky-tests.yml
@@ -17,7 +17,7 @@ jobs:
run: |
apt-get update && apt-get install -y curl
apt-get install build-essential -y
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Install cargo-flaky
run: cargo install cargo-flaky
- name: Run cargo flaky in the dumps
diff --git a/.github/workflows/fuzzer-indexing.yml b/.github/workflows/fuzzer-indexing.yml
index 5da7f73ed..cf7dd5bdc 100644
--- a/.github/workflows/fuzzer-indexing.yml
+++ b/.github/workflows/fuzzer-indexing.yml
@@ -12,7 +12,7 @@ jobs:
timeout-minutes: 4320 # 72h
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
diff --git a/.github/workflows/milestone-workflow.yml b/.github/workflows/milestone-workflow.yml
index c15684661..eb78bf8a8 100644
--- a/.github/workflows/milestone-workflow.yml
+++ b/.github/workflows/milestone-workflow.yml
@@ -5,6 +5,7 @@ name: Milestone's workflow
# For each Milestone created (not opened!), and if the release is NOT a patch release (only the patch changed)
# - the roadmap issue is created, see https://github.com/meilisearch/engine-team/blob/main/issue-templates/roadmap-issue.md
# - the changelog issue is created, see https://github.com/meilisearch/engine-team/blob/main/issue-templates/changelog-issue.md
+# - update the ruleset to add the current release version to the list of allowed versions and be able to use the merge queue.
# For each Milestone closed
# - the `release_version` label is created
@@ -21,10 +22,9 @@ env:
GH_TOKEN: ${{ secrets.MEILI_BOT_GH_PAT }}
jobs:
-
-# -----------------
-# MILESTONE CREATED
-# -----------------
+ # -----------------
+ # MILESTONE CREATED
+ # -----------------
get-release-version:
if: github.event.action == 'created'
@@ -148,9 +148,37 @@ jobs:
--body-file $ISSUE_TEMPLATE \
--milestone $MILESTONE_VERSION
-# ----------------
-# MILESTONE CLOSED
-# ----------------
+ update-ruleset:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Install jq
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y jq
+ - name: Update ruleset
+ env:
+ # gh api repos/meilisearch/meilisearch/rulesets --jq '.[] | {name: .name, id: .id}'
+ RULESET_ID: 4253297
+ BRANCH_NAME: ${{ github.event.inputs.branch_name }}
+ run: |
+ # Get current ruleset conditions
+ CONDITIONS=$(gh api repos/meilisearch/meilisearch/rulesets/$RULESET_ID --jq '{ conditions: .conditions }')
+
+ # Update the conditions by appending the milestone version
+ UPDATED_CONDITIONS=$(echo $CONDITIONS | jq '.conditions.ref_name.include += ["refs/heads/release-'$MILESTONE_VERSION'"]')
+
+ # Update the ruleset from stdin (-)
+ echo $UPDATED_CONDITIONS |
+ gh api repos/meilisearch/meilisearch/rulesets/$RULESET_ID \
+ --method PUT \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ --input -
+
+ # ----------------
+ # MILESTONE CLOSED
+ # ----------------
create-release-label:
if: github.event.action == 'closed'
diff --git a/.github/workflows/publish-apt-brew-pkg.yml b/.github/workflows/publish-apt-brew-pkg.yml
index 47d8d9665..e6adfca57 100644
--- a/.github/workflows/publish-apt-brew-pkg.yml
+++ b/.github/workflows/publish-apt-brew-pkg.yml
@@ -25,7 +25,7 @@ jobs:
run: |
apt-get update && apt-get install -y curl
apt-get install build-essential -y
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Install cargo-deb
run: cargo install cargo-deb
- uses: actions/checkout@v3
diff --git a/.github/workflows/publish-binaries.yml b/.github/workflows/publish-binaries.yml
index 27b89b02b..885a04d0d 100644
--- a/.github/workflows/publish-binaries.yml
+++ b/.github/workflows/publish-binaries.yml
@@ -45,7 +45,7 @@ jobs:
run: |
apt-get update && apt-get install -y curl
apt-get install build-essential -y
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Build
run: cargo build --release --locked
# No need to upload binaries for dry run (cron)
@@ -75,7 +75,7 @@ jobs:
asset_name: meilisearch-windows-amd64.exe
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Build
run: cargo build --release --locked
# No need to upload binaries for dry run (cron)
@@ -101,7 +101,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Installing Rust toolchain
- uses: dtolnay/rust-toolchain@1.81
+ uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
target: ${{ matrix.target }}
@@ -148,7 +148,7 @@ jobs:
add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update -y && apt-get install -y docker-ce
- name: Installing Rust toolchain
- uses: dtolnay/rust-toolchain@1.81
+ uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
target: ${{ matrix.target }}
diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml
index a13d51086..8daa32e35 100644
--- a/.github/workflows/test-suite.yml
+++ b/.github/workflows/test-suite.yml
@@ -27,7 +27,7 @@ jobs:
apt-get update && apt-get install -y curl
apt-get install build-essential -y
- name: Setup test with Rust stable
- uses: dtolnay/rust-toolchain@1.81
+ uses: dtolnay/rust-toolchain@1.85
- name: Cache dependencies
uses: Swatinem/rust-cache@v2.7.7
- name: Run cargo check without any default features
@@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: Swatinem/rust-cache@v2.7.7
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Run cargo check without any default features
uses: actions-rs/cargo@v1
with:
@@ -77,7 +77,7 @@ jobs:
run: |
apt-get update
apt-get install --assume-yes build-essential curl
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Run cargo build with almost all features
run: |
cargo build --workspace --locked --release --features "$(cargo xtask list-features --exclude-feature cuda,test-ollama)"
@@ -129,7 +129,7 @@ jobs:
run: |
apt-get update
apt-get install --assume-yes build-essential curl
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Run cargo tree without default features and check lindera is not present
run: |
if cargo tree -f '{p} {f}' -e normal --no-default-features | grep -qz lindera; then
@@ -153,7 +153,7 @@ jobs:
run: |
apt-get update && apt-get install -y curl
apt-get install build-essential -y
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
- name: Cache dependencies
uses: Swatinem/rust-cache@v2.7.7
- name: Run tests in debug
@@ -167,7 +167,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
components: clippy
@@ -184,7 +184,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
toolchain: nightly-2024-07-09
diff --git a/.github/workflows/update-cargo-toml-version.yml b/.github/workflows/update-cargo-toml-version.yml
index cda76e6bb..d13a4404a 100644
--- a/.github/workflows/update-cargo-toml-version.yml
+++ b/.github/workflows/update-cargo-toml-version.yml
@@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
new_version:
- description: 'The new version (vX.Y.Z)'
+ description: "The new version (vX.Y.Z)"
required: true
env:
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@1.81
+ - uses: dtolnay/rust-toolchain@1.85
with:
profile: minimal
- name: Install sd
diff --git a/Cargo.lock b/Cargo.lock
index 96cfcf76c..ecf484907 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "actix-codec"
@@ -758,9 +758,9 @@ dependencies = [
[[package]]
name = "bytemuck_derive"
-version = "1.6.0"
+version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60"
+checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1"
dependencies = [
"proc-macro2",
"quote",
diff --git a/Dockerfile b/Dockerfile
index ce4b3bfd8..5a9a4691f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
# Compile
-FROM rust:1.81.0-alpine3.20 AS compiler
+FROM rust:1.85-alpine3.20 AS compiler
RUN apk add -q --no-cache build-base openssl-dev
diff --git a/README.md b/README.md
index 508efb14b..d85942584 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,12 @@
+
+
+
+
+
+
⚡ A lightning-fast search engine that fits effortlessly into your apps, websites, and workflow 🔍
[Meilisearch](https://www.meilisearch.com?utm_campaign=oss&utm_source=github&utm_medium=meilisearch&utm_content=intro) helps you shape a delightful search experience in a snap, offering features that work out of the box to speed up your workflow.
diff --git a/assets/ph-banner.png b/assets/ph-banner.png
new file mode 100644
index 000000000..399c7fd10
Binary files /dev/null and b/assets/ph-banner.png differ
diff --git a/crates/dump/src/reader/v4/meta.rs b/crates/dump/src/reader/v4/meta.rs
index 2daea68a4..9b26eba25 100644
--- a/crates/dump/src/reader/v4/meta.rs
+++ b/crates/dump/src/reader/v4/meta.rs
@@ -108,7 +108,7 @@ where
/// not supported on untagged enums.
struct StarOrVisitor(PhantomData);
- impl<'de, T, FE> Visitor<'de> for StarOrVisitor
+ impl Visitor<'_> for StarOrVisitor
where
T: FromStr,
FE: Display,
diff --git a/crates/dump/src/reader/v4/tasks.rs b/crates/dump/src/reader/v4/tasks.rs
index a701d837d..8ae3f77b1 100644
--- a/crates/dump/src/reader/v4/tasks.rs
+++ b/crates/dump/src/reader/v4/tasks.rs
@@ -99,7 +99,7 @@ impl Task {
/// Return true when a task is finished.
/// A task is finished when its last state is either `Succeeded` or `Failed`.
pub fn is_finished(&self) -> bool {
- self.events.last().map_or(false, |event| {
+ self.events.last().is_some_and(|event| {
matches!(event, TaskEvent::Succeded { .. } | TaskEvent::Failed { .. })
})
}
diff --git a/crates/dump/src/reader/v5/meta.rs b/crates/dump/src/reader/v5/meta.rs
index 2daea68a4..9b26eba25 100644
--- a/crates/dump/src/reader/v5/meta.rs
+++ b/crates/dump/src/reader/v5/meta.rs
@@ -108,7 +108,7 @@ where
/// not supported on untagged enums.
struct StarOrVisitor(PhantomData);
- impl<'de, T, FE> Visitor<'de> for StarOrVisitor
+ impl Visitor<'_> for StarOrVisitor
where
T: FromStr,
FE: Display,
diff --git a/crates/dump/src/reader/v5/tasks.rs b/crates/dump/src/reader/v5/tasks.rs
index 8dfb2d0b0..a7352bf0c 100644
--- a/crates/dump/src/reader/v5/tasks.rs
+++ b/crates/dump/src/reader/v5/tasks.rs
@@ -114,7 +114,7 @@ impl Task {
/// Return true when a task is finished.
/// A task is finished when its last state is either `Succeeded` or `Failed`.
pub fn is_finished(&self) -> bool {
- self.events.last().map_or(false, |event| {
+ self.events.last().is_some_and(|event| {
matches!(event, TaskEvent::Succeeded { .. } | TaskEvent::Failed { .. })
})
}
diff --git a/crates/filter-parser/src/error.rs b/crates/filter-parser/src/error.rs
index 122396b87..855ce983e 100644
--- a/crates/filter-parser/src/error.rs
+++ b/crates/filter-parser/src/error.rs
@@ -35,7 +35,7 @@ impl NomErrorExt for nom::Err {
pub fn cut_with_err<'a, O>(
mut parser: impl FnMut(Span<'a>) -> IResult<'a, O>,
mut with: impl FnMut(Error<'a>) -> Error<'a>,
-) -> impl FnMut(Span<'a>) -> IResult {
+) -> impl FnMut(Span<'a>) -> IResult<'a, O> {
move |input| match parser.parse(input) {
Err(nom::Err::Error(e)) => Err(nom::Err::Failure(with(e))),
rest => rest,
@@ -121,7 +121,7 @@ impl<'a> ParseError> for Error<'a> {
}
}
-impl<'a> Display for Error<'a> {
+impl Display for Error<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let input = self.context.fragment();
// When printing our error message we want to escape all `\n` to be sure we keep our format with the
diff --git a/crates/filter-parser/src/lib.rs b/crates/filter-parser/src/lib.rs
index dc5e776ae..938702103 100644
--- a/crates/filter-parser/src/lib.rs
+++ b/crates/filter-parser/src/lib.rs
@@ -80,7 +80,7 @@ pub struct Token<'a> {
value: Option,
}
-impl<'a> PartialEq for Token<'a> {
+impl PartialEq for Token<'_> {
fn eq(&self, other: &Self) -> bool {
self.span.fragment() == other.span.fragment()
}
@@ -226,7 +226,7 @@ impl<'a> FilterCondition<'a> {
}
}
- pub fn parse(input: &'a str) -> Result