-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Throw exception for unsupported values type in Alias #124737
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
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
ping @dakrone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@dakrone |
After creating index with alias using the following request
we got the following result for get index request:
The
is_write_index
field 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_index
field, 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.