-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Regression] Histogram aggregation always shows an error message #63484
Conversation
# Conflicts: # src/plugins/data/public/plugin.ts # src/plugins/data/public/search/aggs/buckets/create_filter/ip_range.test.ts # src/plugins/data/public/search/search_service.ts
# Conflicts: # x-pack/plugins/maps/public/plugin.ts
src/legacy/core_plugins/kibana/public/discover/build_services.ts
Outdated
Show resolved
Hide resolved
src/legacy/core_plugins/kibana/public/discover/np_ready/angular/context/api/context.ts
Outdated
Show resolved
Hide resolved
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.
Tested and LGTM
Bug is not reproduced anymore.
@ppisljar mind throwing a quick look
fieldFormats: fieldFormatsServiceMock.createStartContract(), | ||
notifications: notificationServiceMock.createStartContract(), | ||
}); | ||
const getInternalStartServices: GetInternalStartServicesFn = () => |
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.
//nit
I see this block repeating in every agg metric - maybe extract it for future flexibility
src/plugins/saved_objects_management/public/lib/resolve_saved_objects.ts
Outdated
Show resolved
Hide resolved
private searchStrategyId?: string; | ||
private parent?: SearchSource; | ||
private requestStartHandlers: Array< | ||
(searchSource: ISearchSource, options?: FetchOptions) => Promise<unknown> | ||
(searchSource: SearchSource, options?: FetchOptions) => Promise<unknown> |
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.
Why did this change from ISearchSource
?
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.
SearchSource is a correct type here
# Conflicts: # x-pack/plugins/maps/public/layers/sources/es_source/es_source.d.ts
💚 Build SucceededHistory
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.
Reviewed Kibana app code and tested Visualize (input control vis, histogram bar chart) and Discover - didn't notice any problems. LGTM 👍
…stic#63484) * WIP [Regression] Histogram aggregation always shows an error message Closes: elastic#62624 * make getInternalStartServices private * fix ts issues * remove createSearchSource from static contract * fix some jest test * move searh_source to static contract * fix types * fix function tests * fix jest / add createStartServicesGetter * fix comments: saved_object_management * maps: fix PR comments * maps: update types * fix heck_published_api_changes * move searchSource into runtime contract * cleanup * fix ts error * cleanup * remove extra dependencies * fix Discover * fix Discover JEST * fix PR comments Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # src/plugins/data/public/public.api.md
) (#64211) * WIP [Regression] Histogram aggregation always shows an error message Closes: #62624 * make getInternalStartServices private * fix ts issues * remove createSearchSource from static contract * fix some jest test * move searh_source to static contract * fix types * fix function tests * fix jest / add createStartServicesGetter * fix comments: saved_object_management * maps: fix PR comments * maps: update types * fix heck_published_api_changes * move searchSource into runtime contract * cleanup * fix ts error * cleanup * remove extra dependencies * fix Discover * fix Discover JEST * fix PR comments Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # src/plugins/data/public/public.api.md
Closes: #62624
Summary
this PR closes a couple of issues related to
SearchSource
class (public/search/search_source/search_source.ts
).We shouldn't use
getters/getters
approach for static contract. This PR solves this problem, and now we pass all the necessary services directly from all places whereSearchSource
should be created.Important note:
We cannot add
SearchSource
to thesearch
runtime contract because thesearchService
is one of the required dependencies here.Checklist
Delete any items that are not applicable to this PR.
For maintainers