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

[console_extensions] disable when console is disabled #18673

Merged
merged 3 commits into from
May 1, 2018

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Apr 30, 2018

Closes #18671.

To test, set console.enabled to false. The server should start with no errors.

Without this change,

server   error  [21:10:32.175] [fatal] Error: Unmet requirement "console" for plugin "console_extensions"
    at callPluginHook (/Users/jbudz/Projects/elastic/kibana/src/server/plugins/lib/call_plugin_hook.js:10:13)
    at callPluginHook (/Users/jbudz/Projects/elastic/kibana/src/server/plugins/lib/call_plugin_hook.js:27:11)
    at <anonymous>

is expected on server start

Copy link
Contributor

@bmcconaghy bmcconaghy left a comment

Choose a reason for hiding this comment

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

LGTM thanks.

Copy link

@talentlandr talentlandr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jen-huang jen-huang left a comment

Choose a reason for hiding this comment

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

^ Crap, that was me on a different account....

LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@epixa
Copy link
Contributor

epixa commented May 1, 2018

Doesn’t this mean you can no longer disable console_extensions alone? If so, was that intended?

@jbudz
Copy link
Member Author

jbudz commented May 1, 2018

Good catch, pushed an update.

@jbudz jbudz force-pushed the console-extensions-enabled branch from 6496203 to b5f632e Compare May 1, 2018 14:00
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

isEnabled(config) {
return (
config.get('console_extensions.enabled') &&
config.has('console.enabled') &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need a call to has for console but not for console_extensions?

Copy link
Member Author

Choose a reason for hiding this comment

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

Our tests load x-pack plugins in isolation, and if there's no console to go along with console_extensions it'll error out. I was trying to find somewhere to mock console, but I decided it's a moderately legitimate check.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't even answer your question, doh. I didn't do has for console_extensions because I defined it in the schema below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense

@epixa
Copy link
Contributor

epixa commented May 1, 2018

LGTM

@jbudz jbudz merged commit 1eef045 into elastic:master May 1, 2018
jbudz added a commit that referenced this pull request May 1, 2018
* [console_extensions] disable when console is disabled

* [console extensions] has console and enabled

* [console_extensions] fix console_extensions.enabled
jbudz added a commit that referenced this pull request May 1, 2018
* [console_extensions] disable when console is disabled

* [console extensions] has console and enabled

* [console_extensions] fix console_extensions.enabled
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.

6 participants