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

Page layouts/stage 2/stack management #100085

Closed

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented May 13, 2021

WIP

image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

cchaos and others added 10 commits May 13, 2021 11:44
# Conflicts:
#	src/core/public/rendering/_base.scss
# Conflicts:
#	src/plugins/kibana_react/public/page_layout/page_layout.tsx
Todo: Fix pageTitle icon and supply bottom bar to layout when upgrading EUI
@cjcenizal cjcenizal self-requested a review May 14, 2021 18:47
Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

I haven't reviewed the ES UI stuff yet, but I did take a look at the management plugin changes and had a few comments/questions.

</EuiPageBody>
<ManagementPageLayout
pageHeader={{
pageTitle: (
Copy link
Contributor

Choose a reason for hiding this comment

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

If pageTitle is a fairly consistent element in this layout, then I think it makes sense to hard-code a data-test-subj to it for reliable identification in tests. Maybe something unique, like data-test-subj="page-layout-title"? We can update the tests to depend upon this selector value instead of the existing "appTitle".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 I added/hard-coded this in the KibanaPageTemplate to kibana-page-template-header, allowing it to be overridden by consumers if they want something specific. But I haven't yet updated instances.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. ES UI can make the change to our apps and tests in subsequent PRs.

import { AppMountParameters, ChromeBreadcrumb, ScopedHistory } from 'kibana/public';
import { i18n } from '@kbn/i18n';
import { ManagementAppWrapper } from '../management_app_wrapper';
import { ManagementLandingPage } from '../landing';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I've observed a general pattern in our other plugins of naming component files the same as the component they export. In this case, it would be management_landing_page.tsx. This convention makes it really easy to hunt down the source when you know the name of the component from reading the consuming code.

Copy link
Contributor Author

@cchaos cchaos May 26, 2021

Choose a reason for hiding this comment

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

This was already existing, I'm fine with renaming though.

<ManagementLandingPage
version={dependencies.kibanaVersion}
setBreadcrumbs={setBreadcrumbs}
managementPageLayout={({ children, ...rest }) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the intention behind this render prop? I'm trying to weigh the benefits against the cost of the added indirection. It looks like the primary benefit of render props is to support code reuse, but I don't see ManagementLandingPage being used anywhere else.

It seems to me like the code would be clearer if ManagementLandingPage imported KibanaPageTemplate, and expected solution, selectedId, and so on to be passed in as props, but I'm probably missing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the same way it's handled above with <ManagementAppWrapper /> and my guess is that it's so that each page doesn't have to remember to accept the entire solutionNav configuration.

I just update this portion a bit to resolve conflicts from a previous PR/

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm with @cjcenizal on this, including the 'I might be missing something' part. @cchaos seems uncertain so perhaps @myasonik knows.

@cjcenizal
Copy link
Contributor

CC @mattkime @myasonik I believe y'all worked on this? Could you take a look at my comments above? Love to hear your thoughts.

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

@cchaos Tested locally, the changes to Index Management look good! I had a couple suggestions for the broader change.

Looks like the landing page content is sitting a little low. Does it look low to you, too? Also, there's a line at the top of the page that looks odd. Not sure if that's intentional.

image

This bit is outside the scope of this change -- just wanted to suggest adding some padding to the bottom of the side nav so that when you scroll, you don't have the last few items uncomfortably close to the bottom of the screen. This gets even more uncomfortable when you hover over the last item in Chrome and the little preview of the link's URI shows up in the bottom left corner of the browser. Here's a before and after.

image

@cjcenizal
Copy link
Contributor

I'm working through this right now in ILM, and as I'm passing managementPageLayout everywhere, it hits me -- this is a "dumb" component, right? Based it on the interface, it seems an awful lot like KibanaPageTemplate. If that's the case, can we statically import it instead of injecting it via the plugin lifecycle methods? I think this would make the code significantly simpler to read and maintain.

@cjcenizal
Copy link
Contributor

cjcenizal commented May 27, 2021

I'm not entirely confident about how to solve this, but I believe we can enable my suggestion above by tweaking the way Route, ManagementAppWrapper, and KibanaPageTemplate collaborate in management_router.tsx.

Currently, the logic in that file iterates over all of sections and their apps, renders a Route for each, which contains a ManagementAppWrapper, which renders a KibanaPageTemplate. KibanaPageTemplate is responsible for rendering the nav. So in essence, the app corresponding to each route is responsible for rendering its own solution navigation. This is probably also what's causing the flicker that occurs as you navigate from app to app that @cchaos spotted.

I think the solution is to refactor this logic so that the solution navigation is rendered outside of the routes. Basically, we want to see a single instance of the solution navigation that gets rendered only once, separately from the routes. I'm not sure if this is possible given the current dependency upon or design of KibanaPageTemplate, which seems to couple the solution nav with the layout of the page you're on. I haven't spent time considering alternatives so there's a good chance I'm rushing to a solution, but my instinct is to avoid that type of coupling. I think it'd make this code easier to follow and much easier to consume inside of the Management plugins.

An immediate solution might be to break KibanaPageTemplate into two components, one for rendering the sidebar alongside an empty content area that contains the routes, and another for rendering EuiPageTemplate with some management/Kibana-specific configuration. The first component would be rendered by the Management plugin. The second component would be statically imported by Management plugins and used in lieu of EuiPageTemplate.

@myasonik
Copy link
Contributor

I'll look more closely at the render-prop thread tomorrow but to continue the conversation, if I recall correctly, it was just "the way it worked" to change as little as possible about how the whole system works.

Which gets me into all of what you're suggesting @cjcenizal:
The goal here is not to refactor the Management-plugin dependency architecture (though I do agree it could be improved), the goal is to provide a new, consistent page UI through KibanaPageLayout. Given the expected scope of all of this work, I'd really prefer to be very focused here so that individual PRs, and this effort in general, don't balloon in scope.

If we think the architecture isn't stable enough to ship these changes on top of and we need to fix it to move forward, we certainly can. But I just want that to be a very explicit decision and to recognize that's not the ultimate goal here.

@cjcenizal
Copy link
Contributor

cjcenizal commented May 27, 2021

Thanks @myasonik, I agree. I'm not interested in pursuing changes unless they help us ship these enhancements to users. After trying to consume this in ILM, I think we do need to pause and reconsider these changes. I found it time-consuming and awkward to use this solution inside of a Management plugin, and there's a real UX problem (flicker-on-navigation, see GIF below) that I believe this architecture brings with it. I think we should address these issues now before we move forward. If we punt on them, then we'll have to go back through our plugins and redo a lot of work later.

bbac6f58-23e5-4a74-946e-b34ddab445ea

@cchaos
Copy link
Contributor Author

cchaos commented May 27, 2021

Unfortunately we cannot break apart the KibanaPageTemplate. This component, which just wraps EuiPageTemplate, is the crux of this entire effort. It handles all the layout situations in one consistent way. We've seen how forcing consumers to use individual components breaks down that consistency because no 2 plugins do it the same.

If it is helpful, here is a PR that @weltenwort worked on for Observability to create a very similar structure. #99380

@kibanamachine
Copy link
Contributor

kibanamachine commented May 27, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / jest / Jest Tests.src/plugins/advanced_settings/public/management_app.AdvancedSettings should render specific setting if given setting key

Link to Jenkins

Standard Out

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


Stack Trace

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `AdvancedSettings`.
    at createFiberFromTypeAndProps (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:26629:21)
    at createFiberFromElement (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:26652:15)
    at reconcileSingleElement (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:15526:23)
    at reconcileChildFibers (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:15586:35)
    at reconcileChildren (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:18089:28)
    at finishClassComponent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:18490:5)
    at updateClassComponent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:18423:24)
    at beginWork$1 (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:20186:16)
    at HTMLUnknownElement.callCallback (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:336:14)
    at HTMLUnknownElement.callTheUserObjectsOperation (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
    at innerInvokeEventListeners (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:318:25)
    at invokeEventListeners (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
    at HTMLUnknownElementImpl._dispatch (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:221:9)
    at HTMLUnknownElementImpl.dispatchEvent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:94:17)
    at HTMLUnknownElement.dispatchEvent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:231:34)
    at Object.invokeGuardedCallbackDev (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:385:16)
    at invokeGuardedCallback (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:440:31)
    at beginWork$$1 (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:25780:7)
    at performUnitOfWork (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24698:12)
    at workLoopSync (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24671:22)
    at performSyncWorkOnRoot (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24270:11)
    at scheduleUpdateOnFiber (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:23698:7)
    at updateContainer (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27103:3)
    at /var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27528:7
    at unbatchedUpdates (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24433:12)
    at legacyRenderSubtreeIntoContainer (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27527:5)
    at Object.render (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27608:10)
    at fn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:488:26)
    at /var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:405:37
    at batchedUpdates$1 (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24386:12)
    at Object.act (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom-test-utils.development.js:1092:14)
    at wrapAct (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:405:13)
    at Object.render (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:474:16)
    at new ReactWrapper (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/ReactWrapper.js:115:16)
    at mount (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/mount.js:10:10)
    at mountWithI18nProvider (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/@kbn/test/src/jest/utils/enzyme_helpers.tsx:205:19)
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/plugins/advanced_settings/public/management_app/advanced_settings.test.tsx:246: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/advanced_settings/public/management_app.AdvancedSettings should render read-only when saving is disabled

Link to Jenkins

Standard Out

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


Stack Trace

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `AdvancedSettings`.
    at createFiberFromTypeAndProps (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:26629:21)
    at createFiberFromElement (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:26652:15)
    at reconcileSingleElement (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:15526:23)
    at reconcileChildFibers (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:15586:35)
    at reconcileChildren (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:18089:28)
    at finishClassComponent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:18490:5)
    at updateClassComponent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:18423:24)
    at beginWork$1 (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:20186:16)
    at HTMLUnknownElement.callCallback (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:336:14)
    at HTMLUnknownElement.callTheUserObjectsOperation (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
    at innerInvokeEventListeners (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:318:25)
    at invokeEventListeners (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:274:3)
    at HTMLUnknownElementImpl._dispatch (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:221:9)
    at HTMLUnknownElementImpl.dispatchEvent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:94:17)
    at HTMLUnknownElement.dispatchEvent (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/jest-environment-jsdom/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:231:34)
    at Object.invokeGuardedCallbackDev (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:385:16)
    at invokeGuardedCallback (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:440:31)
    at beginWork$$1 (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:25780:7)
    at performUnitOfWork (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24698:12)
    at workLoopSync (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24671:22)
    at performSyncWorkOnRoot (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24270:11)
    at scheduleUpdateOnFiber (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:23698:7)
    at updateContainer (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27103:3)
    at /var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27528:7
    at unbatchedUpdates (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24433:12)
    at legacyRenderSubtreeIntoContainer (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27527:5)
    at Object.render (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:27608:10)
    at fn (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:488:26)
    at /var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:405:37
    at batchedUpdates$1 (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom.development.js:24386:12)
    at Object.act (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/react-dom/cjs/react-dom-test-utils.development.js:1092:14)
    at wrapAct (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:405:13)
    at Object.render (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme-adapter-react-16/src/ReactSixteenAdapter.js:474:16)
    at new ReactWrapper (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/ReactWrapper.js:115:16)
    at mount (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/enzyme/src/mount.js:10:10)
    at mountWithI18nProvider (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/node_modules/@kbn/test/src/jest/utils/enzyme_helpers.tsx:205:19)
    at Object.<anonymous> (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/plugins/advanced_settings/public/management_app/advanced_settings.test.tsx:268: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/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:308: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)

and 18 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
lens 67 45 -22
maps 286 208 -78
total -100

History

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

@cjcenizal
Copy link
Contributor

Thanks @cchaos. I think we can move ahead with the existing solution. Using context to pass down this component removes the friction of prop-drilling. I opened #100837 to act as a feature branch for targeting with our migration PRs. Can we close this one in favor of that one?

@cchaos cchaos closed this Jun 9, 2021
@cchaos cchaos deleted the pageLayouts/stage_2/stack_management branch June 9, 2021 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants