-
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
cleaning up expression service types #80643
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
I think Wylie just merged his PR which exposes |
0754cd7
to
c81a42e
Compare
c81a42e
to
90b1f5b
Compare
90b1f5b
to
613f873
Compare
613f873
to
de93ecf
Compare
de93ecf
to
05aca66
Compare
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.
From searchSessionid
perspective lgtm.
Started using it in #81297 and works great.
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.
Couple minor TS nits, but overall this cleanup makes things much clearer! 👍
: createDefaultInspectorAdapters()) as InspectorAdapters, | ||
inspectorAdapters: | ||
execution.params.inspectorAdapters || | ||
((createDefaultInspectorAdapters() as any) as InspectorAdapters), |
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.
looks like DefaultInspectorAdapters extends Adapters
, why is the as any) as InspectorAdapters
necessary here?
query: [...toArray((getSearchContext() as any).query), ...toArray((input || {}).query)], | ||
filters: [...((getSearchContext() as any).filters || []), ...((input || {}).filters || [])], | ||
timeRange: (getSearchContext() as any).timeRange || (input ? input.timeRange : undefined), |
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.
Feels like we shouldn't need to cast to any
here -- presumably getSearchContext()
is getting its type from ExecutionContextSearch
, in which case query, filters, timeRange are all undefined so you should still be able to use them right?
(Or worst-case do getSearchContext().query!
)
💚 Build SucceededMetrics [docs]page load bundle size
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.
Code review only of the kibana app team. LGTM!
…arm-phase-to-formlib * 'master' of github.com:elastic/kibana: [Trigger Actions UI] Properly unmount app (elastic#81436) skip flaky suite (elastic#81576) skip flaky suite (elastic#78373) [Security Solution] Fix styling of EditDataProvider content (elastic#81456) [Search] Error Alignment 2 (elastic#80965) [APM] Unskip test (elastic#81574) [ML] Fix partition value selection on the Single Metric Viewer (elastic#81585) cleaning up expression service types (elastic#80643) Fix suggestions dropdown for query input (elastic#80990) [Usage collection] Make `schema` mandatory (elastic#79999) [ILM] Update show/hide data tier logic on cloud (elastic#81455) added brace import to advanced settings (elastic#81458) chore(NA): add spec-to-console and plugin-helpers as devOnly dependencies
Summary
Cleans up some types on expressions and:
getInitialInput()
fromcontext
(which was not used by anyone)context.search
behind context.getSearchContext() methodgetSearchSessionId()
to context as well assearchSessionId
parameter to executor/loaderChecklist
Delete any items that are not applicable to this PR.
For maintainers