mirror of
https://github.com/elastic/kibana.git
synced 2025-04-20 16:03:20 -04:00
* Surfacing deprecations with rich context from ES warning header (elastic#120044) * First stab at surfacing deprecations from warning header * Log deprecations with error level but disable logger context by default * Don't filter out error logs from ProcRunner * Another try at not having messages ignored on CI * Log deprecation logs with warn not info * Tests * Let write() do it's writing * Commit pre-built @kbn/pm package * Second try to commit pre-built @kbn/pm package * Enable deprecation logger for jest_integration even though logs aren't interleaved * Apply suggestions from code review Co-authored-by: Luke Elmers <lukeelmers@gmail.com> * deprecations logger: warn for kibana and debug for users * Refactor split query and deprecation logger out of configure_client * Unit test for tooling_log_text_writer * Fix TS * Use event.meta.request.params.headers to include Client constructor headers * Fix tests * Ignore deprecation warnings not from Elasticsearch * Log on info level * Log in JSON so that entire deprecation message is on one line * commit built kbn-pm package * Remove stack traces as these are useless on 7.x
66 lines
2.7 KiB
JavaScript
66 lines
2.7 KiB
JavaScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
* Side Public License, v 1.
|
|
*/
|
|
|
|
import path from 'path';
|
|
import { format as formatUrl } from 'url';
|
|
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
|
|
import { services } from './services';
|
|
|
|
export default function () {
|
|
const servers = {
|
|
kibana: kbnTestConfig.getUrlParts(),
|
|
elasticsearch: esTestConfig.getUrlParts(),
|
|
};
|
|
|
|
return {
|
|
servers,
|
|
|
|
esTestCluster: {
|
|
serverArgs: ['xpack.security.enabled=false'],
|
|
},
|
|
|
|
kbnTestServer: {
|
|
buildArgs: [],
|
|
sourceArgs: ['--no-base-path', '--env.name=development'],
|
|
serverArgs: [
|
|
'--logging.json=false',
|
|
`--server.port=${kbnTestConfig.getPort()}`,
|
|
'--status.allowAnonymous=true',
|
|
// We shouldn't embed credentials into the URL since Kibana requests to Elasticsearch should
|
|
// either include `kibanaServerTestUser` credentials, or credentials provided by the test
|
|
// user, or none at all in case anonymous access is used.
|
|
`--elasticsearch.hosts=${formatUrl(
|
|
Object.fromEntries(
|
|
Object.entries(servers.elasticsearch).filter(([key]) => key.toLowerCase() !== 'auth')
|
|
)
|
|
)}`,
|
|
`--elasticsearch.username=${kibanaServerTestUser.username}`,
|
|
`--elasticsearch.password=${kibanaServerTestUser.password}`,
|
|
// Needed for async search functional tests to introduce a delay
|
|
`--data.search.aggs.shardDelay.enabled=true`,
|
|
`--security.showInsecureClusterWarning=false`,
|
|
'--telemetry.banner=false',
|
|
'--telemetry.optIn=false',
|
|
// These are *very* important to have them pointing to staging
|
|
'--telemetry.sendUsageTo=staging',
|
|
`--server.maxPayload=1679958`,
|
|
// newsfeed mock service
|
|
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'newsfeed')}`,
|
|
`--newsfeed.service.urlRoot=${servers.kibana.protocol}://${servers.kibana.hostname}:${servers.kibana.port}`,
|
|
`--newsfeed.service.pathTemplate=/api/_newsfeed-FTS-external-service-simulators/kibana/v{VERSION}.json`,
|
|
// Log deprecation warnings on a single line so that they aren't cut off on Buildkite logs
|
|
'--logging.appenders.deprecation.type=console',
|
|
'--logging.appenders.deprecation.layout.type=json',
|
|
'--logging.loggers[0].name=elasticsearch.deprecation',
|
|
'--logging.loggers[0].level=all',
|
|
'--logging.loggers[0].appenders[0]=deprecation',
|
|
],
|
|
},
|
|
services,
|
|
};
|
|
}
|