[ResponseOps][Connectors] Zod lazy schemas @kbn/connector-schemas#265448
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
lorenabalan
left a comment
There was a problem hiding this comment.
MCP connector changes look good!
szwarckonrad
left a comment
There was a problem hiding this comment.
Thanks for addressing my concern!
LGTM!
| let actionTypeRegistry: ActionTypeRegistry; | ||
|
|
||
| beforeAll(async () => { | ||
| setLazySchemaDisabled(true); |
There was a problem hiding this comment.
nit: Is there any way to set up the kibanaServer to load with the following config instead of using setLazySchemaDisabled?
feature_flags:
overrides:
disableLazyZodSchemas: true
| aggregateBy: z.string().optional(), | ||
| }) | ||
| .strict(); | ||
| export const TelemetryMetadataSchema = lazySchema(() => |
There was a problem hiding this comment.
Maybe out of scope, but would there be a way to guarantee we always apply lazySchema? In other words, what about new ones? Could we implement something to not having to think about wrapping with lazySchema? Would it be possible to use it somehow at framework level once, instead of having to wrap all schemas?
There was a problem hiding this comment.
good point, it would be nice to have something that automatically wraps schemas with lazySchema, but I'm not sure if this is straightforward, maybe we could add a lint guard to enforce the usage of lazySchema
arturoliduena
left a comment
There was a problem hiding this comment.
LGTM - Only Obs AI code review
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Page load bundle
History
|
Closes #264179
Summary
@kbn/connector-schemaswithlazySchema()