Skip to content

feat(streams): add significant events and queries API#216221

Merged
kdelemme merged 44 commits intoelastic:mainfrom
kdelemme:significant-events-api
Apr 7, 2025
Merged

feat(streams): add significant events and queries API#216221
kdelemme merged 44 commits intoelastic:mainfrom
kdelemme:significant-events-api

Conversation

@kdelemme
Copy link
Contributor

@kdelemme kdelemme commented Mar 27, 2025

Summary

Resolves #214374

This PR adds a significant events API that executes the saved queries from the streams and returns the histogram and change points values.
It also adds the upsert, delete and bulk queries API.

@dgieselaar let me know if you want me to clean it up: there are some UI works in there as well but I don't want to mess with your history since your other branch is based on this one...

@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project v9.1.0 v8.19.0 labels Mar 27, 2025
@dgieselaar
Copy link
Contributor

@kdelemme cheers, I think it's fine to remove the UI entirely then I can just diff my changes on top of main

@kdelemme
Copy link
Contributor Author

/ci

kibanamachine and others added 4 commits March 27, 2025 19:27
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --update'
@kdelemme kdelemme marked this pull request as ready for review March 27, 2025 21:00
@kdelemme kdelemme requested review from a team as code owners March 27, 2025 21:00
@kdelemme
Copy link
Contributor Author

kdelemme commented Apr 1, 2025

Thanks @dgieselaar
I think it could be done in a follow-up so we can unblock the UI while we work on the rewrite with es|ql. @flash1293 thoughts?

@kdelemme kdelemme enabled auto-merge (squash) April 1, 2025 16:47
Copy link
Contributor

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (code review only), the dependencies added in the kibana.jsonc manifest don't violate the Sustainable Arch principles.

kdelemme and others added 8 commits April 4, 2025 09:15
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --update'
@kdelemme kdelemme requested a review from maximpn April 5, 2025 13:11
@dgieselaar
Copy link
Contributor

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 445 447 +2

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
@kbn/storage-adapter 76 75 -1
@kbn/streams-schema 353 374 +21
streams 13 11 -2
total +18

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
streamsApp 428.0KB 428.2KB +228.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/streams-schema 3 1 -2
streams 18 25 +7
total +5
Unknown metric groups

API count

id before after diff
@kbn/storage-adapter 77 76 -1
@kbn/streams-schema 367 388 +21
streams 13 11 -2
total +18

History

Copy link
Contributor

@maximpn maximpn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to kbn-zod-helpers/src/deep_strict LGTM

@kdelemme kdelemme merged commit e71ea24 into elastic:main Apr 7, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/14308807451

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 216221

Questions ?

Please refer to the Backport tool documentation

kdelemme added a commit to kdelemme/kibana that referenced this pull request Apr 8, 2025
(cherry picked from commit e71ea24)

# Conflicts:
#	oas_docs/bundle.json
#	oas_docs/output/kibana.yaml
#	src/platform/packages/shared/kbn-zod-helpers/src/deep_strict.ts
@kdelemme
Copy link
Contributor Author

kdelemme commented Apr 8, 2025

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kdelemme added a commit that referenced this pull request Apr 8, 2025
…#217500)

# Backport

This will backport the following commits from `main` to `8.x`:
- [feat(streams): add significant events and queries API
(#216221)](#216221)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2025-04-07T12:10:25Z","message":"feat(streams):
add significant events and queries API
(#216221)","sha":"e71ea24e0f9eca540dd4dad5ff1b8e6d4f9df25c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","Feature:Streams","v9.1.0","v8.19.0"],"title":"feat(streams):
add significant events and queries
API","number":216221,"url":"https://github.com/elastic/kibana/pull/216221","mergeCommit":{"message":"feat(streams):
add significant events and queries API
(#216221)","sha":"e71ea24e0f9eca540dd4dad5ff1b8e6d4f9df25c"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216221","number":216221,"mergeCommit":{"message":"feat(streams):
add significant events and queries API
(#216221)","sha":"e71ea24e0f9eca540dd4dad5ff1b8e6d4f9df25c"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Streams This is the label for the Streams Project release_note:skip Skip the PR/issue when compiling release notes v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Streams] CRUD API for Significant Events

7 participants