Throw exception for unsupported values type in Alias#124737
Throw exception for unsupported values type in Alias#124737elasticsearchmachine merged 9 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
|
ping @dakrone |
dakrone
left a comment
There was a problem hiding this comment.
Thanks for opening this @mushao999, it looks pretty good. Would you mind adding a test for this to …/indices.put_alias/10_basic.yml that ensures that a bad request is returned? That way we don't accidentally undo this in the future without checking it.
|
buildkite test this |
yamlRestTest case added @dakrone |
|
Please also review this one , thanks @dakrone |
|
buildkite test this |
|
@dakrone |
|
buildkite test this |
After creating index with alias using the following request
we got the following result for get index request:
The
is_write_indexfield is missing because string boolean value is not supported for this filed andno warning message showed, which will mislead the users.In #120453 I open a PR to let the createIndex API support string boolean values for
is_write_indexfield, but @dakrone think it's better to be strict about boolean values.So I open this PR to let the Alias class throw exception for the unsupport value type to avoid the slience swallowing of this case.