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

[UnifiedSearch] Expose QueryStringInput via plugin contract #173810

Merged
merged 12 commits into from
Jan 3, 2024

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Dec 21, 2023

Summary

Expose QueryStringInput via plugin contract this will make sure deps are handled by the component itself.

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@shahzad31
Copy link
Contributor Author

/ci

@shahzad31
Copy link
Contributor Author

/ci

@shahzad31
Copy link
Contributor Author

/ci

@shahzad31 shahzad31 marked this pull request as ready for review December 22, 2023 14:31
@shahzad31 shahzad31 requested review from a team as code owners December 22, 2023 14:31
@shahzad31 shahzad31 added the release_note:skip Skip the PR/issue when compiling release notes label Dec 22, 2023
@botelastic botelastic bot added Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team labels Dec 27, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

Obs UX LGTM

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Fleet changes LGTM!

@qn895
Copy link
Member

qn895 commented Dec 29, 2023

ML changes LGTM (tested and reviewed transform, ml files)

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

kibana-gis changes LGTM
code review only

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Nice devex enhancement. Question on some test removals.

Comment on lines 161 to 198
it('should render search bar and submit queries', async () => {
await mountSearchBar();

await waitForIndexPatternFetch();

act(() => {
instance.find(QueryStringInput).prop('onChange')!({ language: 'lucene', query: 'testQuery' });
});

act(() => {
instance.find('form').simulate('submit', { preventDefault: () => {} });
});

expect(dispatchSpy).toHaveBeenCalledWith({
type: 'x-pack/graph/workspace/SUBMIT_SEARCH',
payload: 'testQuery',
});
});

it('should translate kql query into JSON dsl', async () => {
await mountSearchBar();

await waitForIndexPatternFetch();

act(() => {
instance.find(QueryStringInput).prop('onChange')!({ language: 'kuery', query: 'test: abc' });
});

act(() => {
instance.find('form').simulate('submit', { preventDefault: () => {} });
});

const parsedQuery = JSON.parse(dispatchSpy.mock.calls[0][0].payload);
expect(parsedQuery).toEqual({
bool: { should: [{ match: { test: 'abc' } }], minimum_should_match: 1 },
});
});

Copy link
Contributor

Choose a reason for hiding this comment

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

Why have these tests been removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@drewdaemon i have restored these tests

@shahzad31 shahzad31 enabled auto-merge (squash) January 3, 2024 14:31
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #64 / aiops log pattern analysis loads the log pattern analysis page and filters in patterns in discover

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
unifiedSearch 219 220 +1

Async chunks

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

id before after diff
apm 3.1MB 3.1MB -237.0B
fleet 1.2MB 1.2MB -181.0B
graph 387.2KB 387.1KB -166.0B
ml 3.6MB 3.6MB -352.0B
observability 587.6KB 587.2KB -338.0B
stackAlerts 82.9KB 82.7KB -212.0B
transform 402.8KB 402.5KB -226.0B
uptime 458.8KB 458.4KB -398.0B
visDefaultEditor 141.0KB 140.7KB -211.0B
total -2.3KB

Page load bundle

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

id before after diff
apm 34.3KB 34.1KB -143.0B
graph 8.1KB 7.9KB -143.0B
ml 78.2KB 78.0KB -144.0B
transform 18.3KB 18.2KB -143.0B
unifiedSearch 35.4KB 35.6KB +221.0B
uptime 22.1KB 22.0KB -143.0B
visDefaultEditor 21.2KB 21.1KB -143.0B
total -638.0B

History

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

@shahzad31 shahzad31 merged commit 999d8fd into elastic:main Jan 3, 2024
24 checks passed
@kibanamachine kibanamachine added v8.13.0 backport:skip This commit does not require backporting labels Jan 3, 2024
@shahzad31 shahzad31 deleted the kql-refactor branch January 3, 2024 15:43
nreese pushed a commit to nreese/kibana that referenced this pull request Jan 4, 2024
…173810)

## Summary

Expose QueryStringInput via plugin contract this will make sure deps are
handled by the component itself.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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 release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.