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

Fix incorrect config validation on SIGHUP #61246

Merged
merged 3 commits into from
Mar 25, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/legacy/server/kbn_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { constant, once, compact, flatten } from 'lodash';
import { isWorker } from 'cluster';
// eslint-disable-next-line @kbn/eslint/no-restricted-paths
import { fromRoot, pkg } from '../../core/server/utils';
import { Config } from './config';
import loggingConfiguration from './logging/configuration';
import httpMixin from './http';
import { coreMixin } from './core';
Expand Down Expand Up @@ -198,9 +197,7 @@ export default class KbnServer {
return await this.server.inject(opts);
}

applyLoggingConfiguration(settings) {
const config = new Config(this.config.getSchema(), settings);

applyLoggingConfiguration(config) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is only called from

this.kbnServer.applyLoggingConfiguration(getLegacyRawConfig(config, pathConfig));

The only difference between this config object and the one we inject when constructing KbnServer is that this one isn't extended by the legacy plugin discovery. So it won't include any plugin config keys, but as this is used only for logging it shouldn't be a problem.

const loggingOptions = loggingConfiguration(config);
const subset = {
ops: config.get('ops'),
Expand Down