-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 searchable snapshot field #83783
Conversation
- added to both hot and cold - serializing into JSON payload
…t in the hot phase
@elasticmachine merge upstream |
- removed nested EuiFieldRow components in data allocation field - added SCSS files for data allocation field and searchable snapshot field
@elasticmachine merge upstream |
> | ||
{i18n.translate('xpack.indexLifecycleMgmt.editPolicy.searchableSnapshotCalloutBody', { | ||
defaultMessage: | ||
'Force merge, shrink, freeze and searchable snapshots are not allowed when this action is enabled in the hot phase.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Force merge, shrink, freeze and searchable snapshots are not allowed when this action is enabled in the hot phase.', | |
'Force merge, shrink, and freeze are not allowed when searchable snapshots are enabled in the hot phase.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The toggle itself indicates Use searchable snapshots, which I believe is "this action" in the description. If that's the case, then I think we can remove the first mention of searchable snapshots and replace "this action" with "searchable snapshots".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review here :). We still need to communicate that the searchable snapshot action in cold will also be disabled/disallowed - which what the origin "searchable_snapshot" text was trying to communicate 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we use the same message for both hot/cold phase?
Will the message for searchable snapshots in the cold phase be conditional on the setting in the hot phase? For example, if searchable snapshots are disabled in the hot phase and users are enabling this setting only in the cold phase, it seems odd to show them a message about enabling searchable snapshots in the hot phase.
Similarly, if enabled in the hot phase, we should show a different message in the cold phase indicating why searchable snapshots are disabled.
Enabled in hot phase, disabled in cold
Hot phase
[ x ] Create searchable snapshot
Force merge, shrink, and freeze are not allowed when searchable snapshots are enabled in the hot phase. Also, searchable snapshots will be disabled in the cold phase.
Cold phase
[ ] Create searchable snapshot
Searchable snapshots are disabled in the cold phase when already enabled in the hot phase.
Disabled in hot phase, enabled in cold
Hot phase
[ ] Create searchable snapshot
Cold phase
[ x ] Create searchable snapshot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we use the same message for both hot/cold phase?
This particular message only applies to setting searchable snapshot in the hot phase. Happy to add the additional message per your recommendation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on how the UI responds. When the user enables searchable snapshots in the hot phase, will the ability to enable them in the cold phase be greyed out or made unavailable (not displayed)? If the former, I think it might be helpful for users to know why that option is greyed out. We mention in the searchable snapshots description in the hot phase that snapshots will be disabled in the cold phase, but users could miss that mention.
I could go either way on this one, but I'm trying to think through the UX from the user's standpoint. If we remove the option for enabling searchable snapshots in the cold tier when that option is enabled in the hot tier, then users wouldn't have to question the option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah totally, I agree. I have updated the PR description with some new screenshots for the "disabled" version of the control in cold phase (it is a callout instead of just a disabled control).
'data-test-subj': 'searchableSnapshotToggle', | ||
label: i18n.translate( | ||
'xpack.indexLifecycleMgmt.editPolicy.searchableSnapshotsToggleLabel', | ||
{ defaultMessage: 'Use searchable snapshot' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ defaultMessage: 'Use searchable snapshot' } | |
{ defaultMessage: 'Create searchable snapshot' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users are creating and mounting the searchable snapshot, so I think that Create is more accurate here than Use.
{i18n.translate( | ||
'xpack.indexLifecycleMgmt.editPolicy.searchableSnapshotFieldDescription', | ||
{ | ||
defaultMessage: 'Take a snapshot of the index and mount it as a searchable snapshot.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that a bit more context here is useful.
Take a snapshot of the managed index in the selected repository and mount it as a searchable snapshot. Learn more
Where Learn more links to the searchable snapshots page: https://github.com/elastic/elasticsearch/blob/master/docs/reference/ilm/actions/ilm-searchable-snapshot.asciidoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggested changes that are mostly clarifications. Happy to review again when this PR emerges from the draft state.
@elasticmachine merge upstream |
@myasonik Thanks for taking a look! We are in the process of working through design feedback so things may yet change a little bit. I think adding a11y test coverage merits having it's own PR since this one has already grown considerably and we'd probably want to do any further work on this in follow up PRs. |
@mdefazio I mentioned in #83783 (comment) that the "Some actions have been disabled" callout seems overly prominent to me, considering that the user could happily and safely proceed through the form without ever reading that information. What are your thoughts on that? |
@elasticmachine merge upstream |
Thanks for the review @mdefazio
We can definitely do this in a follow up PR!
Yes we do. I thought the following alternative to a callout would work well:
Yes, this needs to be a single option.
I'd like to address this in a follow up PR as it will affect another field too.
This is really cool, which prop do we use on the combo box for his? |
…fields * 'master' of github.com:elastic/kibana: [ILM] Fix delete phase serialization bug (elastic#84870) chore(NA): removes auto install of pre-commit hook (elastic#83566) chore(NA): upgrade node-sass into last v4.14.1 to stop shipping old node-gyp (elastic#84935) [Alerting] Enables AlertTypes to define the custom recovery action groups (elastic#84408) [ML] Functional tests - add missing test data cleanup (elastic#84998) Migrate privilege/role/user-related operations to a new Elasticsearch client. (elastic#84641) # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/deserializer_and_serializer.test.ts # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/serializer/serializer.ts
Thanks for making the edits. I'm good with tackling the items you mentioned in separate PRs. One minor ask: Let's avoid using the help text for as many things as we are here: I'm good with going back to using a callout below to mention there are no snapshot repos found (similar to how you're doing it elsewhere as we discussed). @cjcenizal In regards to the prominence of the callout for items being disabled, one idea might be to move it to a tooltip after the switch—I'm not sure if this goes too far in hiding it though. In regards to this:
I think this will solve itself in follow-up PRs when the switches are moved to the left side as is typical with Here is a layout including some of this, but I believe most of this will be done in a follow-up PR. I will approve this one per the discussion with JL to make sure we can merge this and start tackling things in smaller chunks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with the understanding that minor polish items (and accessibility edits) will be done in smaller, follow-up PRs.
Looking good! I would suggest creating an issue(s) to track the feedback items that are being proposed for a follow-up PR. There's been some nice suggestions here, and it can be difficult to sort back through the thread later. Thanks |
Will do!
…On Fri, 04 Dec 2020, 16:40 Ryan Keairns, ***@***.***> wrote:
Looking good!
I would suggest creating an issue(s) to track the feedback items that are
being proposed for a follow-up PR. There's been some nice suggestions here,
and it can be difficult to sort back through the thread later. Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#83783 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6G67CEUN2QXADL4S5F2T3STD7G7ANCNFSM4T3HQYAA>
.
|
@elasticmachine merge upstream |
* Added server-side endpoint for getting list of repos * part one of client side changes: added searchable snapshot field - added to both hot and cold - serializing into JSON payload * make searchable snapshot field toggleable and require value when it is being used * fix typo in file name and remove whitespace * added searchable snapshot state context, wip * finished updating fields to show and hide based on searchable snapshot in the hot phase * hiding fields when searchable snapshots is enabled in hot - removed nested EuiFieldRow components in data allocation field - added SCSS files for data allocation field and searchable snapshot field * added translations and a first hot phase serialization test * appease type check and i18n * added cloud-specific behaviour for searchable snapshot default inlc. test * refactor snapshot state -> configuration issues as this a can be re-used for other issues * added configuration context file * hide replicas in cold if snapshotting * updated new field copy * update test coverage, test for hiding certain fields too * added license check to client side! * moved warning to below field again and moved hot phase searchable snapshot notice to right * make described form field lazy if needed * render field even when license requirement is not met * update serializer for removing searchable_snapshot field * handle 404 from ES when looking up * snapshot repos - we return an empty array * address license TODO * added tests for license check and removed license check HoC * fix legacy jest tests * added readme about legacy tests * updated jest tests and fix type issues * remove unused import * refactor component names to have "Field" at the end * refactor searchable snapshot to single interface def and add comment about force_merge_index option * address stakeholder feebdack and pr comments * update tests after latest changes * link to force merge * Revert "link to force merge" This reverts commit 6c714fb. * introduce advanced section to hot, warm and cold * added test for correctly deserializing delete phase, and added fix * remove unused variable * moved fields into advanced settings * move learn more copy below enable toggle * fix warm phase on rollover default * remove label space above rollover toggle * remove unused import * update test after fixing warm on rollover default * removed icons in callouts in searchable snapshot field, added ability to control field toggles * move callouts to description text * readd warning callouts to the searchable snapshot field * slight i18n adjustment * made callout for actions disabled a bit smaller * fix i18n Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Added server-side endpoint for getting list of repos * part one of client side changes: added searchable snapshot field - added to both hot and cold - serializing into JSON payload * make searchable snapshot field toggleable and require value when it is being used * fix typo in file name and remove whitespace * added searchable snapshot state context, wip * finished updating fields to show and hide based on searchable snapshot in the hot phase * hiding fields when searchable snapshots is enabled in hot - removed nested EuiFieldRow components in data allocation field - added SCSS files for data allocation field and searchable snapshot field * added translations and a first hot phase serialization test * appease type check and i18n * added cloud-specific behaviour for searchable snapshot default inlc. test * refactor snapshot state -> configuration issues as this a can be re-used for other issues * added configuration context file * hide replicas in cold if snapshotting * updated new field copy * update test coverage, test for hiding certain fields too * added license check to client side! * moved warning to below field again and moved hot phase searchable snapshot notice to right * make described form field lazy if needed * render field even when license requirement is not met * update serializer for removing searchable_snapshot field * handle 404 from ES when looking up * snapshot repos - we return an empty array * address license TODO * added tests for license check and removed license check HoC * fix legacy jest tests * added readme about legacy tests * updated jest tests and fix type issues * remove unused import * refactor component names to have "Field" at the end * refactor searchable snapshot to single interface def and add comment about force_merge_index option * address stakeholder feebdack and pr comments * update tests after latest changes * link to force merge * Revert "link to force merge" This reverts commit 6c714fb. * introduce advanced section to hot, warm and cold * added test for correctly deserializing delete phase, and added fix * remove unused variable * moved fields into advanced settings * move learn more copy below enable toggle * fix warm phase on rollover default * remove label space above rollover toggle * remove unused import * update test after fixing warm on rollover default * removed icons in callouts in searchable snapshot field, added ability to control field toggles * move callouts to description text * readd warning callouts to the searchable snapshot field * slight i18n adjustment * made callout for actions disabled a bit smaller * fix i18n Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Fix #83505
Adds functionality for configuring searchable snapshots in the policy UI.
How to test
yarn es snapshot -E path.repo=/tmp/es-snaps
yarn start
), go to the "Management" in Kibana and open "Index Lifecycle Policies"Notes
Screenshots
Hot phase
New collapsed with "advanced settings" section
Searchable snapshots disabled in advanced settings
Searchable snapshots enabled in hot phase with no repository created and information callout
Cold phase
disabled due to license
enabled in cold
Gif
Release note
The ILM policy UI now supports configuring searchable snapshot in the cold phase and in the hot phase.
Checklist
Delete any items that are not applicable to this PR.