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

Speed up dashboard add panel #22278

Merged
merged 13 commits into from
Aug 23, 2018
Merged

Speed up dashboard add panel #22278

merged 13 commits into from
Aug 23, 2018

Conversation

LeeDr
Copy link

@LeeDr LeeDr commented Aug 22, 2018

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.
image

@LeeDr LeeDr added test Feature:Dashboard Dashboard related features labels Aug 22, 2018
@LeeDr LeeDr requested a review from nreese August 22, 2018 23:20
@LeeDr LeeDr requested a review from liza-mae August 22, 2018 23:23
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@LeeDr
Copy link
Author

LeeDr commented Aug 23, 2018

New commit adds find.byClassName method instead of using remote service in add_panel.

Copy link
Contributor

@nreese nreese left a 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);
Copy link
Contributor

@nreese nreese Aug 23, 2018

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

Copy link
Author

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.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@LeeDr LeeDr merged commit 9b80961 into elastic:master Aug 23, 2018
LeeDr pushed a commit to LeeDr/kibana that referenced this pull request Aug 24, 2018
* 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
LeeDr pushed a commit to LeeDr/kibana that referenced this pull request Aug 24, 2018
* 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
LeeDr pushed a commit that referenced this pull request Aug 27, 2018
* 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
LeeDr pushed a commit that referenced this pull request Aug 27, 2018
* 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
@LeeDr LeeDr deleted the speedDashboardPanel branch August 20, 2020 17:56
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.

4 participants