-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Speed up dashboard add panel #22278
Speed up dashboard add panel #22278
Conversation
💚 Build Succeeded |
New commit adds find.byClassName method instead of using remote service in add_panel. |
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.
lgtm
code review, ran some functional tests that use dashboardAddPanel service. There is no longer a long pause when opening the add panel
@@ -170,7 +182,7 @@ export function DashboardAddPanelProvider({ getService, getPageObjects }) { | |||
log.debug(`DashboardAddPanel.addVisualization(${vizName})`); | |||
await this.ensureAddPanelIsShowing(); | |||
// workaround for timing issue with slideout animation | |||
await PageObjects.common.sleep(500); | |||
// await PageObjects.common.sleep(500); |
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 think this line and the line above (the commit about the timing issue) should just be removed
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.
Yes, I'll remove that. I commented the sleep out in this PR hoping and expecting we wouldn't need it. I'm going to run this against Kibana in Cloud just to make sure it works there too.
💚 Build Succeeded |
💚 Build Succeeded |
* Rebuild modulePath correctly if on Windows * Change how we find dashboard add panel is loaded * Add and use find.byClassName instead of remote * cleanup a comment
* Rebuild modulePath correctly if on Windows * Change how we find dashboard add panel is loaded * Add and use find.byClassName instead of remote * cleanup a comment
UPDATE: Scratch everything I said below about this test;
"dashboard app using legacy data dashboard state Overriding colors on an area chart is preserved"
This PR will only speed up that dashboard add panel action.
The fix for the test that was in master and 6.x didn't really fix the problem. It still fails intermittently and will require a new fix.
I started working on fixing this test on 6.4.0;
"dashboard app using legacy data dashboard state Overriding colors on an area chart is preserved"
I found that when the test was clicking the dashboard Edit menu item, and then immediately opening the Count legend on the area chart that was in the dashboard, some tweak to that visualization to go into edit mode must cause the legend to get closed. So even though there was code to check that the legend was open, that check would pass, and then it would get closed before the next step of the test which was selecting a color.
While debugging this problem, I was bugged by a previous change I had implemented which waited for the dashboard Add Panel loading indicator to be deleted. So I investigated and have 2 potential solutions (see code change)
But as I tried to bring my change for the Dashboard Edit mode to master, I found that there's a recent change to this area from #21629 which didn't make it back to 6.4 branch (because the PR included more than we would want right before the 6.4.0 release).
So, this PR for master and 6.5 now only speeds up the dashboard tests.
But when I backport to 6.4 I would also include this change from the above PR to fix that dashboard "Overriding colors on an area chart" test.
https://github.com/elastic/kibana/pull/21629/files#diff-900adf3e48329f3b99bb703081058de3R176
The check below might not directly fix the problem, but since it takes at least some milliseconds to check, it could end up fixing the flaky test failure.