-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Search][BUG] Call wrong search strategy recursively in async search #69116
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added a minor comment below.
@@ -24,7 +24,11 @@ describe('Async search strategy', () => { | |||
beforeEach(() => { | |||
mockCoreSetup = coreMock.createSetup(); | |||
mockDataStart = dataPluginMock.createStartContract(); | |||
(mockDataStart.search.getSearchStrategy as jest.Mock).mockReturnValue({ search: mockSearch }); | |||
|
|||
const getStrategy = mockDataStart.search.getSearchStrategy as jest.Mock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we need to cast here. But since it's already there and not specific to this PR, I'm fine with it.
x-pack/plugins/data_enhanced/public/search/async_search_strategy.test.ts
Outdated
Show resolved
Hide resolved
💚 Build SucceededBuild metricspage load asset sizebeta
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, code review only. Just a changed mock
…lastic#69116) * Call sync search recursively * Fix test * Fix search mock to avoid resetting it * delete empty line * fix tests
* master: (91 commits) [Search][BUG] Call wrong search strategy recursively in async search (elastic#69116) [Observability] Create context container to enable Observability plugin registry function (elastic#68642) Rename space id for disabled index pattern test (elastic#68990) skip flaky suite (elastic#63339) Resolver Light Theme And Kibana Integration (elastic#67859) [kbn/dev-utils] expose public tooling_log module (elastic#68868) index pattern(s) take dependencies as object (elastic#69055) include ci-stats metrics in pr comment (elastic#68563) Bump webpack packages (elastic#68716) [Uptime] Fixed metric query broken because of missing mapping (elastic#68999) Added cloud as an optional dependency (elastic#69050) Fixed all external links (elastic#68614) [DOCS] Reorganizes doc nav to match new Kibana nav (elastic#69069) [Endpoint] Using the stats provided by the backend for resolver UI (elastic#68577) [DOCS] Removees 8.0 from Upgrade Assistant docs (elastic#69067) [ML] Fix cloud deployment ID check (elastic#68695) [DOCS] Move metrics app content to metrics monitoring guide (elastic#69033) Add ingest manager topic to docs (elastic#68980) [SECURITY SOLUTION] EMT-401: add policy data to metadata and fix tests (elastic#68582) [DOCS] Fixes POST request for saved objects (elastic#69036) ...
* master: (60 commits) Re-enable mistakenly skipped tests. (elastic#69123) [Search][BUG] Call wrong search strategy recursively in async search (elastic#69116) [Observability] Create context container to enable Observability plugin registry function (elastic#68642) Rename space id for disabled index pattern test (elastic#68990) skip flaky suite (elastic#63339) Resolver Light Theme And Kibana Integration (elastic#67859) [kbn/dev-utils] expose public tooling_log module (elastic#68868) index pattern(s) take dependencies as object (elastic#69055) include ci-stats metrics in pr comment (elastic#68563) Bump webpack packages (elastic#68716) [Uptime] Fixed metric query broken because of missing mapping (elastic#68999) Added cloud as an optional dependency (elastic#69050) Fixed all external links (elastic#68614) [DOCS] Reorganizes doc nav to match new Kibana nav (elastic#69069) [Endpoint] Using the stats provided by the backend for resolver UI (elastic#68577) [DOCS] Removees 8.0 from Upgrade Assistant docs (elastic#69067) [ML] Fix cloud deployment ID check (elastic#68695) [DOCS] Move metrics app content to metrics monitoring guide (elastic#69033) Add ingest manager topic to docs (elastic#68980) [SECURITY SOLUTION] EMT-401: add policy data to metadata and fix tests (elastic#68582) ...
Summary
Bug was introduced in #60342
This PR fixes calling wrong strategy recursively and adds a test improvement to prevent this in the future.
Checklist
Delete any items that are not applicable to this PR.
For maintainers