In the LegacyService, we are creating the cluster manager by passing the actual legacy configuration
|
require('../../../cli/cluster/cluster_manager').create( |
|
this.coreContext.env.cliArgs, |
|
config, |
|
await basePathProxy$.toPromise() |
|
); |
However the function actually expects the raw settings instead
|
export default class ClusterManager { |
|
static create(opts, settings = {}, basePathProxy) { |
|
return new ClusterManager( |
|
opts, |
|
Config.withDefaultSchema(settings), |
|
basePathProxy |
|
); |
|
} |
From #52251 (comment):
The fix is (well, should be) easy
require('../../../cli/cluster/cluster_manager').create(
this.coreContext.env.cliArgs,
-- config,
++ config.get(),
await basePathProxy$.toPromise()
);
However the legacy service tests are a mess, and are not properly mocking with correct object types (the config in test is actually a Record and not a LegacyConfig ). Already had to fix that in #52060, so would be easier to fix in a separate PR once it lands.
In the
LegacyService, we are creating the cluster manager by passing the actual legacy configurationkibana/src/core/server/legacy/legacy_service.ts
Lines 249 to 253 in 14b8727
However the function actually expects the raw settings instead
kibana/src/cli/cluster/cluster_manager.js
Lines 35 to 42 in 03549fa
From #52251 (comment):
The fix is (well, should be) easy
However the legacy service tests are a mess, and are not properly mocking with correct object types (the config in test is actually a Record and not a LegacyConfig ). Already had to fix that in #52060, so would be easier to fix in a separate PR once it lands.