Skip to content
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

[ILM] Added readonly field in hot phase #85419

Merged
merged 8 commits into from
Dec 14, 2020

Conversation

yuliacech
Copy link
Contributor

@yuliacech yuliacech commented Dec 9, 2020

Summary

Fixes #82880.
This PR adds readonly action to hot and warm phases. Default is disabled and in hot phase it's only allowed if rollover is enabled.

Screenshot

Screenshot 2020-12-10 at 13 55 44

Checklist

Release note

Index Lifecycle Management app now includes readonly action.

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@yuliacech yuliacech added Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.11.0 v8.0.0 release_note:enhancement labels Dec 10, 2020
@yuliacech yuliacech marked this pull request as ready for review December 10, 2020 13:13
@yuliacech yuliacech requested a review from a team as a code owner December 10, 2020 13:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Great work @yuliacech! Thanks for adding support for this action. Tested locally and everything worked as expected. I left a couple nits, but nothing blocking.

title={
<h3>
<FormattedMessage
id="xpack.indexLifecycleMgmt.editPolicy.readonly.text"
Copy link
Contributor

Choose a reason for hiding this comment

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

Per the i18n guidelines, I think the end of this id should be something like ...editPolicy.readonlyTitle

@@ -60,9 +60,16 @@ export const createSerializer = (originalPolicy?: SerializedPolicy) => (
if (_meta.hot.bestCompression && hotPhaseActions.forcemerge) {
hotPhaseActions.forcemerge.index_codec = 'best_compression';
}

if (_meta.hot.readonlyEnabled) {
hotPhaseActions.readonly = hotPhaseActions.readonly ?? {};
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this always equal {}, or is it possible to pass options to the readonly action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, the readonly action is always empty, but I thought we should not overwrite the existing object in case ES will add any new properties.

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

kibanamachine and others added 5 commits December 14, 2020 06:22
…ections/edit_policy/components/phases/shared_fields/readonly_field.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
…ections/edit_policy/form/schema.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
…ections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
@yuliacech
Copy link
Contributor Author

Thanks a lot for your review and suggestions, @alisonelizabeth ! :)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexLifecycleManagement 139 140 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexLifecycleManagement 245.8KB 248.2KB +2.4KB

Distributable file count

id before after diff
default 47129 47889 +760

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@yuliacech yuliacech merged commit 8858749 into elastic:master Dec 14, 2020
yuliacech added a commit to yuliacech/kibana that referenced this pull request Dec 14, 2020
* [ILM] Added readonly field in hot phase

* [ILM] Added readonly field in warm phase

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/readonly_field.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/schema.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Updated labels for the form

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
yuliacech added a commit that referenced this pull request Dec 14, 2020
* [ILM] Added readonly field in hot phase

* [ILM] Added readonly field in warm phase

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/readonly_field.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/schema.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/hot_phase/hot_phase.tsx

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Updated labels for the form

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
@yuliacech yuliacech deleted the ilm_read_only branch February 24, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ILM release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for readonly action in ILM policy hot phase
4 participants