-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 in UI #75968
Conversation
This is a very faithful duplication of the cold phase. We are also excluding the snapshot action as well as the unfollow action as these are features that require higher than basic license privilege.
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
@elasticmachine merge upstream |
Hi @jloleysens , |
<Fragment> | ||
{phaseData.phaseEnabled ? ( | ||
<Fragment> | ||
<MinAgeInput<FrozenPhaseInterface> |
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.
MinAgeInput
's props are currently typed to accept warm, cold and delete phases. I'm not sure why the type check is not picking it up, but it might be good to add frozen phase to props generics.
/> | ||
<EuiSpacer /> | ||
|
||
<NodeAllocation<FrozenPhaseInterface> |
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.
Similar here, the props generics don't include frozen phase, but type check is not showing it.
...plugins/index_lifecycle_management/public/application/services/policies/policy_validation.ts
Outdated
Show resolved
Hide resolved
...plugins/index_lifecycle_management/public/application/services/policies/policy_validation.ts
Show resolved
Hide resolved
@elasticmachine merge upstream |
- also fixed TS error introduced after TS v4 upgrade (delete)
@yuliacech Thanks for the review and great catch on frozen phase validation! I've addressed your PR feedback, would you mind taking another look? I did a slight restructure to the phase types. Because there is so much overlap I thought it would be easiest to use inheritance for the phase interfaces. So now when we create a new "shared" form UI component when can just extend the relevant phases and structurally the phases that extend that type should fit into the component type requirements. Let me know what you think! |
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.
Hi @jloleysens ,
Great addition to policy types with common phase interfaces! Tested locally and all looks good to me.
I just found a copy-paste error from my commit, so I wont block you on it. But if you want to fix it with this PR, here is the info: both validateColdPhase
and validateFrozenPhase
when checking phase.selectedMinimumAge
actually setting phaseErrors.phaseIndexPriority
.
Thanks Yulia! I will include the fix and merge once CI is green. |
} | ||
} | ||
|
||
if ( |
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 would love to see these kinds of rules extracted into functions that have descriptive names, a big block comment explaining the intention (with links to relevant docs), and then covered with unit tests to define the desired behavior. I feel like this would make the code easier to scan, and it'd also be easier to dig into them to understand the why behind these rules. Anybody else feel similarly?
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.
That would be indeed very helpful 👍
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 agree, I think we should also move the files to directory called lib
in that process that lives in application
. For now, the logic is a carbon-copy of that for cold phase, so at least we know it has been working. I will open an issue for this!
@elasticmachine merge upstream |
1 similar comment
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
* ILM public side changes to support frozen phase This is a very faithful duplication of the cold phase. We are also excluding the snapshot action as well as the unfollow action as these are features that require higher than basic license privilege. * added "frozen" to the server side schema * add frozen phases component * fix i18n and update jest tests * Slight restructuring to phase types and fix copy paste issues. - also fixed TS error introduced after TS v4 upgrade (delete) * fix hot phase type and remove type constraint from error messages * update validation logic Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…s-for-710 * 'master' of github.com:elastic/kibana: (43 commits) [APM] Chart units don't update when toggling the chart legends (elastic#74931) [ILM] Add support for frozen phase in UI (elastic#75968) Hides advanced json for count metric (elastic#74636) add client-side feature usage API (elastic#75486) [Maps] add drilldown support map embeddable (elastic#75598) [Enterprise Search] Request handler refactors/enhancements + update existing routes to use shared handler (elastic#76106) [Resolver] model `location.search` in redux (elastic#76140) [APM] Prevent imports of public in server code (elastic#75979) fix eslint issue skip flaky suite (elastic#76223) [APM] Transaction duration anomaly alerting integration (elastic#75719) [Transforms] Avoid using "Are you sure" (elastic#75932) [Security Solution][Exceptions] - Fix bug of alerts not updating after closure from exceptions modal (elastic#76145) [plugin-helpers] improve 3rd party KP plugin support (elastic#75019) [docs/getting-started] link to yarn v1 specifically (elastic#76169) [Security_Solution][Resolver] Resolver loading and error state (elastic#75600) Fixes App Search documentation links (elastic#76133) Fix alerts unable to create / update when the name has trailing whitepace(s) (elastic#76079) [Resolver] Fix useSelector usage (elastic#76129) [Enterprise Search] Migrate util and components from ent-search (elastic#76051) ... # Conflicts: # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/data_tier_allocation/node_allocation.tsx # x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.tsx # x-pack/plugins/index_lifecycle_management/public/application/services/policies/types.ts # x-pack/plugins/index_lifecycle_management/public/application/services/policies/warm_phase.ts
* ILM public side changes to support frozen phase This is a very faithful duplication of the cold phase. We are also excluding the snapshot action as well as the unfollow action as these are features that require higher than basic license privilege. * added "frozen" to the server side schema * add frozen phases component * fix i18n and update jest tests * Slight restructuring to phase types and fix copy paste issues. - also fixed TS error introduced after TS v4 upgrade (delete) * fix hot phase type and remove type constraint from error messages * update validation logic Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Support configuring the frozen phase in both server and UI of ILM. This also updates the index management plugins extension to support querying for "frozen" phase in the index table.
How to test
1 second
) so that you do not have to wait for phase rollover too long.Make sure to set this back to the default of
10m
so that ILM doesn't continue doing unnecessary work after testing.What you should see in index management is new indices being created every 5 seconds as rollover happens and they should have the "Frozen" label applied to them in the index management UI.
Fix elastic/elasticsearch#61345
Screenshots
Checklist
Delete any items that are not applicable to this PR.