[OneWorkflow] Add datemath support to KQL evaluator#252840
Merged
dej611 merged 5 commits intoelastic:mainfrom Feb 13, 2026
Merged
[OneWorkflow] Add datemath support to KQL evaluator#252840dej611 merged 5 commits intoelastic:mainfrom
dej611 merged 5 commits intoelastic:mainfrom
Conversation
rosomri
reviewed
Feb 12, 2026
| sourceRoot: src/platform/plugins/shared/workflows_execution_engine | ||
| dependsOn: | ||
| - '@kbn/core' | ||
| - '@kbn/datemath' |
Contributor
There was a problem hiding this comment.
datemath appears twice in the dependsOn list, once replacing @kbn/core at the top, and once added after @kbn/es-query
Contributor
There was a problem hiding this comment.
the execution engine has 30+ files importing from @kbn/core/server and @kbn/core/public. It appears the @kbn/core line was accidentally overwritten by @kbn/datemath
Contributor
Author
There was a problem hiding this comment.
You are right. The file was autogenerated twice and for some reason core has been kicked out.
Will autogenerate again and make sure this time is correct
Contributor
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
Contributor
|
Starting backport for target branches: 9.3 |
kibanamachine
added a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 13, 2026
## Summary - Adds datemath expression support (e.g. `now`, `now-1d`, `now-7d/d`, `2025-01-01T00:00:00.000Z||+1d`) to the KQL evaluator used by the workflows execution engine - When a KQL literal value is a valid datemath expression, it is resolved to an ISO date string before comparison, enabling time-relative filtering in workflow conditions - Adds comprehensive unit tests covering datemath in "is" expressions, range expressions, rounding, anchor syntax, and fallback behavior for non-datemath strings ## Screenshot <img width="1488" height="472" alt="Screenshot 2026-02-12 at 12 12 31" src="https://github.com/user-attachments/assets/b71fe08c-169c-46f3-880b-045cf403fd2b" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 3c4e4ac)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Feb 13, 2026
…253028) # Backport This will backport the following commits from `main` to `9.3`: - [[OneWorkflow] Add datemath support to KQL evaluator (#252840)](#252840) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Marco Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-02-13T10:23:55Z","message":"[OneWorkflow] Add datemath support to KQL evaluator (#252840)\n\n## Summary\n\n- Adds datemath expression support (e.g. `now`, `now-1d`, `now-7d/d`,\n`2025-01-01T00:00:00.000Z||+1d`) to the KQL evaluator used by the\nworkflows execution engine\n- When a KQL literal value is a valid datemath expression, it is\nresolved to an ISO date string before comparison, enabling time-relative\nfiltering in workflow conditions\n- Adds comprehensive unit tests covering datemath in \"is\" expressions,\nrange expressions, rounding, anchor syntax, and fallback behavior for\nnon-datemath strings\n\n## Screenshot\n\n<img width=\"1488\" height=\"472\" alt=\"Screenshot 2026-02-12 at 12 12 31\"\nsrc=\"https://github.com/user-attachments/assets/b71fe08c-169c-46f3-880b-045cf403fd2b\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"3c4e4acff2db086a2d58a84aafdd6f04f66dc3ac","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","backport:version","Team:One Workflow","v9.4.0","v9.3.1"],"title":"[OneWorkflow] Add datemath support to KQL evaluator","number":252840,"url":"https://github.com/elastic/kibana/pull/252840","mergeCommit":{"message":"[OneWorkflow] Add datemath support to KQL evaluator (#252840)\n\n## Summary\n\n- Adds datemath expression support (e.g. `now`, `now-1d`, `now-7d/d`,\n`2025-01-01T00:00:00.000Z||+1d`) to the KQL evaluator used by the\nworkflows execution engine\n- When a KQL literal value is a valid datemath expression, it is\nresolved to an ISO date string before comparison, enabling time-relative\nfiltering in workflow conditions\n- Adds comprehensive unit tests covering datemath in \"is\" expressions,\nrange expressions, rounding, anchor syntax, and fallback behavior for\nnon-datemath strings\n\n## Screenshot\n\n<img width=\"1488\" height=\"472\" alt=\"Screenshot 2026-02-12 at 12 12 31\"\nsrc=\"https://github.com/user-attachments/assets/b71fe08c-169c-46f3-880b-045cf403fd2b\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"3c4e4acff2db086a2d58a84aafdd6f04f66dc3ac"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/252840","number":252840,"mergeCommit":{"message":"[OneWorkflow] Add datemath support to KQL evaluator (#252840)\n\n## Summary\n\n- Adds datemath expression support (e.g. `now`, `now-1d`, `now-7d/d`,\n`2025-01-01T00:00:00.000Z||+1d`) to the KQL evaluator used by the\nworkflows execution engine\n- When a KQL literal value is a valid datemath expression, it is\nresolved to an ISO date string before comparison, enabling time-relative\nfiltering in workflow conditions\n- Adds comprehensive unit tests covering datemath in \"is\" expressions,\nrange expressions, rounding, anchor syntax, and fallback behavior for\nnon-datemath strings\n\n## Screenshot\n\n<img width=\"1488\" height=\"472\" alt=\"Screenshot 2026-02-12 at 12 12 31\"\nsrc=\"https://github.com/user-attachments/assets/b71fe08c-169c-46f3-880b-045cf403fd2b\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"3c4e4acff2db086a2d58a84aafdd6f04f66dc3ac"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
now,now-1d,now-7d/d,2025-01-01T00:00:00.000Z||+1d) to the KQL evaluator used by the workflows execution engineScreenshot