Skip to content

[ML] fix empty body on post issue for datafeed _preview #73205

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

Merged
merged 2 commits into from
May 18, 2021

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented May 18, 2021

It is common practice to pass an empty body on a POST call. Consequently, a POST _ml/datafeed/<ID>/_preview could fail if the body is empty as we try to parse it while IGNORING the ID in the URL.

This commit fixes that bug.

closes #73206

@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label May 18, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

Copy link
Contributor

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM

@benwtrent
Copy link
Member Author

@elasticmachine update branch

@benwtrent benwtrent merged commit dfa5903 into elastic:master May 18, 2021
@benwtrent benwtrent deleted the feature/ml-fix-df-preview branch May 18, 2021 14:23
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request May 18, 2021
It is common practice to pass an empty body on a `POST` call. Consequently, a `POST _ml/datafeed/<ID>/_preview` could fail if the body is empty as we try to parse it while IGNORING the ID in the URL.

This commit fixes that bug.

closes elastic#73206
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request May 18, 2021
It is common practice to pass an empty body on a `POST` call. Consequently, a `POST _ml/datafeed/<ID>/_preview` could fail if the body is empty as we try to parse it while IGNORING the ID in the URL.

This commit fixes that bug.

closes elastic#73206
benwtrent added a commit that referenced this pull request May 18, 2021
)

It is common practice to pass an empty body on a `POST` call. Consequently, a `POST _ml/datafeed/<ID>/_preview` could fail if the body is empty as we try to parse it while IGNORING the ID in the URL.

This commit fixes that bug.

closes #73206
benwtrent added a commit that referenced this pull request May 18, 2021
)

It is common practice to pass an empty body on a `POST` call. Consequently, a `POST _ml/datafeed/<ID>/_preview` could fail if the body is empty as we try to parse it while IGNORING the ID in the URL.

This commit fixes that bug.

closes #73206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preview Datafeed API - Better Handling of Empty body + ID
4 participants