[Expressions] Refactor expression functions to use observables underneath#100409
[Expressions] Refactor expression functions to use observables underneath#100409dokmic merged 2 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-app-services (Team:AppServices) |
src/plugins/expressions/common/expression_functions/specs/map_column.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
i think we don't need the pipe here
There was a problem hiding this comment.
We do need that because the expression returns a value that we need to put into the row. The expression is an observable, so we have to use the pipe here to process the value upon subscription.
There was a problem hiding this comment.
zip will wait for all rows to emit the first value .... should we consider emitting rows as they come ?
There was a problem hiding this comment.
I guess that behavior will be backward incompatible and may not work as expected without adapting the code in other plugins.
There was a problem hiding this comment.
why do we need to pipe here?
There was a problem hiding this comment.
That's here because we need to process rows altogether and put them into a datatable.
There was a problem hiding this comment.
when returns an observable. That's the cleanest way to convert the value.
x-pack/plugins/canvas/canvas_plugin_src/functions/common/case.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Corrected the argument type, but the code remains the same because then and else are optional.
There was a problem hiding this comment.
by will always exist (will be empty array if not set)
There was a problem hiding this comment.
I've checked that, and optional multi-valued arguments are actually undefined.
poffdeluxe
left a comment
There was a problem hiding this comment.
Tested this out across a few different workpads that used the functions in question. Everything seems to be working fine!
dc5e04c to
394fe55
Compare
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* master: (68 commits) skip flaky suite (elastic#94043) skip flaky suite (elastic#102012) [esArchive] Persists updates for management/saved_objects/* (elastic#101992) skip flaky suite (elastic#101449) remove unnecessary hack (elastic#101909) [Exploratory View] Use human readable formats (elastic#101520) [Expressions] Refactor expression functions to use observables underneath (elastic#100409) [esArchives] Persist migrated Kibana archives (elastic#101950) [kbnArchiver] fix save to non-existent file (elastic#101974) [Enterprise Search] Add owner and description properties to kibana.json (elastic#101957) [DOCS] Fixes terminology in Stack Monitoring:Kibana alerts (elastic#101696) [Observability] [Cases] Cases in the observability app (elastic#101487) [Alerting][Docs] Combine rule creation and management pages (elastic#101498) temporarily disable build-buddy [Fleet] Fix fleet server collector in case settings are not set (elastic#101752) [Event Log] Populated rule.* ECS fields for alert events. (elastic#101132) [APM] Fleet support for merging input.config values with other nested properties in the policy input (elastic#101690) Add comments to some alerting plugin public API items (elastic#101551) [Alerting][Docs] Moving alerting setup to its own page (elastic#101323) remove uptime public API, it's not used. (elastic#101799) ...
Summary
Refactor expression functions to use observables underneath.
Resolves #93016.
Checklist
For maintainers