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

Deprecate lenient parsing of bulk actions #78876

Merged
merged 28 commits into from
Nov 9, 2021

Conversation

arteam
Copy link
Contributor

@arteam arteam commented Oct 8, 2021

Make sure there are no arbitrary fields after an action declaration and that it gets properly closed by a curly bracket.

Resolves #43774

@arteam arteam force-pushed the bulk-action-sctrict-parsing branch 8 times, most recently from 2f2dc18 to 81b22c3 Compare October 11, 2021 09:28
@arteam arteam force-pushed the bulk-action-sctrict-parsing branch 4 times, most recently from a21de9e to f9abffa Compare October 11, 2021 10:29
@arteam arteam changed the title Be more strict about parsing of bulk actions Deperecate lenient parsing of bulk actions Oct 22, 2021
Make sure there are no arbitrary fields after an action declaration and
it gets closed by a curly bracket.

Add a deprecation warning for strict bulk action parsing
@arteam arteam marked this pull request as ready for review October 25, 2021 19:19
@arteam arteam added the Team:Distributed Meta label for distributed team label Oct 25, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@arteam arteam added the :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. label Oct 25, 2021
@arteam arteam changed the title Deperecate lenient parsing of bulk actions Deprecate lenient parsing of bulk actions Oct 25, 2021
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

I suggested some other ways that we accept invalid input. Could you add tests that assert that the new warnings are emitted too please?

@elastic elastic deleted a comment from elasticmachine Oct 27, 2021
@arteam arteam force-pushed the bulk-action-sctrict-parsing branch from 4fff9f6 to 6bbb5bc Compare October 27, 2021 19:06
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Looks great, I left only minor comments/questions.

arteam and others added 4 commits November 1, 2021 21:21
@arteam
Copy link
Contributor Author

arteam commented Nov 2, 2021

@elasticmachine update branch

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Code changes all LGTM, but since this adds deprecations I think we need to add docs about the change too. #80410 adds the deprecation docs files for 8.1.0 so you can either wait for that to be merged or else duplicate those files here (and I'll sort out any merge conflicts on my PR later).

@arteam
Copy link
Contributor Author

arteam commented Nov 9, 2021

@elasticmachine update branch

@arteam arteam merged commit 27fd66d into elastic:master Nov 9, 2021
@arteam arteam deleted the bulk-action-sctrict-parsing branch November 9, 2021 12:09
@arteam
Copy link
Contributor Author

arteam commented Nov 9, 2021

Thanks David!

DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Nov 10, 2021
Follow-up to elastic#78876 to rework the deprecation docs slightly.
@DaveCTurner
Copy link
Contributor

I would have preferred not to have merged this until the docs changes were reviewed and approved - it's hard to keep track of outstanding things to review otherwise. I opened #80580 to suggest alternative wording and revert the unnecessary docs formatting changes that this PR introduces.

DaveCTurner added a commit that referenced this pull request Nov 10, 2021
Follow-up to #78876 to rework the deprecation docs slightly.
elasticmachine pushed a commit to not-napoleon/elasticsearch that referenced this pull request Aug 15, 2022
Adds a mention of `Version.V_7_17_0` so that we don't forget to remove
this deprecated behaviour in the next major version.

Relates elastic#78876
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>deprecation :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. Team:Distributed Meta label for distributed team v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk REST API allows arbitrary fields after action
4 participants