Skip to content
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

[Unified Search] Move autocomplete logic to unified search plugin #129977

Merged

Conversation

nlatipov
Copy link
Contributor

@nlatipov nlatipov commented Apr 12, 2022

Closes: #128383

Summary

Motivation:
After PR #127651 is merged, next step is move the autocomplete folder to the unified_search plugin. No extra functionality is going to be added (or cleanups or improvements).

What was done:

  1. data/plugin/autocomplete folder was moved into unified_search;
  2. data/plugin/server/autocomplete folder was moved into unified_search;
  3. The following part was moved from from the Data Plugin runtime contract to UnifiedSearch Plugin
  autocomplete: this.autocomplete.start(),
  1. Related Static and Runtime imports were updated
  2. Added the unifiedSearch plugin as a dependency to plugins that require plugins (Kibana.json)
  3. Registered a unifiedSearch plugin in the i18n (translations) plugin
  4. data/server/config_deprecations.ts file was moved into unified_search/server and added renameFromRoot for autocomplete;
  5. Added Autocomplete service
  6. config_deprecations.ts file was moved from Data plugin server to UnifiedSearch server folder
  7. Bundle size optimization will be implemented in another pull request issue 129978

@alexwizp alexwizp added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Unified search Unified search related tasks v8.3.0 backport:skip This commit does not require backporting labels Apr 12, 2022
@nlatipov nlatipov marked this pull request as ready for review April 12, 2022 08:50
@nlatipov nlatipov requested review from a team as code owners April 12, 2022 08:50
@nlatipov nlatipov requested a review from pzl April 12, 2022 08:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@nlatipov nlatipov requested a review from ashokaditya April 12, 2022 08:50
Copy link
Member

@azasypkin azasypkin left a comment

Choose a reason for hiding this comment

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

Changes in expectedExposedConfigKeys LGTM (from security perspective).

@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team labels Apr 12, 2022
@kibanamachine
Copy link
Contributor

merge conflict between base and head

@nlatipov
Copy link
Contributor Author

nlatipov commented Apr 19, 2022

@banderror thanks for your review, attentiveness and comment regarding the tests. We will also take into account your recommendations in other PRs.

@nlatipov
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@ashokaditya ashokaditya left a comment

Choose a reason for hiding this comment

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

plugins/security_solution changes look good.

@nlatipov
Copy link
Contributor Author

@pzl, @elastic/infra-monitoring-ui, @elastic/security-threat-hunting-investigations we need your 👀 here. Please review

@pzl pzl removed their request for review April 20, 2022 18:14
Copy link
Contributor

@michaelolo24 michaelolo24 left a comment

Choose a reason for hiding this comment

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

Threat Hunting Investigations changes LGTM! Thanks for doing this work

Copy link
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

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

LGTM! (I hate when prettier just decides to reorder imports while you're doing other things lol)

@nlatipov
Copy link
Contributor Author

@elasticmachine merge upstream

@nlatipov
Copy link
Contributor Author

@elasticmachine merge upstream

@nlatipov
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Cases Cypress Tests on Security Solution / Alerts timeline Privileges: can crud should allow a user with crud privileges to attach alerts to cases

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
controls 180 182 +2
data 470 456 -14
unifiedSearch 143 157 +14
total +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 2811 2803 -8
unifiedSearch 45 75 +30
total +22

Any counts in public APIs

Total count of every any typed public API. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats any for more detailed information.

id before after diff
data 39 38 -1
unifiedSearch 1 2 +1
total -0

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.8MB 2.8MB +9.0B
controls 437.6KB 437.7KB +100.0B
fleet 693.3KB 693.3KB +18.0B
infra 1002.7KB 1002.7KB +18.0B
lens 1.1MB 1.1MB +148.0B
ml 3.3MB 3.3MB +9.0B
monitoring 471.1KB 471.1KB +19.0B
securitySolution 4.8MB 4.8MB +36.0B
synthetics 783.7KB 783.7KB +9.0B
unifiedSearch 138.4KB 116.2KB -22.2KB
total -21.8KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
data 20 18 -2
unifiedSearch 6 11 +5
total +3

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
controls 34.1KB 34.2KB +53.0B
data 423.1KB 410.9KB -12.2KB
inputControlVis 5.4KB 5.5KB +32.0B
maps 70.1KB 70.1KB +9.0B
ml 39.3KB 39.3KB +30.0B
monitoring 23.5KB 23.7KB +143.0B
unifiedSearch 41.5KB 87.8KB +46.3KB
total +34.3KB
Unknown metric groups

API count

id before after diff
data 3421 3415 -6
unifiedSearch 48 79 +31
total +25

async chunk count

id before after diff
unifiedSearch 10 9 -1

ESLint disabled line counts

id before after diff
data 40 39 -1
unifiedSearch 12 15 +3
total +2

References to deprecated APIs

id before after diff
data 397 375 -22
unifiedSearch 145 253 +108
total +86

Total ESLint disabled count

id before after diff
data 44 43 -1
unifiedSearch 12 15 +3
total +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nlatipov

@nlatipov nlatipov merged commit 7c01257 into elastic:main Apr 22, 2022
@Dosant Dosant mentioned this pull request Apr 25, 2022
1 task
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
…astic#129977)

* feat: move autocomplete logic from data plugin to unified search

* minor fix after comments

* updated Documentation: data.autocomplete -> unifiedSearch.autocomplete

* changed renameFromRoot order for autocomplete

* removed extra renameFromRoot in config deprecations, updated test

* added configPath for unified search plugin

* Update kibana.json

* updated path to autocomplete

* fix conflict

* fix conflict

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix Linting

* fix functional_with_es_ssl test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:all-cypress-suites Feature:Unified search Unified search related tasks release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Fleet Team label for Observability Data Collection Fleet team Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Unified search] Move the autocomplete logic to the unified search plugin