Skip to content

[9.0] [Streams 🌊] Introduce GroupStreams (#208126)#209776

Merged
simianhacker merged 1 commit intoelastic:9.0from
simianhacker:backport/9.0/pr-208126
Feb 5, 2025
Merged

[9.0] [Streams 🌊] Introduce GroupStreams (#208126)#209776
simianhacker merged 1 commit intoelastic:9.0from
simianhacker:backport/9.0/pr-208126

Conversation

@simianhacker
Copy link
Member

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

## 🍒  Summary

This PR adds support to `/api/streams` endpoints for the
`GroupStreamDefinition` type. Group streams are simply a list of member
streams along with dashboards. An example of the definition looks like:

```JSON
{
  "name": "nginx-logs",
  "stream": {
    "grouped": {
      "description": "A collection of streams for Nginx",
      "members": [
        "logs",
        "logs.nginx"
      ]
    }
  },
  "dashboards": []
}
```
The following APIs support `GroupStreamDefinition`:

- `GET /api/streams`
- `GET /api/streams/{id}`
- `PUT /api/streams/{id}`
- `DELETE /api/streams/{id}`
- `GET /api/streams/{id}/_details`

This PR only includes the support to the APIs, I will submit a follow PR
for the UI.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
(cherry picked from commit 2092c3d)

# Conflicts:
#	x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_overview/index.tsx
#	x-pack/solutions/observability/plugins/streams_app/public/components/stream_detail_view/index.tsx
#	x-pack/test/api_integration/deployment_agnostic/apis/observability/streams/lifecycle.ts
@simianhacker simianhacker added the backport This PR is a backport of another PR label Feb 5, 2025
@simianhacker simianhacker enabled auto-merge (squash) February 5, 2025 14:20
@simianhacker simianhacker merged commit 56e51b8 into elastic:9.0 Feb 5, 2025
4 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #117 / Screenshots - serverless security UI response ops docs security cases list view cases list screenshot

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
streamsApp 291 294 +3

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/streams-schema 230 257 +27

Async chunks

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

id before after diff
streamsApp 283.6KB 284.0KB +459.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 2 3 +1
Unknown metric groups

API count

id before after diff
@kbn/streams-schema 231 260 +29

simianhacker added a commit that referenced this pull request Feb 6, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Streams 🌊] Introduce GroupStreams
(#208126)](#208126)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT [{"author":{"name":"Chris
Cowan","email":"chris@elastic.co"},"sourceCommit":{"committedDate":"2025-02-04T10:12:35Z","message":"[Streams
🌊] Introduce GroupStreams (#208126)\n\n## 🍒 Summary\r\n \r\nThis PR adds
support to `/api/streams` endpoints for the\r\n`GroupStreamDefinition`
type. Group streams are simply a list of member\r\nstreams along with
dashboards. An example of the definition looks
like:\r\n\r\n```JSON\r\n{\r\n \"name\": \"nginx-logs\",\r\n \"stream\":
{\r\n \"grouped\": {\r\n \"description\": \"A collection of streams for
Nginx\",\r\n \"members\": [\r\n \"logs\",\r\n \"logs.nginx\"\r\n ]\r\n
}\r\n },\r\n \"dashboards\": []\r\n}\r\n```\r\nThe following APIs
support `GroupStreamDefinition`:\r\n\r\n- `GET /api/streams`\r\n- `GET
/api/streams/{id}`\r\n- `PUT /api/streams/{id}`\r\n- `DELETE
/api/streams/{id}`\r\n- `GET /api/streams/{id}/_details`\r\n\r\nThis PR
only includes the support to the APIs, I will submit a follow PR\r\nfor
the UI.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Joe
Reuter
<johannes.reuter@elastic.co>","sha":"2092c3d4ca2ae917420f992686fc7a704b393ea4","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","release_note:feature","backport:version","Feature:Streams","v9.1.0","v8.19.0"],"title":"[Streams
🌊] Introduce
GroupStreams","number":208126,"url":"https://github.com/elastic/kibana/pull/208126","mergeCommit":{"message":"[Streams
🌊] Introduce GroupStreams (#208126)\n\n## 🍒 Summary\r\n \r\nThis PR adds
support to `/api/streams` endpoints for the\r\n`GroupStreamDefinition`
type. Group streams are simply a list of member\r\nstreams along with
dashboards. An example of the definition looks
like:\r\n\r\n```JSON\r\n{\r\n \"name\": \"nginx-logs\",\r\n \"stream\":
{\r\n \"grouped\": {\r\n \"description\": \"A collection of streams for
Nginx\",\r\n \"members\": [\r\n \"logs\",\r\n \"logs.nginx\"\r\n ]\r\n
}\r\n },\r\n \"dashboards\": []\r\n}\r\n```\r\nThe following APIs
support `GroupStreamDefinition`:\r\n\r\n- `GET /api/streams`\r\n- `GET
/api/streams/{id}`\r\n- `PUT /api/streams/{id}`\r\n- `DELETE
/api/streams/{id}`\r\n- `GET /api/streams/{id}/_details`\r\n\r\nThis PR
only includes the support to the APIs, I will submit a follow PR\r\nfor
the UI.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Joe
Reuter
<johannes.reuter@elastic.co>","sha":"2092c3d4ca2ae917420f992686fc7a704b393ea4"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/209776","number":209776,"state":"MERGED","mergeCommit":{"sha":"56e51b892b6fa6b21954afd61dd828cf80e1c262","message":"[9.0]
[Streams 🌊] Introduce GroupStreams (#208126) (#209776)\n\n#
Backport\n\nThis will backport the following commits from `main` to
`9.0`:\n- [[Streams 🌊] Introduce
GroupStreams\n(#208126)](https://github.com/elastic/kibana/pull/208126)\n\n<!---
Backport version: 9.6.4 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Chris\nCowan\",\"email\":\"chris@elastic.co\"},\"sourceCommit\":{\"committedDate\":\"2025-02-04T10:12:35Z\",\"message\":\"[Streams\n🌊]
Introduce GroupStreams (#208126)\\n\\n## 🍒 Summary\\r\\n \\r\\nThis PR
adds\nsupport to `/api/streams` endpoints for
the\\r\\n`GroupStreamDefinition`\ntype. Group streams are simply a list
of member\\r\\nstreams along with\ndashboards. An example of the
definition looks\nlike:\\r\\n\\r\\n```JSON\\r\\n{\\r\\n \\\"name\\\":
\\\"nginx-logs\\\",\\r\\n \\\"stream\\\":\n{\\r\\n \\\"grouped\\\":
{\\r\\n \\\"description\\\": \\\"A collection of streams
for\nNginx\\\",\\r\\n \\\"members\\\": [\\r\\n \\\"logs\\\",\\r\\n
\\\"logs.nginx\\\"\\r\\n ]\\r\\n\n}\\r\\n },\\r\\n \\\"dashboards\\\":
[]\\r\\n}\\r\\n```\\r\\nThe following APIs\nsupport
`GroupStreamDefinition`:\\r\\n\\r\\n- `GET /api/streams`\\r\\n-
`GET\n/api/streams/{id}`\\r\\n- `PUT /api/streams/{id}`\\r\\n-
`DELETE\n/api/streams/{id}`\\r\\n- `GET
/api/streams/{id}/_details`\\r\\n\\r\\nThis PR\nonly includes the
support to the APIs, I will submit a follow PR\\r\\nfor\nthe
UI.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
kibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\\r\\nCo-authored-by:
Joe\nReuter\n<johannes.reuter@elastic.co>\",\"sha\":\"2092c3d4ca2ae917420f992686fc7a704b393ea4\",\"branchLabelMapping\":{\"^v9.1.0$\":\"main\",\"^v8.19.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"v9.0.0\",\"release_note:feature\",\"backport:version\",\"Feature:Streams\",\"v9.1.0\",\"v8.19.0\"],\"title\":\"[Streams\n🌊]
Introduce\nGroupStreams\",\"number\":208126,\"url\":\"https://github.com/elastic/kibana/pull/208126\",\"mergeCommit\":{\"message\":\"[Streams\n🌊]
Introduce GroupStreams (#208126)\\n\\n## 🍒 Summary\\r\\n \\r\\nThis PR
adds\nsupport to `/api/streams` endpoints for
the\\r\\n`GroupStreamDefinition`\ntype. Group streams are simply a list
of member\\r\\nstreams along with\ndashboards. An example of the
definition looks\nlike:\\r\\n\\r\\n```JSON\\r\\n{\\r\\n \\\"name\\\":
\\\"nginx-logs\\\",\\r\\n \\\"stream\\\":\n{\\r\\n \\\"grouped\\\":
{\\r\\n \\\"description\\\": \\\"A collection of streams
for\nNginx\\\",\\r\\n \\\"members\\\": [\\r\\n \\\"logs\\\",\\r\\n
\\\"logs.nginx\\\"\\r\\n ]\\r\\n\n}\\r\\n },\\r\\n \\\"dashboards\\\":
[]\\r\\n}\\r\\n```\\r\\nThe following APIs\nsupport
`GroupStreamDefinition`:\\r\\n\\r\\n- `GET /api/streams`\\r\\n-
`GET\n/api/streams/{id}`\\r\\n- `PUT /api/streams/{id}`\\r\\n-
`DELETE\n/api/streams/{id}`\\r\\n- `GET
/api/streams/{id}/_details`\\r\\n\\r\\nThis PR\nonly includes the
support to the APIs, I will submit a follow PR\\r\\nfor\nthe
UI.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
kibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\\r\\nCo-authored-by:
Joe\nReuter\n<johannes.reuter@elastic.co>\",\"sha\":\"2092c3d4ca2ae917420f992686fc7a704b393ea4\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"9.0\",\"8.x\"],\"targetPullRequestStates\":[{\"branch\":\"9.0\",\"label\":\"v9.0.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v9.1.0\",\"branchLabelMappingKey\":\"^v9.1.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/208126\",\"number\":208126,\"mergeCommit\":{\"message\":\"[Streams\n🌊]
Introduce GroupStreams (#208126)\\n\\n## 🍒 Summary\\r\\n \\r\\nThis PR
adds\nsupport to `/api/streams` endpoints for
the\\r\\n`GroupStreamDefinition`\ntype. Group streams are simply a list
of member\\r\\nstreams along with\ndashboards. An example of the
definition looks\nlike:\\r\\n\\r\\n```JSON\\r\\n{\\r\\n \\\"name\\\":
\\\"nginx-logs\\\",\\r\\n \\\"stream\\\":\n{\\r\\n \\\"grouped\\\":
{\\r\\n \\\"description\\\": \\\"A collection of streams
for\nNginx\\\",\\r\\n \\\"members\\\": [\\r\\n \\\"logs\\\",\\r\\n
\\\"logs.nginx\\\"\\r\\n ]\\r\\n\n}\\r\\n },\\r\\n \\\"dashboards\\\":
[]\\r\\n}\\r\\n```\\r\\nThe following APIs\nsupport
`GroupStreamDefinition`:\\r\\n\\r\\n- `GET /api/streams`\\r\\n-
`GET\n/api/streams/{id}`\\r\\n- `PUT /api/streams/{id}`\\r\\n-
`DELETE\n/api/streams/{id}`\\r\\n- `GET
/api/streams/{id}/_details`\\r\\n\\r\\nThis PR\nonly includes the
support to the APIs, I will submit a follow PR\\r\\nfor\nthe
UI.\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:
kibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\\r\\nCo-authored-by:
Joe\nReuter\n<johannes.reuter@elastic.co>\",\"sha\":\"2092c3d4ca2ae917420f992686fc7a704b393ea4\"}},{\"branch\":\"8.x\",\"label\":\"v8.19.0\",\"branchLabelMappingKey\":\"^v8.19.0$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"}]}]\nBACKPORT-->"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208126","number":208126,"mergeCommit":{"message":"[Streams
🌊] Introduce GroupStreams (#208126)\n\n## 🍒 Summary\r\n \r\nThis PR adds
support to `/api/streams` endpoints for the\r\n`GroupStreamDefinition`
type. Group streams are simply a list of member\r\nstreams along with
dashboards. An example of the definition looks
like:\r\n\r\n```JSON\r\n{\r\n \"name\": \"nginx-logs\",\r\n \"stream\":
{\r\n \"grouped\": {\r\n \"description\": \"A collection of streams for
Nginx\",\r\n \"members\": [\r\n \"logs\",\r\n \"logs.nginx\"\r\n ]\r\n
}\r\n },\r\n \"dashboards\": []\r\n}\r\n```\r\nThe following APIs
support `GroupStreamDefinition`:\r\n\r\n- `GET /api/streams`\r\n- `GET
/api/streams/{id}`\r\n- `PUT /api/streams/{id}`\r\n- `DELETE
/api/streams/{id}`\r\n- `GET /api/streams/{id}/_details`\r\n\r\nThis PR
only includes the support to the APIs, I will submit a follow PR\r\nfor
the UI.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Joe
Reuter
<johannes.reuter@elastic.co>","sha":"2092c3d4ca2ae917420f992686fc7a704b393ea4"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: Milton Hultgren <milton.hultgren@elastic.co>
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 This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants