Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply key changes #477

Merged
merged 3 commits into from
Jun 24, 2022
Merged

Apply key changes #477

merged 3 commits into from
Jun 24, 2022

Conversation

alallema
Copy link
Contributor

@alallema alallema commented Jun 15, 2022

Pull Request

Related to: meilisearch/integration-guides#205

What does this PR do?

Breaking because enforces the users to use Meilisearch v0.28.0

Changes

  • PATCH /keys/:uid_or_key can update only name and description fields.
  • Add test for new :name attributes
  • Add test with :uid
  • Replace masterKey with apiKey.

@alallema alallema changed the title Key changes Apply key changes Jun 16, 2022
@alallema alallema added the breaking-change The related changes are breaking for the users label Jun 16, 2022
@alallema alallema requested a review from bidoubiwa June 16, 2022 12:08
Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this method:

def get_key(self, key: str) -> Dict[str, Any]:

the variable name key should be change to keyOrUid and the comment above should be updated accordingly

@alallema
Copy link
Contributor Author

In this method:

def get_key(self, key: str) -> Dict[str, Any]:

the variable name key should be change to keyOrUid and the comment above should be updated accordingly

Sorry this PR is not ready yet

@alallema alallema marked this pull request as ready for review June 23, 2022 13:19
@alallema alallema requested a review from bidoubiwa June 23, 2022 13:20
Copy link
Contributor

@bidoubiwa bidoubiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@alallema alallema merged commit 8015bf8 into bump-meilisearch-v0.28.0 Jun 24, 2022
@alallema alallema deleted the key_changes branch June 24, 2022 11:10
bors bot added a commit that referenced this pull request Jul 11, 2022
472: Changes related to the next Meilisearch release (v0.28.0) r=alallema a=meili-bot

Related to this issue: meilisearch/integration-guides#205

This PR:
- gathers the changes related to the next Meilisearch release (v0.28.0) so that this package is ready when the official release is out.
- should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases).
- might eventually contain test failures until the Meilisearch v0.28.0 is out.

⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.28.0) is out.

_This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/master/guides/pre-release-week.md) purpose._

Done:
- #474
- #475
- #476 
- #477 
- #478 
- #479
- #481
- #484
- #489

Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Co-authored-by: Amélie <alallema@users.noreply.github.com>
Co-authored-by: alallema <amelie@meilisearch.com>
bors bot added a commit that referenced this pull request Jul 11, 2022
493: Update version for the next release (v0.19.0) r=alallema a=alallema

This version makes this package compatible with Meilisearch v0.28.0 🎉
Check out the changelog of [Meilisearch v0.28.0](https://github.com/meilisearch/meilisearch/releases/tag/v0.28.0) for more information on the changes.

## 💥 Breaking changes

- `update_key()` can update **only** `name` and `description` fields. #477
- `get_tasks()` has additional parameters for filtering:: `type`, `status` and `indexUid`. #476
- `client.get_tasks(...)` and `index.get_tasks()` now returns the following fields: `results`, `limit`, `from`, `next`.#476
- `index.search` changes in the response `fields`: #478
    - `nbHits` replaced with `estimatedTotalHits`
    - `exhaustiveNbHits` is deleted
    - `exhaustiveFacetsCount` is deleted
    - `matches` renamed `showMatchesPosition`
    - `facetsDistribution` response parameter is renamed `facetDistribution`.
- `index.search` changes in the request parameters:  #478
    - `matches` renamed `showMatchesPosition`
    - `facetsDistribution` request parameter is renamed `facets`.
- `index.get_documents()` request parameters: #481
  - `attributesToRetrieve` replaced with `fields`.
- `client.get_indexes` and `client.get_raw_indexes` now return the following fields: `results`, `limit`, `offset`, `total`. #478
- `index.get_documents` and `client.get_documents` now return the following fields: `results`, `limit`, `offset`, `total`. #481
- `index.get_documents` query parameter `attributesToRetrieve` is now called `fields` #481
- `client.get_dump_status` and `wait_for_dump_creation` have been removed #479
- `client.create_dump()` now returns tasks, similar to what add_documents or create_index returns #479
- `client.generate_tenant_token(api_key_uid, search_rules, expires_at)` has now a mandatory `api_key_uid` parameter which should contain the uid of a specific API key. #484

## 🚀 Enhancements

- `index.get_tasks` and `client.get_tasks` accept pagination metadata, added `limit` (default: 20), `from`. #476
- `client.get_indexes` accept pagination metadata, added `limit` (default: 20) and `offset` (default: 0). #478
- `client.get_keys` accept pagination metadata, added `limit` (default: 20) and `offset` (default: 0). #477
- `client.get_key(key_or_uid)` can now also find keys based on their key uid. #477
- `client.create_key(options)` lets you specify a custom uid (optionally) to create a new Key. #477
- `index.get_documents` now accepts pagination parameters: `limit` (default: 20) and `offset` (default: 0). #481


Co-authored-by: alallema <amelie@meilisearch.com>
Co-authored-by: Amélie <alallema@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants