-
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
[Lens] Fix context formula functions #172710
[Lens] Fix context formula functions #172710
Conversation
/ci |
/ci |
/ci |
…ula-context-functions
/ci |
/ci |
…wdaemon/kibana into 170762/fix-formula-context-functions
/ci |
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
@@ -86,7 +86,7 @@ pageLoadAssetSize: | |||
kibanaUsageCollection: 16463 | |||
kibanaUtils: 79713 | |||
kubernetesSecurity: 77234 | |||
lens: 39000 | |||
lens: 41000 |
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.
Required a limit bump because of the new expression functions which are imported sync.
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.
Only went up about 1KB, so we don't have to be this generous....
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.
Data Discovery changes LGTM 👍
@dej611 can you take this review? You know this code better than me! |
## Summary While working on #172710 I noticed how loose our search context types were. This leeway seems like overkill given how we actually use the expressions framework. --------- Co-authored-by: kibanamachine <[email protected]>
…ula-context-functions
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Left just a minor code nit.
Tested locally and it works great! 🎉
|
||
const getTimeRangeAsNumber = (timeRange: TimeRange | undefined, now: number | undefined) => { | ||
if (!timeRange) return 0; | ||
const absoluteTimeRange = getAbsoluteTimeRange(timeRange, now ? { forceNow: new Date(now) } : {}); |
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.
const absoluteTimeRange = getAbsoluteTimeRange(timeRange, now ? { forceNow: new Date(now) } : {}); | |
const absoluteTimeRange = getAbsoluteTimeRange(timeRange, now != null ? { forceNow: new Date(now) } : {}); |
3503866
to
eea236f
Compare
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
## Summary While working on elastic#172710 I noticed how loose our search context types were. This leeway seems like overkill given how we actually use the expressions framework. --------- Co-authored-by: kibanamachine <[email protected]> (cherry picked from commit 570937f)
# Backport This will backport the following commits from `main` to `8.12`: - [[Lens] unify expression search context type (#172738)](#172738) This is a prerequisite to backporting #172710 <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Drew Tate","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-11T14:08:00Z","message":"[Lens] unify expression search context type (#172738)\n\n## Summary\r\n\r\nWhile working on #172710 I noticed\r\nhow loose our search context types were. This leeway seems like overkill\r\ngiven how we actually use the expressions framework.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"570937ff19c500d0d54b605b0602b6ffb2a6fb10","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:ExpressionLanguage","Team:Visualizations","release_note:skip","backport:skip","v8.13.0"],"number":172738,"url":"https://github.com/elastic/kibana/pull/172738","mergeCommit":{"message":"[Lens] unify expression search context type (#172738)\n\n## Summary\r\n\r\nWhile working on #172710 I noticed\r\nhow loose our search context types were. This leeway seems like overkill\r\ngiven how we actually use the expressions framework.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"570937ff19c500d0d54b605b0602b6ffb2a6fb10"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172738","number":172738,"mergeCommit":{"message":"[Lens] unify expression search context type (#172738)\n\n## Summary\r\n\r\nWhile working on #172710 I noticed\r\nhow loose our search context types were. This leeway seems like overkill\r\ngiven how we actually use the expressions framework.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"570937ff19c500d0d54b605b0602b6ffb2a6fb10"}}]}] BACKPORT--> Co-authored-by: Kibana Machine <[email protected]>
## Summary Fix elastic#170762 https://github.com/elastic/kibana/assets/315764/f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd ### 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 --------- Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit 99763dc)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.12`: - [[Lens] Fix context formula functions (#172710)](#172710) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Drew Tate","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-19T15:32:31Z","message":"[Lens] Fix context formula functions (#172710)\n\n## Summary\r\nFix https://github.com/elastic/kibana/issues/170762\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/315764/f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd\r\n\r\n\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"99763dc61647c817384019f6603de7ad258eea01","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:ExpressionLanguage","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.13.0"],"number":172710,"url":"https://github.com/elastic/kibana/pull/172710","mergeCommit":{"message":"[Lens] Fix context formula functions (#172710)\n\n## Summary\r\nFix https://github.com/elastic/kibana/issues/170762\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/315764/f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd\r\n\r\n\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"99763dc61647c817384019f6603de7ad258eea01"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172710","number":172710,"mergeCommit":{"message":"[Lens] Fix context formula functions (#172710)\n\n## Summary\r\nFix https://github.com/elastic/kibana/issues/170762\r\n\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/315764/f5b50ffa-4a03-45ee-bc7a-2f2aca7fa3bd\r\n\r\n\r\n\r\n### Checklist\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"99763dc61647c817384019f6603de7ad258eea01"}}]}] BACKPORT-->
Summary
Fix #170762
Screen.Recording.2023-12-07.at.4.38.49.PM.mov
Checklist