mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
40339919ad
3170: Re-enable importing from dumps v1 r=irevoire a=dureuill # Pull Request ## Related issue Fixes #2985 ## What does this PR do? ### User standpoint - Allows importing dumps version 1 (exported with Meilisearch <=v0.20) to modern-day Meilisearch - Tasks of type "Customs" are skipped, with a warning - Tasks of status "enqueued" are skipped, with a warning - The "WordsPosition" ranking rule is skipped when encountered in the ranking rules, with a warning. After an import from a v1 dump, it is recommended that a user checks each index and its settings. ### Implementation standpoint - Add a dump v1 reader based on the one by `@irevoire` - Add a v1_to_v2 compatibility layer based on the v2_to_v3 one - as v2 requires UUIDs, the v1 indexes are mapped to UUIDs built from their position in the metada file: the first index is given UUID all zeroes, the second one UUID `00000000-0000-0000-0000-000000000001`, and so on... This should have no bearing on the final indexes because v6 is not using UUIDs, but this allows us to correctly identify which tasks belong to which index. - Modify the v2_to_v3 compatibility layer to account for the fact that the reader can actually be a v1_to_v2 compat layer - Make some base dump types Clone - impl Display for v2::settings::Criterion ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! 3180: Bump mislav/bump-homebrew-formula-action from 1 to 2 r=curquiza a=dependabot[bot] Bumps [mislav/bump-homebrew-formula-action](https://github.com/mislav/bump-homebrew-formula-action) from 1 to 2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/mislav/bump-homebrew-formula-action/releases">mislav/bump-homebrew-formula-action's releases</a>.</em></p> <blockquote> <h2>bump-homebrew-formula 2.0</h2> <h2>What's Changed</h2> <ul> <li>Use Node 16 by <a href="https://github.com/chenrui333"><code>`@chenrui333</code></a>` in <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/36">mislav/bump-homebrew-formula-action#36</a></li> <li>Bump minimist from 1.2.5 to 1.2.6 by <a href="https://github.com/dependabot"><code>`@dependabot</code></a>` in <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/33">mislav/bump-homebrew-formula-action#33</a></li> <li>Bump node-fetch from 2.6.6 to 2.6.7 by <a href="https://github.com/dependabot"><code>`@dependabot</code></a>` in <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/34">mislav/bump-homebrew-formula-action#34</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/chenrui333"><code>`@chenrui333</code></a>` made their first contribution in <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/36">mislav/bump-homebrew-formula-action#36</a></li> </ul> <h2>bump-homebrew-formula 1.16</h2> <ul> <li>Replaces broken v1.15 tag, thanks <a href="https://github.com/hendrikmaus"><code>`@hendrikmaus</code></a>` <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/issues/32">mislav/bump-homebrew-formula-action#32</a></li> <li>Add <code>push-to</code> option, thanks <a href="https://github.com/codefromthecrypt"><code>`@codefromthecrypt</code></a>` <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/30">mislav/bump-homebrew-formula-action#30</a></li> <li>Fix syntax error, thanks <a href="https://github.com/hendrikmaus"><code>`@hendrikmaus</code></a>` <a href="https://github.com/wata727"><code>`@wata727</code></a>` <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/27">mislav/bump-homebrew-formula-action#27</a></li> <li>Ensure repeated placeholders in <code>commit-message</code> are expanded, thanks <a href="https://github.com/hendrikmaus"><code>`@hendrikmaus</code></a>` <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/pull/29">mislav/bump-homebrew-formula-action#29</a></li> </ul> <h2>bump-homebrew-formula 1.14</h2> <ul> <li>Ignore HTTP 409 error when fast-forwading the main branch of <code>homebrew-tap</code> fork</li> </ul> <h2>bump-homebrew-formula 1.13</h2> <ul> <li>Add <code>create-pullrequest</code> input to control whether or not a PR is submitted to <code>homebrew-tap</code></li> <li>Add <code>download-sha256</code> input to define the SHA256 checksum of the archive at <code>download-url</code></li> <li>Fix creating a new branch in the forked repo failing with HTTP 404</li> </ul> <h2>bump-homebrew-formula 1.12</h2> <ul> <li>Fix Actions CJS loader halting on <code>foo?.bar</code> JS syntax</li> </ul> <h2>bump-homebrew-formula 1.11</h2> <ul> <li>New optional <code>formula-path</code> input accepts the filename of the formula file to edit (default <code>Formula/<formula-name>.rb</code>).</li> <li>Remove <code>revision N</code> lines when bumping Homebrew formulae.</li> </ul> <h2>bump-homebrew-formula 1.10</h2> <ul> <li>The new optional <code>tag-name</code> input allows this action to be <a href="https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow">manually triggered via <code>workflow_dispatch</code></a> instead of on git push to a tag.</li> </ul> <h2>bump-homebrew-formula 1.9</h2> <ul> <li>Fix following multiple HTTP redirects while calculating checksum for <code>download-url</code></li> </ul> <h2>bump-homebrew-formula 1.8</h2> <ul> <li>Enable JavaScript source maps for better failure debugging</li> </ul> <h2>bump-homebrew-formula 1.7</h2> <ul> <li> <p>Allow <code>download-url</code> as input parameter</p> </li> <li> <p>Add support for git-based <code>download-url</code></p> </li> </ul> <h2>bump-homebrew-formula 1.6</h2> <ul> <li>Control the git commit message template being used for updating the formula file via the <code>commit-message</code> action input</li> </ul> <h2>bump-homebrew-formula 1.5</h2> <ul> <li>Support detection version from <code>https://github.com/OWNER/REPO/releases/download/TAG/FILE</code> download URLs</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="fcd7e28e54
"><code>fcd7e28</code></a> lib</li> <li><a href="33989a8502
"><code>33989a8</code></a> Merge branch 'main' into v2</li> <li><a href="5983bb6c59
"><code>5983bb6</code></a> Improve extracting complex tag names from URLs</li> <li><a href="9750a1166b
"><code>9750a11</code></a> lib</li> <li><a href="64410e9c96
"><code>64410e9</code></a> v2</li> <li><a href="677d7482a3
"><code>677d748</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/issues/36">#36</a> from chenrui333/node-16</li> <li><a href="f364e76079
"><code>f364e76</code></a> also update some build dependencies</li> <li><a href="c08fd9bee5
"><code>c08fd9b</code></a> deps: update to use nodev16</li> <li><a href="280f532e9a
"><code>280f532</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/mislav/bump-homebrew-formula-action/issues/34">#34</a> from mislav/dependabot/npm_and_yarn/node-fetch-2.6.7</li> <li><a href="5d94a66af3
"><code>5d94a66</code></a> Bump node-fetch from 2.6.6 to 2.6.7</li> <li>Additional commits viewable in <a href="https://github.com/mislav/bump-homebrew-formula-action/compare/v1...v2">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mislav/bump-homebrew-formula-action&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> 3181: Bump Swatinem/rust-cache from 2.0.0 to 2.2.0 r=curquiza a=dependabot[bot] Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 2.0.0 to 2.2.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Swatinem/rust-cache/releases">Swatinem/rust-cache's releases</a>.</em></p> <blockquote> <h2>v2.2.0</h2> <ul> <li>Add new <code>save-if</code> option to always restore, but only conditionally save the cache.</li> </ul> <h2>v2.1.0</h2> <ul> <li>Only hash <code>Cargo.{lock,toml}</code> files in the configured workspace directories.</li> </ul> <h2>v2.0.2</h2> <ul> <li>Avoid calling cargo metadata on pre-cleanup.</li> <li>Added <code>prefix-key</code>, <code>cache-directories</code> and <code>cache-targets</code> options.</li> </ul> <h2>v2.0.1</h2> <ul> <li>Primarily just updating dependencies to fix GitHub deprecation notices.</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md">Swatinem/rust-cache's changelog</a>.</em></p> <blockquote> <h2>2.2.0</h2> <ul> <li>Add new <code>save-if</code> option to always restore, but only conditionally save the cache.</li> </ul> <h2>2.1.0</h2> <ul> <li>Only hash <code>Cargo.{lock,toml}</code> files in the configured workspace directories.</li> </ul> <h2>2.0.2</h2> <ul> <li>Avoid calling <code>cargo metadata</code> on pre-cleanup.</li> <li>Added <code>prefix-key</code>, <code>cache-directories</code> and <code>cache-targets</code> options.</li> </ul> <h2>2.0.1</h2> <ul> <li>Primarily just updating dependencies to fix GitHub deprecation notices.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="359a70e43a
"><code>359a70e</code></a> 2.2.0</li> <li><a href="ecee04e7b3
"><code>ecee04e</code></a> feat: add save-if option, closes <a href="https://github-redirect.dependabot.com/Swatinem/rust-cache/issues/66">#66</a> (<a href="https://github-redirect.dependabot.com/Swatinem/rust-cache/issues/91">#91</a>)</li> <li><a href="b894d59a8d
"><code>b894d59</code></a> 2.1.0</li> <li><a href="e78327dd9e
"><code>e78327d</code></a> small code style improvements, README and CHANGELOG updates</li> <li><a href="ccdddcc049
"><code>ccdddcc</code></a> only hash Cargo.toml/Cargo.lock that belong to a configured workspace (<a href="https://github-redirect.dependabot.com/Swatinem/rust-cache/issues/90">#90</a>)</li> <li><a href="b5ec9edd91
"><code>b5ec9ed</code></a> 2.0.2</li> <li><a href="3f2513fdf4
"><code>3f2513f</code></a> avoid calling cargo metadata on pre-cleanup</li> <li><a href="19c46583c5
"><code>19c4658</code></a> update dependencies</li> <li><a href="b8e72aae83
"><code>b8e72aa</code></a> Added <code>prefix-key</code> <code>cache-directories</code> and <code>cache-targets</code> options (<a href="https://github-redirect.dependabot.com/Swatinem/rust-cache/issues/85">#85</a>)</li> <li><a href="22c9328bcb
"><code>22c9328</code></a> 2.0.1</li> <li>Additional commits viewable in <a href="https://github.com/Swatinem/rust-cache/compare/v2.0.0...v2.2.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Swatinem/rust-cache&package-manager=github_actions&previous-version=2.0.0&new-version=2.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> 3183: Use ubuntu-latest when not impacting r=Kerollmops a=curquiza Minor changes - Use `ubuntu-latest` for CI where there is no compilation - rename one of the workflow (obsolete name) Co-authored-by: Louis Dureuil <louis@meilisearch.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: curquiza <clementine@meilisearch.com>
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Publish to APT repository & Homebrew
|
|
|
|
on:
|
|
release:
|
|
types: [released]
|
|
|
|
jobs:
|
|
check-version:
|
|
name: Check the version validity
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Check release validity
|
|
run: bash .github/scripts/check-release.sh
|
|
|
|
debian:
|
|
name: Publish debian packagge
|
|
runs-on: ubuntu-18.04
|
|
needs: check-version
|
|
steps:
|
|
- uses: hecrj/setup-rust-action@master
|
|
with:
|
|
rust-version: stable
|
|
- name: Install cargo-deb
|
|
run: cargo install cargo-deb
|
|
- 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
|
|
uses: svenstaro/upload-release-action@2.3.0
|
|
with:
|
|
repo_token: ${{ secrets.MEILI_BOT_GH_PAT }}
|
|
file: target/debian/meilisearch.deb
|
|
asset_name: meilisearch.deb
|
|
tag: ${{ github.ref }}
|
|
- name: Upload debian pkg to apt repository
|
|
run: curl -F package=@target/debian/meilisearch.deb https://${{ secrets.GEMFURY_PUSH_TOKEN }}@push.fury.io/meilisearch/
|
|
|
|
homebrew:
|
|
name: Bump Homebrew formula
|
|
runs-on: ubuntu-latest
|
|
needs: check-version
|
|
steps:
|
|
- name: Create PR to Homebrew
|
|
uses: mislav/bump-homebrew-formula-action@v2
|
|
with:
|
|
formula-name: meilisearch
|
|
env:
|
|
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_COMMITTER_TOKEN }}
|