Skip to content

HLRC: Add Get Lifecycle Policy API to HLRC #33323

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

Merged
merged 5 commits into from
Sep 7, 2018

Conversation

gwbrown
Copy link
Contributor

@gwbrown gwbrown commented Aug 31, 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.

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.
@gwbrown gwbrown added the :Data Management/ILM+SLM Index and Snapshot lifecycle management label Aug 31, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
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
Contributor

hub-cap commented Sep 4, 2018

ill have a look today

@hub-cap
Copy link
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
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
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
Contributor Author

@gwbrown gwbrown 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
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.

@gwbrown
Copy link
Contributor Author

gwbrown commented Sep 7, 2018

@elasticmachine retest this please

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

@gwbrown gwbrown merged commit 008e64b into elastic:index-lifecycle Sep 7, 2018
gwbrown 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.
@gwbrown gwbrown 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 Index and Snapshot lifecycle management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants