-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Do not use angular debug mode unless in development #7929
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
Conversation
|
i see test server sets environment name to development, so i decided to only disable debug info if environment name IS SET to production. should i rather disable debug info if environment name IS NOT SET to development ? |
|
We have a dev_mode plugin in core_plugins that only runs if the app is in dev mode - can you tie into that instead of doing a dev check in ui/chrome? We should preserve the existing logic for checking whether it's considered "development" rather than introducing a new concept (i.e. not-production). Using existing flags helps ensure this: https://github.com/elastic/kibana/blob/master/src/core_plugins/dev_mode/index.js#L2 |
|
i cant plug it in dev mode plugin, because 1) by default debug info is enabled ... we need to disable it. cant do it in dev mode plugin as it only runs in dev mode 2) actually debug info shouldn't only be enabled in dev mode but also to run test (which don't run in dev mode). that's why i used environment name (which seems to be an existing setting) |
|
--dev does not come thru in tests ... i had to add it to the default options .... which i dont like ... but its working. |
|
jenkins, test this |
|
Does this still allow us to run individual test suites? At a glance, it seems like this change would make it so you can only run tests successfully if they're all done together. |
|
no it still works as before |
|
This change makes it so we can't run the selenium tests against Kibana builds unless they're running in dev mode, which is definitely not ideal. This seems like a problem with our selenium tests more than anything else, but I'd rather not put the project in a state of limbo my merging this while that is the case. Can you look into what it would take to get the selenium tests to work with the angular debug mode disabled? To reproduce what I'm talking about, just outright disable the angular debug thing rather than wrapping it in a conditional, and then run |
|
Other than that, this seems like a huge win! |
|
i see ... thats weird, selenium tests should not depend on debugInfo being enabled. here we try to use .scope() which will return undefined if debug info is disabled. I'll check with @LeeDr what we could do about this. but at the moment our selenium tests do seem to be running in dev mode ? it seems kibana server is started normally but when i check for internals.devFlag its set to true (so debugInfo is not disabled in current PR when selenium tests are running) |
|
The selenium tests don't normally run with Kibana running in dev mode. I don't think they can because of the basepath inserted in the URL. We might be able to work around that in the selenium tests if we needed to. I don't know anything about the angular debug info. If we had to change the method in the selenium tests that checks if Kibana is loaded, we certainly could. That whole set of methods for loading pages is a bit of a mess. |
|
You can run Kibana in dev mode and disable the basepath proxy, so I assume that's what's going on. |
|
this could be merged in, but as @epixa mentioned it will prevent selenium tests from running unless they are running in dev mode ( which is currently the case ). in the future we need to update selenium tests to not depend on angular debug info. if running selenium tests in non dev mode is a requirement then this PR needs to wait until selenium tests are updated. |
|
Yeah, running selenium tests outside of dev mode is pretty important, so they should be updated to support that. |
|
I'm still a bit confused. I'm not sure if the current Selenium tests on Jenkins run in dev mode, but I often run the tests against a production install or release candidate on my laptop. In fact, I've made other changes just to support that better. But if this change potentially breaks the |
|
@LeeDr You hit the nail on the head, it seems. That function is relying on an angular debug thing that this PR is trying to remove unless you're running in dev mode because it has a negative impact on performance, so if this PR were to be merged, the tests would only be runnable in dev mode, which would be a problem. We just need to update the page object(s) to not rely on that debug behavior. |
|
waiting for your review :) |
|
jenkins, test this |
|
^ I just want to see an updated selenium build with this change. |
|
@ppisljar Can you rebase this to get the CI tests to run properly? |
|
Successful selenium build: https://kibana-ci.elastic.co/view/All/job/elastic+kibana+pull-request+multijob-selenium/682/console LGTM |
Backports PR #7929 **Commit 1:** fix #7125 - disable angular debug info * Original sha: b3957a9 * Authored by ppisljar <[email protected]> on 2016-08-04T08:25:47Z **Commit 2:** fix #7125 - disable angular debug info * Original sha: 3972808 * Authored by ppisljar <[email protected]> on 2016-08-04T08:26:09Z **Commit 3:** updating to disable debug info when environment name is set to production * Original sha: 268fdb5 * Authored by ppisljar <[email protected]> on 2016-08-04T10:02:00Z **Commit 4:** using --dev flag * Original sha: d1c6ce4 * Authored by ppisljar <[email protected]> on 2016-08-11T16:26:12Z **Commit 5:** updating tests to not depend on angular.scope() * Original sha: 4f83b21 * Authored by ppisljar <[email protected]> on 2016-10-03T09:39:29Z
Backports PR #7929 **Commit 1:** fix #7125 - disable angular debug info * Original sha: b3957a9 * Authored by ppisljar <[email protected]> on 2016-08-04T08:25:47Z **Commit 2:** fix #7125 - disable angular debug info * Original sha: 3972808 * Authored by ppisljar <[email protected]> on 2016-08-04T08:26:09Z **Commit 3:** updating to disable debug info when environment name is set to production * Original sha: 268fdb5 * Authored by ppisljar <[email protected]> on 2016-08-04T10:02:00Z **Commit 4:** using --dev flag * Original sha: d1c6ce4 * Authored by ppisljar <[email protected]> on 2016-08-11T16:26:12Z **Commit 5:** updating tests to not depend on angular.scope() * Original sha: 4f83b21 * Authored by ppisljar <[email protected]> on 2016-10-03T09:39:29Z
* fix elastic#7125 - disable angular debug info
Backports PR elastic#7929 **Commit 1:** fix elastic#7125 - disable angular debug info * Original sha: b3957a9 * Authored by ppisljar <[email protected]> on 2016-08-04T08:25:47Z **Commit 2:** fix elastic#7125 - disable angular debug info * Original sha: 3972808 * Authored by ppisljar <[email protected]> on 2016-08-04T08:26:09Z **Commit 3:** updating to disable debug info when environment name is set to production * Original sha: 268fdb5 * Authored by ppisljar <[email protected]> on 2016-08-04T10:02:00Z **Commit 4:** using --dev flag * Original sha: d1c6ce4 * Authored by ppisljar <[email protected]> on 2016-08-11T16:26:12Z **Commit 5:** updating tests to not depend on angular.scope() * Original sha: 4f83b21 * Authored by ppisljar <[email protected]> on 2016-10-03T09:39:29Z Former-commit-id: ad43652
Disables angular debug info if dev mode is not enabled to increase performance of release builds
fixes #7125