Skip to content

[9.0] [Expression] Cached expression can keep their own side effects (#216519)#218419

Merged
dej611 merged 3 commits into
elastic:9.0from
dej611:backport/9.0/pr-216519
Apr 24, 2025
Merged

[9.0] [Expression] Cached expression can keep their own side effects (#216519)#218419
dej611 merged 3 commits into
elastic:9.0from
dej611:backport/9.0/pr-216519

Conversation

@dej611
Copy link
Copy Markdown
Contributor

@dej611 dej611 commented Apr 16, 2025

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…ic#216519)

## Summary

Fixes the elastic#207204

This PR introduces a new complementary function for an Expression
definition named `sideEffects`, this goes together with the other `fn`
function and it is used to restore any side effect when the caching
system kicks in.

![side_effects_cache](https://github.com/user-attachments/assets/74b1ddff-a45c-4983-ac09-57559155fba8)

I haven't found how to programmatically test this.
Will add an FTR if it can be reliable to reproduce an expression caching
scenario.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### Release notes

The request inspector now shows the correct request and response in any
successful scenario.

(cherry picked from commit 6984530)

# Conflicts:
#	packages/kbn-optimizer/limits.yml
@dej611 dej611 requested a review from kibanamachine as a code owner April 16, 2025 12:07
@dej611 dej611 added the backport This PR is a backport of another PR label Apr 16, 2025
@dej611 dej611 enabled auto-merge (squash) April 16, 2025 12:07
@botelastic botelastic Bot added the Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) label Apr 16, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 603 604 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
expressions 1772 1793 +21
inspector 101 109 +8
total +29

Page load bundle

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

id before after diff
data 393.5KB 395.3KB +1.8KB
expressions 92.4KB 93.2KB +813.0B
inspector 23.4KB 23.7KB +320.0B
total +2.9KB
Unknown metric groups

API count

id before after diff
expressions 2244 2265 +21
inspector 128 136 +8
total +29

History

@dej611 dej611 merged commit 02b4bbc into elastic:9.0 Apr 24, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants