Skip to content

Conversation

@alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Nov 11, 2019

Summary

Part of #42885

What was done in this PR:

  • move es-query/es-query into new platform;
  • new namespace was created for es-query code. Now all code related to es-query located in esQuery namespace;
  • tests were migrated from Mocha -> Jest;

Dev Docs

Relocated @kbn/es-query package to data plugin

The @kbn/es-query package has been moved to src/plugins/data and is available under the esQuery namespace on both the client and the server.

// old
import {
  buildEsQuery,
  EsQueryConfig,
  buildQueryFromFilters,
  luceneStringToDsl,
  decorateQuery,
  getEsQueryConfig,
} from '@kbn/es-query';

// new
import { esQuery } from 'src/plugins/data/public'; // or `src/plugins/data/server`
esQuery.buildEsQuery(...);

@alexwizp alexwizp self-assigned this Nov 11, 2019
@alexwizp alexwizp added the WIP Work in progress label Nov 11, 2019
@alexwizp alexwizp changed the title Move @kbn/es-query into data plugin - es-query folder [WIP] Move @kbn/es-query into data plugin - es-query folder Nov 11, 2019
@alexwizp alexwizp force-pushed the es-query branch 4 times, most recently from d8b3a34 to b5abc40 Compare November 12, 2019 12:57
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@alexwizp alexwizp force-pushed the es-query branch 2 times, most recently from 72cf022 to 0765f00 Compare November 12, 2019 14:09
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@alexwizp alexwizp force-pushed the es-query branch 2 times, most recently from f7f4d37 to dd7a342 Compare November 12, 2019 20:16
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@elastic elastic deleted a comment from elasticmachine Nov 12, 2019
@alexwizp alexwizp force-pushed the es-query branch 2 times, most recently from 1d11e66 to 61e89b3 Compare November 13, 2019 08:23
@elastic elastic deleted a comment from elasticmachine Nov 13, 2019
@alexwizp
Copy link
Contributor Author

retest

@alexwizp alexwizp marked this pull request as ready for review November 13, 2019 08:51
@alexwizp alexwizp requested a review from a team November 13, 2019 08:51
@alvarezmelissa87
Copy link
Contributor

Gave this a test and I wasn't able to load Kibana. Kept getting this error:
image

With this console error:
image

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally & no other concerns on my end.

# Conflicts:
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
#	x-pack/legacy/plugins/siem/public/lib/keury/index.ts
@lizozom
Copy link
Contributor

lizozom commented Nov 15, 2019

@alvarezmelissa87 if you could test once build passes

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@alexwizp
Copy link
Contributor Author

@Bargs @TinaHeiligers @alvarezmelissa87 could you please give me a final review?

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a test and LGTM ⚡️

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Bargs Bargs removed their request for review November 15, 2019 20:07
@alexwizp alexwizp merged commit 9769be3 into elastic:master Nov 15, 2019
alexwizp added a commit to alexwizp/kibana that referenced this pull request Nov 16, 2019
* Move @kbn/es-query into data plugin - es-query

* fix eslint issues

* Fix PR comments

* fix CI

* fix Ci

* remove extra ts-ignore

* fix imports

* fix imports

* Test importing from data/public and casting to ES Field Types.

* Test importing from data/public and casting to ES Field Types.

# Conflicts:
#	src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.tsx
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
#	x-pack/legacy/plugins/siem/public/lib/keury/index.ts
#	x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx
#	x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx
#	x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx
alexwizp added a commit that referenced this pull request Nov 16, 2019
…50824)

* Move @kbn/es-query into data plugin - es-query folder (#50182)

* Move @kbn/es-query into data plugin - es-query

* fix eslint issues

* Fix PR comments

* fix CI

* fix Ci

* remove extra ts-ignore

* fix imports

* fix imports

* Test importing from data/public and casting to ES Field Types.

* Test importing from data/public and casting to ES Field Types.

# Conflicts:
#	src/legacy/core_plugins/data/public/index_patterns/index_patterns/index_pattern.tsx
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.test.tsx
#	x-pack/legacy/plugins/siem/public/components/timeline/helpers.tsx
#	x-pack/legacy/plugins/siem/public/lib/keury/index.ts
#	x-pack/legacy/plugins/siem/public/pages/hosts/details/index.tsx
#	x-pack/legacy/plugins/siem/public/pages/hosts/hosts.tsx
#	x-pack/legacy/plugins/siem/public/pages/network/ip_details/index.tsx

* fix merge conflicts
jloleysens added a commit to jloleysens/kibana that referenced this pull request Nov 18, 2019
…her [skip ci]

* upstream/master: (54 commits)
  allows plugins to define validation schema for "enabled" flag (elastic#50286)
  Add retry to find.existsByDisplayedByCssSelector (elastic#48734)
  [i18n] integrate latest translations (elastic#50864)
  ui/resize_checker 👉 src/plugins/kibana_utils (elastic#44750)
  Fix @reach/router types (elastic#50863)
  [ML] Adding ML node warning to overview and analytics pages (elastic#50766)
  Bump storybook dependencies (elastic#50752)
  [APM Replace usage of idx with optional chaining (elastic#50849)
  [SIEM] Fix eslint errors (elastic#49713)
  Improve "Browser client is out of date" error message (elastic#50296)
  [SIEM][Detection Engine] REST API improvements and changes from UI/UX feedback (elastic#50797)
  Move @kbn/es-query into data plugin - es-query folder (elastic#50182)
  Index Management new platform migration (elastic#49359)
  Increase retry for cloud snapshot to finish (elastic#50781)
  Removing EuiCode from inside EuiPanel (elastic#50683)
  [SIEM] Tests for search_after and bulk index (elastic#50129)
  Make babel understand TypeScript 3.7 syntax (elastic#50772)
  Fixing mocha tests and broken password change status codes (elastic#50704)
  [Canvas] Use compressed forms in sidebar (elastic#49419)
  Add labels to shell scripts in Jenkins (elastic#49657)
  ...
@lukeelmers lukeelmers added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 11, 2019
@alexwizp alexwizp deleted the es-query branch January 4, 2020 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:NP Migration Feature:Query Bar Querying and query bar features release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v7.6.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants