Skip to content

[HLRC] Update Set Policy API to use Validatable#34248

Closed
AthenaEryma wants to merge 1 commit intoelastic:index-lifecyclefrom
AthenaEryma:ilm/update-set-policy
Closed

[HLRC] Update Set Policy API to use Validatable#34248
AthenaEryma wants to merge 1 commit intoelastic:index-lifecyclefrom
AthenaEryma:ilm/update-set-policy

Conversation

@AthenaEryma
Copy link
Copy Markdown
Contributor

Also reworks the tests for the Set Policy response object to use the new
XContent testing capabilities, rather than having to implement
ToXContent on the response object itself.

Also reworks the tests for the Set Policy response object to use the new
XContent testing capabilities, rather than having to implement
ToXContent on the response object itself.
@AthenaEryma AthenaEryma added >non-issue :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. labels Oct 2, 2018
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra

Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

LGTM, left one comment about copyInstance


private SetIndexLifecyclePolicyRequest copyInstance(final SetIndexLifecyclePolicyRequest original) {
SetIndexLifecyclePolicyRequest copy = new SetIndexLifecyclePolicyRequest(original.policy(), original.indices());
copy.indicesOptions(original.indicesOptions());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Doesn't this need to copy the timeouts also?

Copy link
Copy Markdown
Contributor Author

@AthenaEryma AthenaEryma Oct 3, 2018

Choose a reason for hiding this comment

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

It probably should to be strictly correct, but this made me check (since obviously this doesn't make the equals() test fail) and as far as I can tell, no (or very, very few) *Request classes that inherit the timeout parameters from a superclass check them in the .equals() method. Is that something we should be concerned about?

(cc @hub-cap)

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

Closing this PR as this API is being removed by #34304

@AthenaEryma AthenaEryma closed this Oct 4, 2018
@AthenaEryma AthenaEryma deleted the ilm/update-set-policy branch December 7, 2018 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. >non-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants