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

Make feature reset compatible with action.destructive_requires_name: false #72363

Closed
droberts195 opened this issue Apr 28, 2021 · 2 comments · Fixed by #73017
Closed

Make feature reset compatible with action.destructive_requires_name: false #72363

droberts195 opened this issue Apr 28, 2021 · 2 comments · Fixed by #73017
Assignees
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team

Comments

@droberts195
Copy link
Contributor

droberts195 commented Apr 28, 2021

It has long been best practice to set action.destructive_requires_name: true and that is becoming the default in 8.0.

Currently if an end user runs the feature reset API they are likely to see this error response:

      "feature_name" : "machine_learning",
      "status" : "FAILURE",
      "exception" : {
        "type" : "exception",
        "reason" : "java.lang.IllegalArgumentException: Wildcard expressions or all indices are not allowed",
        "caused_by" : {
          "type" : "illegal_argument_exception",
          "reason" : "Wildcard expressions or all indices are not allowed"
        }
      }
    },

This problem occurs because the feature reset API is trying to delete wildcarded index patterns. The solution is to set action.destructive_requires_name: false, which is what our integration test suites do to avoid this problem, but is not great UX for an end user (and the error response does not make the solution clear).

It would be much friendlier to resolve the wildcard patterns to a list of concrete indices as suggested in point 2 of #71178 (comment), or else bypass the value of action.destructive_requires_name in some other way within the internals of the feature reset API implementation.

@droberts195 droberts195 added >enhancement :Core/Infra/Core Core issues without another label needs:triage Requires assignment of a team area label labels Apr 28, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Apr 28, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@markharwood markharwood removed the needs:triage Requires assignment of a team area label label Apr 28, 2021
@williamrandolph
Copy link
Contributor

I believe that resolving the wildcard patterns to a list of concrete indices is the way to go here. I'll try to get a PR out for that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants