Skip to content

[core.savedObjects] Update esKuery imports to pull from new package instead of data plugin #55485

@lukeelmers

Description

@lukeelmers

Blocked by #51659

Edit: The scope of this issue has been reduced -- right now the plan is to wait for the app services team to address #51659, which will move esKuery into a dedicated package again. Once that's complete, all we will need to do in Core is update our imports to use the new package instead.

In #42012 it was decided that we would move the @kbn/es-query package into the data plugin, which was merged in #51014.

In #41136, functionality was added to Saved Objects Client which allowed filtering using a KQL string. Internally, core was using the former @kbn/es-query package to parse the KQL.

Since es-query is no longer a standalone package, this means a dependency has been created between core (which owns saved objects), and data (which owns KQL). Having core depend on any other plugins runs counter to the overall design of the Kibana platform, so we need to go back and remove this dependency.

The plan discussed with @rudolf, @joshdover, and @Bargs is as follows:

- [ ] 1. @elastic/kibana-platform - Expose a generic ES filter api for Saved Objects find
- [ ] 2. @elastic/kibana-app-arch - #51659 After (1) is complete, create a server API in the Data Query Service that can take Saved Object Client & a KQL query and validate/compile the KQL to an ES Filter which is passed to the SO client. We should be able to reuse a lot of the existing code that does this from /src/core/server/saved_objects/service/lib/filter_utils.ts for this.

This particular issue is here to track (1) above, which blocks us from starting on (2 / #51659).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions