Skip to content

HLRC: Add Get Lifecycle Policy API to HLRC#33323

Merged
AthenaEryma merged 5 commits intoelastic:index-lifecyclefrom
AthenaEryma:ilm-hlrc-get
Sep 7, 2018
Merged

HLRC: Add Get Lifecycle Policy API to HLRC#33323
AthenaEryma merged 5 commits intoelastic:index-lifecyclefrom
AthenaEryma:ilm-hlrc-get

Conversation

@AthenaEryma
Copy link
Copy Markdown
Contributor

Adds Request and Reponse classes for accessing lifecycle policies.
Changes existing tests to use these classes where appropriate.
Sets up SPI configuration to allow parsing *Actions from XContent.

Relates to #33100

Adds Request and Reponse classes for accessing lifecycle policies.
Changes existing tests to use these classes where appropriate.
Sets up SPI configuration to allow parsing *Actions from XContent.
@AthenaEryma AthenaEryma added the :Data Management/ILM+SLM DO NOT USE. Use ":StorageEngine/ILM" or ":Distributed Coordination/SLM" instead. label Aug 31, 2018
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra

Copy link
Copy Markdown
Contributor

@colings86 colings86 left a comment

Choose a reason for hiding this comment

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

LGTM but maybe @hub-cap should also have a look before we merge since this adds some SPI stuff I'm not so familiar with

@hub-cap
Copy link
Copy Markdown
Contributor

hub-cap commented Sep 4, 2018

ill have a look today

@hub-cap
Copy link
Copy Markdown
Contributor

hub-cap commented Sep 4, 2018

+1 to using SPI for the custom XContent. cc @talevy who was also asking me about this the other day.

Copy link
Copy Markdown
Contributor

@hub-cap hub-cap left a comment

Choose a reason for hiding this comment

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

I think it would make sense to create a ILM SPI provider instead of a generic one, or else I might end up splitting it anyway :D

}

@Override
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you need this? I dont see it being used anywhere.

Copy link
Copy Markdown
Contributor Author

@AthenaEryma AthenaEryma Sep 4, 2018

Choose a reason for hiding this comment

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

It's used to leverage AbstractXContentTestCase for testing parsing in GetLifecyclePolicyResponseTests. If there's a better way of doing that, please let me know!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I dont have a good answer for this yet. While we can totally test this, the value in the server -> client.fromXContent is greater than just testing the client.toXContent -> client.fromXContent. I think these kinds of tests are not really providing much value, and we also test the former in the IT tests.

@AthenaEryma
Copy link
Copy Markdown
Contributor Author

AthenaEryma commented Sep 7, 2018

@elasticmachine retest this please

The failure is not related to anything this PR touches and does not reproduce locally.

@AthenaEryma AthenaEryma merged commit 008e64b into elastic:index-lifecycle Sep 7, 2018
AthenaEryma added a commit that referenced this pull request Sep 8, 2018
Adds Request and Reponse classes for accessing lifecycle policies.
Changes existing tests to use these classes where appropriate.
Sets up SPI configuration to allow parsing *Actions from XContent.
@AthenaEryma AthenaEryma deleted the ilm-hlrc-get branch December 7, 2018 04:57
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants