Skip to content

[ML] Allow stopping DF analytics whose config is missing #56360

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

Conversation

dimitris-athanasiou
Copy link
Contributor

@dimitris-athanasiou dimitris-athanasiou commented May 7, 2020

It is possible that the config document for a data frame
analytics job is deleted from the config index. If that is
the case the user is unable to stop a running job because
we attempt to retrieve the config and that will throw.

This commit changes that. When the request is forced,
we do not expand the requested ids based on the existing
configs but from the list of running tasks instead.

It is possible that the config document for a data frame
analytics job is deleted from the config index. If that is
the case the user is unable to stop a running job because
we attempt to retrieve the config and that will throw.

This commit changes that. When the request is forced,
we do not expand the requested ids based on the existing
configs but from the list of running tasks instead.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core (:ml)

Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

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

LGTM

@dimitris-athanasiou
Copy link
Contributor Author

Ah, I didn't notice the "Set" type, so the code was correct. Anyway, thanks for adding a test!

@przemekwitek Somehow I can't reply to your comment, so I'll reply here. The code was not correct. I switched it to use a set instead of a list to fix the problem. Well spotted once more!

@dimitris-athanasiou dimitris-athanasiou merged commit f6acecd into elastic:master May 8, 2020
@dimitris-athanasiou dimitris-athanasiou deleted the allow-stopping-df-analytics-with-missing-config branch May 8, 2020 09:23
dimitris-athanasiou added a commit that referenced this pull request May 8, 2020
#56408)

It is possible that the config document for a data frame
analytics job is deleted from the config index. If that is
the case the user is unable to stop a running job because
we attempt to retrieve the config and that will throw.

This commit changes that. When the request is forced,
we do not expand the requested ids based on the existing
configs but from the list of running tasks instead.

Backport of #56360
dimitris-athanasiou added a commit to dimitris-athanasiou/elasticsearch that referenced this pull request May 8, 2020
Force stopping a DF analytics job whose config exists and that
is stopped should succeed. This was broken by elastic#56360.

Closes elastic#56414
dimitris-athanasiou added a commit that referenced this pull request May 8, 2020
Force stopping a DF analytics job whose config exists and that
is stopped should succeed. This was broken by #56360.

Closes #56414
dimitris-athanasiou added a commit that referenced this pull request May 8, 2020
…#56424)

Force stopping a DF analytics job whose config exists and that
is stopped should succeed. This was broken by #56360.

Closes #56414

Backport of #56421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants