-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat: delete record endpoint #3337
Conversation
Co-authored-by: Francisco Aranda <francis@argilla.io>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think makes sense to return in the future a 422 when bulk_delete
with non-existing records.
Shouldn't we return 404 in that case? As we want to state that the introduced record IDs were not found, right? |
ad90ded
to
d73729f
Compare
54a17d4
to
717a776
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
# Description This PR adds one new endpoint for deleting records: - `DELETE /api/v1/records/{record_id}`: for removing a specific record given its ID. It's been needed to add a new method `delete_records` to the `SearchEngine` that will remove the records also from the index created for the dataset in Elastic Search. Closes #3310 **Type of change** - [x] New feature (non-breaking change which adds functionality) **How Has This Been Tested** Manually in a local environment and I've added unit tests. **Checklist** - [ ] I added relevant documentation - [x] follows the style guidelines of this project - [x] I did a self-review of my code - [ ] I made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I filled out [the contributor form](https://tally.so/r/n9XrxK) (see text above) - [x] I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --------- Co-authored-by: Francisco Aranda <francis@argilla.io> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
This PR adds one new endpoint for deleting records:
DELETE /api/v1/records/{record_id}
: for removing a specific record given its ID.It's been needed to add a new method
delete_records
to theSearchEngine
that will remove the records also from the index created for the dataset in Elastic Search.Closes #3310
Type of change
How Has This Been Tested
Manually in a local environment and I've added unit tests.
Checklist