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

[Transform] Fix _reset API when called with force=true on a failed transform #106574

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

przemekwitek
Copy link
Contributor

@przemekwitek przemekwitek commented Mar 20, 2024

The documentation of _reset API states:

Before you can reset the transform, you must stop it; alternatively, use the force query parameter.

Unfortunately, for a failed transform this is not true. The force parameter does not do anything and the _reset API fails anyway.

This PR fixes this by passing the value of force parameter from _reset request to _stop request.

Additionally, this PR moves the getTransformTasks() method to a common TransformRestTestCase class from where it can be used by multiple tests.

Fixes #106573

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @przemekwitek, I've created a changelog YAML for you.

@elasticsearchmachine elasticsearchmachine added the Team:ML Meta label for the ML team label Mar 20, 2024
@elasticsearchmachine
Copy link
Collaborator

Hi @przemekwitek, I've updated the changelog YAML for you.

@przemekwitek przemekwitek changed the title [Transform] Fix _reset API when called with force=true [Transform] Fix _reset API when called with force=true on a failed transform Mar 20, 2024
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

@przemekwitek przemekwitek merged commit 2120683 into elastic:main Mar 21, 2024
14 checks passed
@przemekwitek przemekwitek deleted the fix_reset_force branch March 21, 2024 09:58
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :ml/Transform Transform Team:ML Meta label for the ML team v8.13.1 v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Transform] _reset API does not make good use of force parameter
3 participants