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] Add support for frozen phase #93068

Merged
merged 34 commits into from
Mar 10, 2021
Merged

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Mar 1, 2021

This PR adds support for the frozen phase and the frozen tier in ILM. The frozen phase is following the same rules as the cold phase with the exception that the frozen phase defaults searchable_snapshot.storage to shared_cache where in cold phase it is full_copy.

License

Frozen phase has only one action: searchable snapshot. As searchable snapshot requires the entreprise license, the frozen phase is only visible for users with that license. In basic license the frozen phase is not shown.

Screenshot 2021-03-10 at 10 23 23

How to test

  • Create a new ILM policy, the frozen phase should be disabled
  • Enable the frozen phase
  • Create searchable snapshot should be disabled. (In cloud it should be enabled) by default
  • There should be a "More option" button to access the storage option
  • Make sure the advanced settings work as expected
  • Check that the "Sow request" correctly serializes the policy and the frozen phase

To simulate that Kibana runs in cloud context, add the following in the kibana.dev.yml

xpack.cloud.id: 'eastus2.azure.elastic-cloud.com:9243$59ef636c6917463db140321484d63cfa$a8b109c08adc43279ef48f29af1a3911'
xpack.cloud.deploymentUrl: 'https://cloud.elastic.co/deployments/resolve/cluster/eastus2/9243$59ef636c6917463db140321484d63cfa/'

Screenshot 2021-03-10 at 15 40 01

Screenshot 2021-03-04 at 12 48 51

Screenshot 2021-03-10 at 15 45 36

Release note

You can now configure the frozen phase in your index lifecycle policy. This new data tier is optimized for maximum cost savings.

@sebelga sebelga added Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.13.0 v8.0.0 labels Mar 1, 2021
@sebelga sebelga marked this pull request as ready for review March 4, 2021 12:57
@sebelga sebelga requested review from a team as code owners March 4, 2021 12:57
@elasticmachine
Copy link
Contributor

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

@sebelga sebelga requested a review from yuliacech March 4, 2021 12:58
Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Thanks @sebelga! I left some copy suggestions. Let me know if you have any questions.

<EuiSpacer />
<FrozenPhase />

<EuiSpacer />
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a spacer between frozen and delete phases makes the connecting line go beyond frozen phase:
Screenshot 2021-03-04 at 17 46 03
I think this spacer needs to go into delete phase to fix it. There is an issue open in EUI repo to address 'gutter size' between 'comment items' but it is not being worked on currently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved to the DeletePhase and it indeed fixed the issue.

Screenshot 2021-03-05 at 10 47 35

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this, @sebelga!

align?: 'left' | 'right';
}

export const MoreLessSection: FunctionComponent<Props> = ({ align = 'left', children }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this component can be replaced with EuiAccordion, WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not a huge fan of the accordion and the animation in this case. I prefer the snappiness of an actual toggle

accordion_vs_custom

Copy link
Contributor

Choose a reason for hiding this comment

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

I see your reasoning here @sebelga, but then having 2 different animations make the UI inconsistent.
Should we change Advanced settings to the new component too?
I also have concerns about built-in a11y features that handle this kind of interaction in accordion. There are attributes like aria-controls, aria-expanded, role, aria-labelledby that we need to implement in the new component as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think Yulia raises great points about accessibility. My advice would be to leverage EUI as much as possible, and then drive changes at the EUI level to support the behavior you want @sebelga. For example, ask for a timing or animation prop to be added to EuiAccordion. This will have the benefit of getting input from the design team, it will share the new behavior to all EUI consumers to reduce the potential for duplication, and it will ensure consistency throughout our UIs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Big +1 to using EUI components and requesting desired enhancements on their repo.

Copy link
Contributor

@ryankeairns ryankeairns Mar 5, 2021

Choose a reason for hiding this comment

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

An additional future consideration here... there is an existing Advanced setting to 'Disable animations' globally. Imagine a future - with user settings - where an individual can toggle this as their personal preference.

I only recently learned of this setting and just now tried it out - as a quick test, it removed the animation from the accordions in the Canvas sidebar.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point about accessibility @yuliacech and leverage EUI effort on this, I will replace the component with the accordion 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is an issue with the <EuiAccordion /> that clips the combox helptext after the first line. I've opened an issue for it (elastic/eui#4623). Should we block this PR until the issue is solved?

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Hi @sebelga, thanks a lot for working on this!
Left 2 comments in the code, curios what you think.

sebelga and others added 2 commits March 5, 2021 10:29
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Hi @sebelga,
thanks a lot for working on this! I re-tested locally and all worked for me. Left a couple of comments in the code, but nothing blocking.

@sebelga
Copy link
Contributor Author

sebelga commented Mar 9, 2021

Thanks for the review @yuliacech ! I addressed your last requests for change 👍

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

Thanks for reaching out offline @sebelga. I've included some updated copy for the searchable snapshots field descriptions.

@dakrone Let me know if you have any feedback on this copy. Thanks!

Searchable snapshot for hot and cold tiers

Screen Shot 2021-03-09 at 2 47 28 PM

Take a snapshot of your data and mount it as a searchable snapshot. <Learn more>.

The <Learn more> link remains the same.

Searchable snapshot for frozen tiers

Screen Shot 2021-03-09 at 2 48 53 PM

Take a snapshot of your data and mount it as a searchable snapshot. To reduce costs, only a cache of the snapshot is mounted in the frozen tier. <Learn more>.

<Learn more> should link to https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots.html#searchable-snapshots-shared-cache

@sebelga
Copy link
Contributor Author

sebelga commented Mar 10, 2021

Thanks for the quick update @jrodewig ! Your suggestions look good to me.

Screenshot 2021-03-10 at 09 54 24

note: hot phase has the same description for searchable snapshot as cold phase

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexLifecycleManagement 195 198 +3

Async chunks

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

id before after diff
indexLifecycleManagement 242.0KB 251.0KB +9.0KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
indexLifecycleManagement 53.3KB 53.5KB +133.0B

History

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

@sebelga sebelga merged commit a632f3f into elastic:master Mar 10, 2021
jloleysens added a commit that referenced this pull request Mar 11, 2021
…-action

* 'master' of github.com:elastic/kibana: (43 commits)
  [Console] Update copy when showing warnings in response headers (#94270)
  [TSVB] Type public code. Step 1 (#93231)
  [ML] Functional tests - stabilize slider value selection (#94313)
  skip another suite blocking es promotion (#94367)
  [Security Solution] Eliminates a redundant external link icon (#94194)
  skip another suite blocking es promotion (#94367)
  [App Search] Role mappings migration part 1 (#94346)
  [Security Solution][Detections] Fix flaky indicator enrichment tests (#94241)
  [Workplace Search] Deduplicate icons (#94359)
  [ML] Add latest transform to intro text (#94039)
  skip test failing es promotion (#94367)
  [Maps] convert elasticsearch_utils to TS (#93984)
  [Security_Solution][Telemetry] - Update endpoint usage to use agentService (#93829)
  [Security Solution][Exceptions] Fixes OS adding method for exception enrichment (#94343)
  [ILM] Add support for frozen phase (#93068)
  [App Search] Fixed 2 relevance tuning bugs (#94312)
  remove `try` auth mode (#94287)
  Removing resolver functional tests (#94331)
  migrate warning mixin to core (#94273)
  [App Search] Add routes for Role Mappings (#94221)
  ...

# Conflicts:
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/cold_phase/cold_phase.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/phase/phase.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/searchable_snapshot_field/searchable_snapshot_field.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/configuration_issues_context.tsx
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.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants