-
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
[Reporting] New UI for migrating reporting indices ILM policy #103853
Conversation
* restructured files for the policy manager code * re-added the IlmPolicyStatusResponse interface
in one * added ilm policy context and context for api client * added es ui shared so we can use userequest
…ermining when to show ilm-policy link
@elasticmachine merge upstream |
Pinging @elastic/kibana-app-services (Team:AppServices) |
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
…-policy-2 * 'master' of github.com:elastic/kibana: [Reporting] Reintroduce "ILM policy for managing reporting indices" (elastic#103850) [Security Solution][Endpoint] Allow activity log scrolling on small screens (elastic#103852) Allow zero (0) to unset unenroll_timeout field (elastic#103790) [TSVB] Metric count is depicted as `-` instead of 0 (elastic#103717) [Query] Es query/field base (elastic#103177) Remove add data button from nav (elastic#103810) Fix telemetry advanced setting style (elastic#103838) [Transform] Fix default naming and sorting fields suggestion for `top_metrics` agg (elastic#103690) [APM] use conventional error rate color for correlations (elastic#103500) # Conflicts: # x-pack/plugins/reporting/server/lib/store/store.ts
@elasticmachine merge upstream |
onMigrationDone(); | ||
toasts.addSuccess({ title: i18nTexts.migrateSuccessTitle }); | ||
} catch (e) { | ||
toasts.addError(e, { title: i18nTexts.migrateErrorTitle }); |
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.
toasts.addError(e, { title: i18nTexts.migrateErrorTitle }); | |
toasts.addError(e, { | |
title: i18nTexts.migrateErrorTitle, | |
toastMessage: e.body?.message, | |
}); |
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.
Just a small suggestion on showing more info about the error in the toast message
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.
This is great - I'm really happy with how this turned out.
I tested the default behavior, and it works well.
I also tested what happens when there is a custom ILM policy for reporting in place before Kibana runs with this change.
(I had to do some fiddling with the code to prevent kibana-reporting
policy from being set, which is already happening in master but not 7.x)
- Create a custom ILM policy, link it to an index template, create a report. The list of policies should show 1 linked index.
- Run Kibana with this change. The new
kibana-reporting
policy is created:
- Go to Stack Management > Reporting. You see the "Reporting indices are not managed by the same ILM policy" notice.
- Click the "Migrate Indices" button. A success toast message pops up.
- Back in the ILM listing,
kibana-reporting
is linked to 1 index and the custom policy is linked to 0
This is what I expected should happen - there should only be 1 policy for the indices.
Then I tried:
- Delete the current reporting index
- Generate another report
- In the ILM policy listing, the
kibana-reporting
policy is the only one that shows its linked to an index
Big 👍 !!
@elasticmachine merge upstream |
Any follow up feedback will be handled in follow up PRs! |
💔 Backport failed
To backport manually run: |
…c#103853) * revert revert * wip; first iteration of server-side functionality * wip; public side code started. using the new ilm policy status endpoint * * refactored ReportingIlmPolicyManager -> IlmReportingManager * restructured files for the policy manager code * re-added the IlmPolicyStatusResponse interface * added the ability to use useRequest * * removed extra server-side endpoint, we do both migration steps in one * added ilm policy context and context for api client * added es ui shared so we can use userequest * added working link to ILM policy * refactor of the migration route response (again), added logic for determining when to show ilm-policy link * fix type issues and refactor to use testbed pattern for report listing component * added tests for base cases of ilm policy banner * remove non-existent prop * added minor fixes (handling 404 from ES) and added API integration tests * resolve merge conflict and remove unused file * update toast error message Co-authored-by: Kibana Machine <[email protected]>
… (#104312) * revert revert * wip; first iteration of server-side functionality * wip; public side code started. using the new ilm policy status endpoint * * refactored ReportingIlmPolicyManager -> IlmReportingManager * restructured files for the policy manager code * re-added the IlmPolicyStatusResponse interface * added the ability to use useRequest * * removed extra server-side endpoint, we do both migration steps in one * added ilm policy context and context for api client * added es ui shared so we can use userequest * added working link to ILM policy * refactor of the migration route response (again), added logic for determining when to show ilm-policy link * fix type issues and refactor to use testbed pattern for report listing component * added tests for base cases of ilm policy banner * remove non-existent prop * added minor fixes (handling 404 from ES) and added API integration tests * resolve merge conflict and remove unused file * update toast error message Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
I think we want to avoid overloading the term migrate, since that action has a specific meaning within the context of ILM. Instead, I'd focus on applying the new policy:
For the success toast, I'd focus on the resolution of the problem:
I'd specify "reporting" in the edit link--without the context of the migration prompt, it seems too generic:
|
Summary
This contribution adds new UI to the reporting plugin for guiding users to migrate their reporting indices to the reporting-provided ILM policy. Introduced in #103850.
How to test
Creating ILM policy for managing reporting indices...
if this is the first time starting with the new changes. Subsequent starts should contain a debug callout that this step is being skipped.kibana-reporting
ILM policy in the bottom right), clicking it should migrate all reporting indices to use the reporting ILM policy.kibana-reporting
ILM policy, can be done through the ILM policy UINotes
Screenshots
Call-to-action to migrate reporting indices
Successful migration of reporting indices
ILM policy exists, but migration is still needed
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
kibana-reporting
and that there is a bug in our code that will re-create the policy. Further mitigations will be achieved by adding a functional API test