-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[new-platform] Doesn't validate config on startup #34812
Comments
Plugin discovery should support x-pack in the next couple days. It was intentionally omitted so far, but it's up next. I believe that log line you linked would only fire if something actually subscribed to the exposed I'm not sure why the |
#34725 Fixes the signatures. |
To add some additional comments to @zfy0701's comment, the config validation failed because of the error in here. The Also, the console throws out the right error when you add some print statements for debugging. However, without these print statements, the error won't be triggered, which is also weird.
|
problem 1. Cannot run Kibana server in dev mode when New platform plugin specifies config in kibana.ymlsteps to reproduce:
This error happens on Optimizer server, where |
true. to check it works public setup(setupContext: PluginSetupContext, deps: Record<PluginName, unknown>) {
this.log.debug(
`Setting up TestBed with core contract [${Object.keys(setupContext)}] and deps [${Object.keys(
deps
)}]`
);
const data$ = this.initializerContext.config.create(TestBedConfig).pipe(
map(config => {
this.log.debug(`I've got value from my config: ${config.secret}`);
return `Some exposed data derived from config: ${config.secret}`;
})
);
data$.subscribe(console.log);
return {
data$,
... |
@mw-ding how can I reproduce the error on your screenshot? I tried to add an invalid property to logging config and start immediately failed regarding #34812 (comment)
Legacy platform plugins are discovered in
So Legacy platform doesn't know about New platform plugins status (initialized, disabled, run, etc.). I'd suggest excluding all config keys for New Platform plugins from this check https://github.com/elastic/kibana/blob/master/src/legacy/server/config/complete.js#L27 |
I talked to @azasypkin and he mentioned that we already have related issue to validate config upfront #20303
|
Cannot reproduce the TypeError now. And yes, it immediately failed after providing an invalid property. |
I'm trying to create a migrate PR here #34766 to see what's it looks like, here is a few issues I found
server/plugin.ts
, thepublic stop(core: PluginStop)
has wrong signaturepublic/plugin.ts
andpublic/index.ts
are totally wrongx-pack/plugins
: https://github.com/elastic/kibana/pull/34766/files#diff-818ea503e65da33d3ecda21f8aaf2a1dR120core.testbed.secret
when configured it inkibana.yml
The text was updated successfully, but these errors were encountered: