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

[WIP] Migrate Stack Management plugins to use new solutions nav #100837

Closed
wants to merge 18 commits into from

Conversation

cjcenizal
Copy link
Contributor

@cjcenizal cjcenizal commented May 27, 2021

This feature branch replaces #100085 and supports #98359.

Summary

This work captures the migration of the Stack Management plugins to the new solutions nav.

Plugins to migrate

Observability

  • Logstash Pipelines

ES UI

ML

  • Transforms
  • Machine Learning Jobs

Reporting services

  • Reporting

Alerting services

  • Rules and Connectors

Security

  • Users
  • Roles
  • API Keys
  • Role Mappings
  • Spaces

App and app services

  • Index Patterns
  • Advanced settings
  • Search sessions

Core

  • Saved Objects
  • Tags

Note to reviewers

Sorry for the premature ping. Should have used a draft! We're using this as a feature branch to gradually migrate over Management apps to the new solutions nav. We'll code review each incremental PR as we merge it here and once all plugins have been migrated we'll be able to merge this branch to master with minimal review.

Note to migrators

See #100748 for an example of the process ES UI is using to track plugins during the migration process, and the steps we're applying to migrate each plugin. See #100838 for an annotated example of what these steps look like applied to actual code.

Note about CI

This PR fundamentally breaks all of the layouts of the Management plugins. As a result, navigation is missing and many functional tests will fail because they can't locate buttons to click to navigate to the plugin under test. As we merge PRs into this branch, as long as we verify the appropriate tests are passing in those PRs, we'll gradually fix CI in this PR until all tests are passing again.

@cjcenizal cjcenizal requested a review from a team as a code owner May 27, 2021 23:23
@cjcenizal cjcenizal requested a review from a team May 27, 2021 23:23
@cjcenizal cjcenizal requested review from a team as code owners May 27, 2021 23:23
@cjcenizal cjcenizal changed the title Migrate Stack Management plugins to use new solutions nav [WIP] Migrate Stack Management plugins to use new solutions nav May 28, 2021
@cjcenizal
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

kibanamachine commented May 28, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / jest / Jest Tests.src/plugins/advanced_settings/public/management_app.AdvancedSettings should render unfiltered with query parsing error

Link to Jenkins

Standard Out

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


Stack Trace

Error: Method “props” is meant to be run on 1 node. 0 found instead.
    at ShallowWrapper.single (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/ShallowWrapper.js:1652:13)
    at ShallowWrapper.props (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/ShallowWrapper.js:1175:17)
    at ShallowWrapper.prop (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/ShallowWrapper.js:1311:17)
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/plugins/advanced_settings/public/management_app/advanced_settings.test.tsx:312:35)
    at Promise.then.completed (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95: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)

Kibana Pipeline / jest / Jest Tests.src/plugins/kibana_react/public/page_template.KibanaPageTemplate render default empty prompt

Link to Jenkins

Standard Out

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


Stack Trace

Error: expect(received).toMatchSnapshot()

Snapshot name: `KibanaPageTemplate render default empty prompt 1`

- Snapshot  - 0
+ Received  + 5

@@ -1,7 +1,12 @@
  <EuiPageTemplate
    paddingSize="none"
+   pageHeader={
+     Object {
+       "data-test-subj": "kibana-page-template-header",
+     }
+   }
    pageSideBarProps={
      Object {
        "className": "kbnPageTemplate__pageSideBar",
      }
    }
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/plugins/kibana_react/public/page_template/page_template.test.tsx:67:23)
    at Promise.then.completed (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95: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)

Kibana Pipeline / jest / Jest Tests.src/plugins/kibana_react/public/page_template.KibanaPageTemplate render custom empty prompt only

Link to Jenkins

Standard Out

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


Stack Trace

Error: expect(received).toMatchSnapshot()

Snapshot name: `KibanaPageTemplate render custom empty prompt only 1`

- Snapshot  - 0
+ Received  + 5

@@ -1,7 +1,12 @@
  <EuiPageTemplate
    paddingSize="none"
+   pageHeader={
+     Object {
+       "data-test-subj": "kibana-page-template-header",
+     }
+   }
    pageSideBarProps={
      Object {
        "className": "kbnPageTemplate__pageSideBar",
      }
    }
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/plugins/kibana_react/public/page_template/page_template.test.tsx:76:23)
    at Promise.then.completed (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:276:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/utils.js:216:10)
    at _callCircusTest (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-circus/build/run.js:212:40)
    at processTicksAndRejections (internal/process/task_queues.js:95: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)

and 16 more failures, only showing the first 3.

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
management 43 23 -20

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
management 38 39 +1

Async chunks

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

id before after diff
advancedSettings 912.7KB 912.7KB +40.0B
indexManagement 1.3MB 1.3MB -477.0B
indexPatternManagement 553.6KB 552.6KB -981.0B
management 20.0KB 8.5KB -11.6KB
total -13.0KB

Page load bundle

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

id before after diff
advancedSettings 8.9KB 8.8KB -158.0B
kibanaReact 133.7KB 133.7KB +52.0B
spaces 41.6KB 41.3KB -387.0B
telemetryManagementSection 23.0KB 23.4KB +368.0B
total -125.0B
Unknown metric groups

API count

id before after diff
management 38 39 +1

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 22 20 -2
globalSearch 4 2 -2
lens 67 45 -22
lists 239 236 -3
ml 121 115 -6
monitoring 109 56 -53
total -94

History

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

@pgayvallet
Copy link
Contributor

Is this a draft or is the PR ready for review?

@sabarasaba
Copy link
Member

sabarasaba commented May 28, 2021

@pgayvallet Not for ready review yet, this feature branch is just a work in progress while we migrate the Stack Management plugins (see #100748). I'll go ahead and mark this PR as draft for now to avoid confusion.

@cchaos
Copy link
Contributor

cchaos commented Jun 3, 2021

We've decided on a different path for this 7.14 effort. I'm closing this PR in favor of #101335 and we no longer need a feature branch as there's no real "breaks" in that PR but just some layout oddities that I'm hopeful will get fixed by 7.14.

I've also moved the list to a new meta ticket: #101336

Sorry for any premature/redundant work/planning.

@cchaos cchaos closed this Jun 3, 2021
@spalger spalger deleted the stack-management-solution-nav branch May 8, 2022 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants