Skip to content

Conversation

@PeteGillinElastic
Copy link
Member

Previously, the following classes of malformed input were deprecated but not rejected in the action lines of the a bulk request:

  • Missing closing brace;
  • Additional keys after the action (which were ignored);
  • Additional data after the closing brace (which was ignored).

They will now be considered errors and rejected.

The existing behaviour is preserved in v8 compatibility mode.

(N.B. The deprecation warnings were added in 8.1. The normal guidance to deprecate for a whole major version before removing does not apply here, since this was never a supported API feature. There is a risk to the lenient approach since it results in input being ignored, which is likely not the user's intention.)

Previously, the following classes of malformed input were deprecated but not rejected in the action lines of the a bulk request: - Missing closing brace; - Additional keys after the action (which were ignored); - Additional data after the closing brace (which was ignored). They will now be considered errors and rejected. The existing behaviour is preserved in v8 compatibility mode. (N.B. The deprecation warnings were added in 8.1. The normal guidance to deprecate for a whole major version before removing does not apply here, since this was never a supported API feature. There is a risk to the lenient approach since it results in input being ignored, which is likely not the user's intention.)
@PeteGillinElastic PeteGillinElastic added :Data Management/Indices APIs APIs to create and manage indices and templates >breaking labels Oct 30, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @PeteGillinElastic, I've created a changelog YAML for you. Note that since this PR is labelled >breaking, you need to update the changelog YAML to fill out the extended information sections.

@PeteGillinElastic PeteGillinElastic marked this pull request as ready for review October 30, 2024 14:05
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Oct 30, 2024
@PeteGillinElastic
Copy link
Member Author

The 8.17.0 / bwc-snapshot failure in CI appears to be because it's broken in main.

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, I left one comment. Thanks Pete!

Comment on lines 10 to 13
Previously, the following classes of malformed input were deprecated but not rejected in the action lines of the a
bulk request: missing closing brace; additional keys after the action (which were ignored); additional data after
the closing brace (which was ignored). They will now be considered errors and rejected.
impact: Users must provide well-formed input when using the bulk API
Copy link
Member

Choose a reason for hiding this comment

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

Can you mention that rest API compatibility can be used in this case, if they need the previous behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. I'm adding "They can request REST API compatibility with v8 to get the previous behaviour back as an interim measure."

@PeteGillinElastic PeteGillinElastic enabled auto-merge (squash) October 30, 2024 14:41
@PeteGillinElastic PeteGillinElastic merged commit ce3c354 into elastic:main Oct 30, 2024
15 of 16 checks passed
@PeteGillinElastic PeteGillinElastic deleted the bulk-api-disable-lenient-parsing branch October 30, 2024 15:52
jfreden pushed a commit to jfreden/elasticsearch that referenced this pull request Nov 4, 2024
Previously, the following classes of malformed input were deprecated but not rejected in the action lines of the a bulk request: - Missing closing brace; - Additional keys after the action (which were ignored); - Additional data after the closing brace (which was ignored). They will now be considered errors and rejected. The existing behaviour is preserved in v8 compatibility mode. (N.B. The deprecation warnings were added in 8.1. The normal guidance to deprecate for a whole major version before removing does not apply here, since this was never a supported API feature. There is a risk to the lenient approach since it results in input being ignored, which is likely not the user's intention.)
@leemthompo
Copy link
Contributor

@PeteGillinElastic is this PR relevant to the serverless changelog? [FYI this question is based on 9.0 breaking changes]

@PeteGillinElastic
Copy link
Member Author

@PeteGillinElastic is this PR relevant to the serverless changelog? [FYI this question is based on 9.0 breaking changes]

I think this depends on the policy for the serverless changelog. Previously, we issued a warning on this class of malformed input but ignored it; now, we reject it. It would only break serverless users if they'd been writing malformed input and ignoring the warnings.

Also, this change was made before serverless GA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>breaking :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team v9.0.0

4 participants