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

[Reporting] Add new ILM policy notice to deprecations service #100567

Closed

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented May 25, 2021

Summary

Continuation of #100130 and fix #81544

This contribution adds an integration with the deprecation service. The deprecation flags the new reporting policy and provides a "quick resolution" in the upgrade assistant which uses the new "PUT /deprecations" endpoint.

How to review

  1. Check the added copy for any obvious errors or wording issues (requires proper copy review)
  2. Start Kibana & ES on a trial license
  3. Add sample flight data
  4. Choose the Global Flight dashboard and choose Share > PDF Reports > Generate report
  5. Edit upgrade assistant to show deprecations UI. Open x-pack/plugins/upgrade_assistant/common/constants.ts and set:
export const UA_READONLY_MODE = false;
  1. Go to the upgrade assistant and click on the "Quick resolve" button (screenshot 👇🏻)

Screenshot 2021-05-26 at 14 19 46

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@jloleysens jloleysens added (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead v8.0.0 Team:AppServices release_note:skip Skip the PR/issue when compiling release notes v7.14.0 labels May 25, 2021
@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

…deprecation-ilm-policy

* 'master' of github.com:elastic/kibana: (101 commits)
  [ftr] migrate "docTable" service to FtrService class (elastic#100595)
  [ftr] migrate "listingTable" service to FtrService class (elastic#100606)
  Fixed comparing real value with formatted according to mode. (elastic#100456)
  [ftr] migrate "dataGrid" service to FtrService class (elastic#100593)
  [ftr] migrate "fieldEditor" to FtrService class (elastic#100597)
  [ftr] migrate "filterBar" service to FtrService class (elastic#100601)
  [triggersActionsUi] Reduce page load bundle to under 100kB (elastic#97770)
  [build] Clean jest configs (elastic#100594)
  refact(NA): remove extra pkg_npm target and add specific target folders for @kbn/analytics on Bazel (elastic#100569)
  Update dependency @elastic/charts to v29.2.0 (elastic#100587)
  [Maps] convert LayerPanel to typescript (elastic#100481)
  [Upgrade Assistant] Address copy feedback (elastic#99632)
  Open/Closed filter for observability alerts page (elastic#99217)
  One liner to expose the EQL query for debugging for users (elastic#100565)
  [KibanaPageLayout] Solution Nav specific styles & props (elastic#100089)
  [ftr] implement FtrService classes and migrate common services (elastic#99546)
  [XY] [Lens] Adds opacity slider (elastic#100453)
  [Reporting] ILM policy for managing reporting indices (elastic#100130)
  [Reporting] ILM policy for managing reporting indices (elastic#100130)
  [DOCS] Remove redundant maps attribute (elastic#100426)
  ...

# Conflicts:
#	x-pack/plugins/reporting/server/lib/store/report_ilm_policy.ts
#	x-pack/plugins/reporting/server/lib/store/store.test.ts
#	x-pack/plugins/reporting/server/lib/store/store.ts
@jloleysens jloleysens requested a review from tsullivan May 26, 2021 12:20
@jloleysens jloleysens marked this pull request as ready for review May 26, 2021 12:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

kibanamachine and others added 2 commits May 27, 2021 06:16
- renmoved manual steps section from the ilm migration deprecation
- fixed Jest tests
- fixed issues after merging master
@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

kibanamachine commented Jun 2, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / jest / Jest Tests.x-pack/plugins/reporting/server/deprecations.Migrate existing indices' ILM policy deprecations returns deprecation information when reporting indices are not using the reporting ILM policy

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `Migrate existing indices' ILM policy deprecations returns deprecation information when reporting indices are not using the reporting ILM policy 1`

- Snapshot  - 3
+ Received  + 0

@@ -3,13 +3,10 @@
      "correctiveActions": Object {
        "api": Object {
          "method": "PUT",
          "path": "/api/reporting/deprecations/migrate_ilm_policy",
        },
-       "manualSteps": Array [
-         "Send a request to Elasticsearch that configures indices matching \".reporting-*\" to be managed by the \"kibana-reporting\" Index Lifecycle Policy.",
-       ],
      },
      "level": "warning",
      "message": "All new reporting indices will be managed by a provisioned ILM policy: \"kibana-reporting\". To manage the lifecycle of reports edit the kibana-reporting policy. Please note, this action will target all indices prefixed with \".reporting-*\".",
    },
  ]
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/x-pack/plugins/reporting/server/deprecations/migrage_existing_indices_ilm_policy.test.ts:55:75)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:5)
    at _runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:57:9)
    at run (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-runner/build/testWorker.js:133:12)

Metrics [docs]

Page load bundle

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

id before after diff
reporting 84.4KB 84.6KB +195.0B

History

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

Copy link
Contributor

@lockewritesdocs lockewritesdocs left a comment

Choose a reason for hiding this comment

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

Suggested a revision for the reporting indices message. As we discussed, I think there needs to be UI enhancements for the manual steps that users take for this action.

{
level: 'warning',
message: i18n.translate('xpack.reporting.deprecations.migrateIndexIlmPolicyActionMessage', {
defaultMessage: `All new reporting indices will be managed by a provisioned ILM policy: "{reportingIlmPolicy}". To manage the lifecycle of reports edit the {reportingIlmPolicy} policy. Please note, this action will target all indices prefixed with "{indexPattern}".`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultMessage: `All new reporting indices will be managed by a provisioned ILM policy: "{reportingIlmPolicy}". To manage the lifecycle of reports edit the {reportingIlmPolicy} policy. Please note, this action will target all indices prefixed with "{indexPattern}".`,
defaultMessage: `New reporting indices will be managed by the "{reportingIlmPolicy}" provisioned ILM policy. You must edit this policy to manage the report lifecycle. This change targets all indices prefixed with "{indexPattern}".`,

@jloleysens
Copy link
Contributor Author

Opening a different PR for this since updating is non-trivial: #104303

@jloleysens jloleysens closed this Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reporting ILM policy
4 participants