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

get_unused_config_keys causes unknown configuration key error for arrays in plugin #58559

Closed
jd-nm26 opened this issue Feb 25, 2020 · 7 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@jd-nm26
Copy link

jd-nm26 commented Feb 25, 2020

Kibana version: 7.6.0

Elasticsearch version: 7.6.0

Server OS version: Debian 10

Browser version: Chrome (N/A, since Kibana doesn't start)

Browser OS version: Windows

Original install method (e.g. download page, yum, from source, etc.): cloned source from v7.6.0 tag on github.

Describe the bug: If you include a plugin parameter in kibana.yml/kibana.dev.yml which is an array, get_unused_config_keys will throw a parameter validation error and Kibana will stop.

Steps to reproduce:

  1. Create plugin with a trivial configuration in server/index.ts to allow any type of parameters:
export const config = {
  schema: schema.any()
}
  1. Modify kibana.yml or kibana.dev.yml to have an array parameter for your plugin:
my_plugin:
  enabled: true
  other_params:
  - "one"
  - "two"
  - "three"
  1. Run in dev mode.

  2. Kibana will halt with the following error:

 log   [23:38:59.885] [fatal][root] { Error: Unknown configuration key(s): "my_plugin.other_params". Check for spelling errors and ensure that expected plugins are installed.
    at ensureValidConfiguration (kibana/src/core/server/legacy/config/ensure_valid_configuration.ts:41:11) code: 'InvalidConfig', processExitCode: 64, cause: undefined 

Expected behavior:

Screenshots (if relevant):

Errors in browser console (if relevant): N/A

Provide logs and/or server output (if relevant):

Any additional context:

It appears get_unused_config_keys.ts stores the array keys as:

  • my_plugin.other_params.0
  • my_plugin.other_params.1
  • my_plugin.other_params.2

so that the call to lodash.difference does not correctly validate the existence of the keys.

@TinaHeiligers TinaHeiligers added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Feb 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@pgayvallet
Copy link
Contributor

Fixed on 7.7 by #56105

@mshustov
Copy link
Contributor

mshustov commented Mar 1, 2020

@pgayvallet should we port to 7.6?

@pgayvallet
Copy link
Contributor

7.6: #58998

@pgayvallet
Copy link
Contributor

Closing as resolved on 7.6+

@srinivasuk
Copy link

i am installing sense from kibana root folder with below command

.\bin\kibana.bat --install elastic/sense

i get below error.

i am using 'kibana-7.8.0-windows-x86_64'

log [20:13:14.866] [info][plugins-service] Plugin "ingestManager" is disabled.
log [20:13:14.867] [info][plugins-service] Plugin "lists" is disabled.
log [20:13:24.374] [warning][legacy-service] Some installed third party plugin(s) [xpack_main, monitoring, reporting, spaces, security, dashboard_mode, beats_management, maps, task_manager, encryptedSavedObjects, ingestManager, console_legacy, apm_oss, kibana, elasticsearch, newsfeed, region_map, status_page, tile_map, timelion, ui_metric] are using the legacy plugin format and will no longer work in a future Kibana release. Please refer to https://ela.st/kibana-breaking-changes-8-0 for a list of breaking changes and https://ela.st/kibana-platform-migration for documentation on how to migrate legacy plugins.
log [20:13:24.408] [fatal][root] { Error: Unknown configuration key(s): "install". Check for spelling errors and ensure that expected plugins are installed.
at ensureValidConfiguration (C:\Users\Owner\Documents\softroot\kibana-7.8.0-windows-x86_64\src\core\server\legacy\config\ensure_valid_configuration.js:46:11) code: 'InvalidConfig', processExitCode: 64, cause: undefined }

FATAL Error: Unknown configuration key(s): "install". Check for spelling errors and ensure that expected plugins are installed.

@srinivasuk
Copy link

.\bin\kibana-plugin.bat install elastic/sense
Attempting to transfer from elastic/sense
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/elastic/sense/elastic/sense-7.8.0.zip
Plugin installation was unsuccessful due to error "No valid url specified."

i tried this script as well, which gives different error shown above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

6 participants