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

uiSettings override needs validation #25526

Closed
marius-dr opened this issue Nov 12, 2018 · 5 comments
Closed

uiSettings override needs validation #25526

marius-dr opened this issue Nov 12, 2018 · 5 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

@marius-dr
Copy link
Member

marius-dr commented Nov 12, 2018

Kibana version: 6.5.0

Original install method (e.g. download page, yum, from source, etc.): BC6

Describe the bug:
Right now there seems to be minimal validation for the field values set in the kibana.yml for the overrides.
For example for the dateFormat:dow if the string value is something that doesn't exist in the list, it will go to the default value.
But if you use a string for numeric fields ( for example "context:defaultSize": "Ten" ), it won't reset to the default and it will try to use this value and throw an TypeError when the UI tries to use that value (in this example, when you click the "View Surrounding Documents" in Discover)

Steps to reproduce:

  1. Set this in kibana.yml
uiSettings:
    overrides:
        "context:defaultSize": "Ten"
  1. Start Kibana
  2. Click on "View surrounding documents" on a document in Discover.

Errors in browser console (if relevant):

TypeError: "anchor is null"
	fetchPredecessorRows http://localhost:5601/bundles/kibana.bundle.js:16:1404860
	try http://localhost:5601/bundles/commons.bundle.js:3:892566
	fetchPredecessorRows http://localhost:5601/bundles/kibana.bundle.js:16:1404837
	fetchContextRows http://localhost:5601/bundles/kibana.bundle.js:16:1406568
	fetchContextRowsWithNewQueryParameters http://localhost:5601/bundles/kibana.bundle.js:16:1406949
	actions http://localhost:5601/bundles/kibana.bundle.js:16:1386071
	ContextAppController http://localhost:5601/bundles/kibana.bundle.js:16:1387207
	watchCollectionAction http://localhost:5601/bundles/vendors.bundle.js:277:209531
	digest http://localhost:5601/bundles/vendors.bundle.js:277:210993
	evalAsync http://localhost:5601/bundles/vendors.bundle.js:277:212930
	completeOutstandingRequest http://localhost:5601/bundles/vendors.bundle.js:277:64421
	timeoutId http://localhost:5601/bundles/vendors.bundle.js:277:67265
 Possibly unhandled rejection: {} vendors.bundle.js:277:155519
	consoleLog/< http://localhost:5601/bundles/vendors.bundle.js:277:155519
	$ExceptionHandlerProvider/this.$get</< http://localhost:5601/bundles/vendors.bundle.js:277:122145
	processChecks http://localhost:5601/bundles/vendors.bundle.js:277:200240
	$digest http://localhost:5601/bundles/vendors.bundle.js:277:210409
	$evalAsync/< http://localhost:5601/bundles/vendors.bundle.js:277:212930
	completeOutstandingRequest http://localhost:5601/bundles/vendors.bundle.js:277:64421
	Browser/self.defer/timeoutId< http://localhost:5601/bundles/vendors.bundle.js:277:67265

We should have validation for the values and maybe also log a WARNING level message in the Kibana log if the validation fails. We currently do this for the other settings that we have in kibana.yml ( although I agree it might not be the exact same case as most of them are server settings)

cc @spalger

@marius-dr marius-dr added bug Fixes for quality problems that affect the customer experience :Management labels Nov 12, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management

@spalger spalger self-assigned this Nov 13, 2018
@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages and removed :Management DO NOT USE labels Nov 27, 2018
@lukeelmers lukeelmers added :AppArch and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Mar 27, 2019
@AlonaNadler
Copy link

@marius-dr any idea if this issue is still valid or should we close it?

@ppisljar ppisljar added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Mar 9, 2020
@elasticmachine
Copy link
Contributor

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

@ppisljar ppisljar removed Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:AppArch labels Mar 9, 2020
@mshustov
Copy link
Contributor

mshustov commented Mar 9, 2020

requires #46717

@spalger spalger removed their assignment Mar 10, 2020
@mshustov
Copy link
Contributor

mshustov commented Feb 5, 2021

closed in #59694

overrides are validated during start phase

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

8 participants