kibana/x-pack/plugins/data_enhanced
Ryland Herrick e60cfa09ae
[Security Solution][Detections] Convert EQL validation to use search strategy (#79538)
* Rename types from the top-level plugin

These are the same types with a different name. However, the benefit is
that they exist in a non-restricted path (the top level of the plugin).

* Convert our validation function to use the EQL search strategy

Rather than calling our custom EQL validation endpoint, we can instead
leverage the EQL search strategy. The downside is that we have to move
our response parsing logic to the frontend, but the benefit is that
there's no backend to maintain.

* Remove server code related to our EQL validation endpoint

We're keeping our io-ts schemas for now since they're still being used
to type the I/O of our client function.

* Add the data contract to our KibanaServices

I'm not aware of a way to pass react context to the form lib validator
functions, so for now we have to pass this the ugly way :(

* Remove io-ts types corresponding to our defunct validation endpoint

We were keeping these around for the types, but they're so simple that
it's really not worth the overhead. The tests are similarly for
functionality that is no longer used, so no hard feelings there.

* Ensure that our validation does not bother generating hits

We only care about the query's validity, so we can tell the response
handler to do less work here.

* Pass transport options when retrieving an existing search

Without passing transport options to .get, a query with an `ignore`
would succeed if it completed in the `waitForCompletionTimeout` window,
but fail (with the ignored error) on the subsequent request if it became
async.

* Use constant for our strategy key

* Export search strategy constants for client consumption

Common values cannot be consumed directly by client code (compilation
error), so we need to re-export them from data_enhanced's public module.
2020-10-06 20:45:57 -05:00
..
common [Search]Add EQL search strategy (#78645) 2020-10-05 11:30:32 -05:00
public [Security Solution][Detections] Convert EQL validation to use search strategy (#79538) 2020-10-06 20:45:57 -05:00
server [Security Solution][Detections] Convert EQL validation to use search strategy (#79538) 2020-10-06 20:45:57 -05:00
kibana.json [Search] Remove long-running query pop-up (#75385) 2020-09-13 10:20:10 -07:00