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] Create unified search plugin #127651

Merged
merged 48 commits into from
Apr 5, 2022

Conversation

nlatipov
Copy link
Contributor

@nlatipov nlatipov commented Mar 14, 2022

Summary

This PR is solves part of Issue: #127243

Motivation:
As a first step we want to move the ui folder of the data plugin to a new plugin, unified_search. No extra functionality is going to be added (or cleanups or improvements). All the applications that are using the SearchBar should be updated to import it from the new plugin.

What was done:

  1. new unified_search plugin was created;
  2. data/plugin/ui folder was moved into unified_search;
  3. The following part was moved from from the Data Plugin runtime contract to UnifiedSearch Plugin
  ui: {
      IndexPatternSelect: jest.fn(),
      SearchBar: jest.fn().mockReturnValue(null),
    },
  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/plugin/actions/apply_filter_action.ts file was moved into unified_search;

@nlatipov
Copy link
Contributor Author

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibana-ci Mar 17, 2022
@alexwizp
Copy link
Contributor

@elasticmachine merge upstream

@elastic elastic deleted a comment from kibana-ci Mar 17, 2022
@alexwizp
Copy link
Contributor

@elasticmachine merge upstream

@nlatipov nlatipov changed the title Issue move UI to unified search [Unified search] Create unified search plugin Mar 18, 2022
@alexwizp alexwizp force-pushed the issue-move-UI-to-unified_search branch from 144f5ad to 65fd06b Compare March 21, 2022 06:29
@alexwizp
Copy link
Contributor

@elasticmachine merge upstream

@alexwizp alexwizp marked this pull request as ready for review March 21, 2022 13:15
@alexwizp alexwizp requested review from a team as code owners March 21, 2022 13:15
Copy link
Contributor

@fkanout fkanout left a comment

Choose a reason for hiding this comment

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

Actionable Observability changes LGTM.

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

ML changes LGTM (code and tested locally).

@stratoula stratoula added backport:skip This commit does not require backporting Feature:Unified search Unified search related tasks labels Mar 31, 2022
@nlatipov
Copy link
Contributor Author

nlatipov commented Apr 4, 2022

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@nlatipov
Copy link
Contributor Author

nlatipov commented Apr 4, 2022

@elastic/kibana-design, @elastic/security-onboarding-and-lifecycle-mgt, @elastic/security-solution we need your 👀 here. Please review

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. I have a few changes that I'd like to be made.

@nlatipov
Copy link
Contributor Author

nlatipov commented Apr 4, 2022

@elasticmachine merge upstream

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Moved SCSS files; updated import paths.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 537 470 -67
unifiedSearch - 143 +143
total +76

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 2846 2816 -30
triggersActionsUi 288 290 +2
unifiedSearch - 45 +45
total +17

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
unifiedSearch - 1 +1

Async chunks

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

id before after diff
cloudSecurityPosture 369.7KB 369.7KB +9.0B
data 117.2KB 15.1KB -102.0KB
dataViewManagement 123.9KB 123.9KB +41.0B
dataVisualizer 539.6KB 539.7KB +48.0B
graph 476.8KB 476.8KB +10.0B
infra 1005.7KB 1005.7KB +12.0B
inputControlVis 77.6KB 77.6KB +18.0B
lens 1.1MB 1.1MB +22.0B
maps 2.5MB 2.5MB +32.0B
ml 3.3MB 3.3MB +14.0B
observability 427.1KB 427.1KB +17.0B
securitySolution 4.9MB 4.9MB +55.0B
stackAlerts 202.7KB 202.8KB +88.0B
transform 374.8KB 374.8KB +1.0B
triggersActionsUi 697.7KB 697.8KB +35.0B
unifiedSearch - 138.4KB +138.4KB
visDefaultEditor 142.4KB 142.4KB +14.0B
visTypeTimeseries 470.1KB 470.2KB +15.0B
total +36.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 27 20 -7
unifiedSearch - 6 +6
total -1

Page load bundle

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

id before after diff
data 459.6KB 422.3KB -37.3KB
fleet 110.8KB 110.8KB +9.0B
graph 7.1KB 7.3KB +143.0B
infra 88.1KB 88.2KB +143.0B
lens 30.1KB 30.3KB +143.0B
maps 69.8KB 70.0KB +223.0B
ml 39.3KB 39.5KB +143.0B
navigation 9.3KB 9.4KB +45.0B
observability 91.2KB 91.4KB +143.0B
securitySolution 251.5KB 251.6KB +175.0B
stackAlerts 12.5KB 12.6KB +143.0B
transform 15.0KB 15.1KB +143.0B
triggersActionsUi 98.6KB 98.6KB +30.0B
unifiedSearch - 41.5KB +41.5KB
uptime 25.2KB 25.2KB +9.0B
visDefaultEditor 20.9KB 21.1KB +143.0B
visTypeTimeseries 16.2KB 16.4KB +143.0B
total +5.8KB
Unknown metric groups

API count

id before after diff
data 3459 3426 -33
triggersActionsUi 302 304 +2
unifiedSearch - 48 +48
total +17

async chunk count

id before after diff
data 10 2 -8
unifiedSearch - 10 +10
total +2

ESLint disabled line counts

id before after diff
data 42 32 -10
unifiedSearch - 12 +12
total +2

References to deprecated APIs

id before after diff
data 464 406 -58
unifiedSearch - 255 +255
total +197

Total ESLint disabled count

id before after diff
data 46 36 -10
unifiedSearch - 12 +12
total +2

Unreferenced deprecated APIs

id before after diff
data 59 56 -3

History

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

cc @nlatipov

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.

Thanks for the changes @nlatipov

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 Feature:Drilldowns Embeddable panel Drilldowns Feature:Search Querying infrastructure in Kibana Feature:Unified search Unified search related tasks release_note:skip Skip the PR/issue when compiling release notes 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.