Skip to content
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

[Console] Add autocomplete for data streams #214465

Merged

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Mar 13, 2025

Closes #212905

Summary

This PR adds autocompletion for data-stream related endpoints. Previously, it didn't work because the generated spec definitions that were extracted from the Es specs repo were using the generic {name} pattern instead of {data_stream}. In this PR, we override those definition files and specify the correct pattern.

How to test:

Test the following endpoints and make sure that data stream names are suggested:

GET _data_stream/{data_stream}/_stats
DELETE _data_stream/{data_stream}/_lifecycle
DELETE _data_stream/{data_stream}
GET _data_stream/{dataStream}/_lifecycle
GET _data_stream/{data_stream}
POST _data_stream/_migrate/{data_stream}
POST _data_stream/_promote/{data_stream}
PUT _data_stream/{data_stream}/_lifecycle

@ElenaStoeva ElenaStoeva added Feature:Console Dev Tools Console Feature Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) v8.19.0 v9.0.1 labels Mar 13, 2025
@ElenaStoeva ElenaStoeva self-assigned this Mar 13, 2025
@ElenaStoeva ElenaStoeva requested a review from a team as a code owner March 13, 2025 18:45
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

cc @ElenaStoeva

Copy link
Member

@sabarasaba sabarasaba left a comment

Choose a reason for hiding this comment

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

changes lgtm!

Previously, it didn't work because the generated spec definitions that were extracted from the Es specs repo were using the generic {name} pattern instead of {data_stream}. In this PR, we override those definition files and specify the correct pattern.

If we run the script for generating the definitions will it still try to use the generic {name} instead of {data_stream}? If so perhaps we should file an issue on their end to fix it up as well. If not, ignore!

@ElenaStoeva
Copy link
Contributor Author

ElenaStoeva commented Mar 20, 2025

Thanks for the review @sabarasaba!

If we run the script for generating the definitions will it still try to use the generic {name} instead of {data_stream}? If so perhaps we should file an issue on their end to fix it up as well. If not, ignore!

I don't think so, because the script doesn't affect the files in theoverrides/ directory - it only modified the files under generated/.

But it might still be useful to open an issue as there are also other endpoints that use the generic {name} pattern instead of the corresponding correct pattern. I will try to open an issue soon.

@ElenaStoeva ElenaStoeva enabled auto-merge (squash) March 20, 2025 19:22
@ElenaStoeva ElenaStoeva merged commit f89e03c into elastic:main Mar 20, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x, 9.0

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 20, 2025
Closes elastic#212905

## Summary

This PR adds autocompletion for data-stream related endpoints.
Previously, it didn't work because the generated spec definitions that
were extracted from the Es specs repo were using the generic `{name}`
pattern instead of `{data_stream}`. In this PR, we override those
definition files and specify the correct pattern.

### How to test:

Test the following endpoints and make sure that data stream names are
suggested:

`GET _data_stream/{data_stream}/_stats`
`DELETE _data_stream/{data_stream}/_lifecycle`
`DELETE _data_stream/{data_stream}`
`GET _data_stream/{dataStream}/_lifecycle`
`GET _data_stream/{data_stream}`
`POST _data_stream/_migrate/{data_stream}`
`POST _data_stream/_promote/{data_stream}`
`PUT _data_stream/{data_stream}/_lifecycle`

(cherry picked from commit f89e03c)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 20, 2025
Closes elastic#212905

## Summary

This PR adds autocompletion for data-stream related endpoints.
Previously, it didn't work because the generated spec definitions that
were extracted from the Es specs repo were using the generic `{name}`
pattern instead of `{data_stream}`. In this PR, we override those
definition files and specify the correct pattern.

### How to test:

Test the following endpoints and make sure that data stream names are
suggested:

`GET _data_stream/{data_stream}/_stats`
`DELETE _data_stream/{data_stream}/_lifecycle`
`DELETE _data_stream/{data_stream}`
`GET _data_stream/{dataStream}/_lifecycle`
`GET _data_stream/{data_stream}`
`POST _data_stream/_migrate/{data_stream}`
`POST _data_stream/_promote/{data_stream}`
`PUT _data_stream/{data_stream}/_lifecycle`

(cherry picked from commit f89e03c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x
9.0

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 Mar 20, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Console] Add autocomplete for data streams
(#214465)](#214465)

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

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

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-20T19:43:15Z","message":"[Console]
Add autocomplete for data streams (#214465)\n\nCloses
https://github.com/elastic/kibana/issues/212905\n\n## Summary\n\nThis PR
adds autocompletion for data-stream related endpoints.\nPreviously, it
didn't work because the generated spec definitions that\nwere extracted
from the Es specs repo were using the generic `{name}`\npattern instead
of `{data_stream}`. In this PR, we override those\ndefinition files and
specify the correct pattern.\n\n### How to test:\n\nTest the following
endpoints and make sure that data stream names are\nsuggested:\n\n`GET
_data_stream/{data_stream}/_stats`\n`DELETE
_data_stream/{data_stream}/_lifecycle`\n`DELETE
_data_stream/{data_stream}`\n`GET
_data_stream/{dataStream}/_lifecycle`\n`GET
_data_stream/{data_stream}`\n`POST
_data_stream/_migrate/{data_stream}`\n`POST
_data_stream/_promote/{data_stream}`\n`PUT
_data_stream/{data_stream}/_lifecycle`","sha":"f89e03c286a7a7b1d26a7c4e5e6aeec6e3c2624c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-minor","v9.1.0","v8.19.0","v9.0.1"],"title":"[Console]
Add autocomplete for data
streams","number":214465,"url":"https://github.com/elastic/kibana/pull/214465","mergeCommit":{"message":"[Console]
Add autocomplete for data streams (#214465)\n\nCloses
https://github.com/elastic/kibana/issues/212905\n\n## Summary\n\nThis PR
adds autocompletion for data-stream related endpoints.\nPreviously, it
didn't work because the generated spec definitions that\nwere extracted
from the Es specs repo were using the generic `{name}`\npattern instead
of `{data_stream}`. In this PR, we override those\ndefinition files and
specify the correct pattern.\n\n### How to test:\n\nTest the following
endpoints and make sure that data stream names are\nsuggested:\n\n`GET
_data_stream/{data_stream}/_stats`\n`DELETE
_data_stream/{data_stream}/_lifecycle`\n`DELETE
_data_stream/{data_stream}`\n`GET
_data_stream/{dataStream}/_lifecycle`\n`GET
_data_stream/{data_stream}`\n`POST
_data_stream/_migrate/{data_stream}`\n`POST
_data_stream/_promote/{data_stream}`\n`PUT
_data_stream/{data_stream}/_lifecycle`","sha":"f89e03c286a7a7b1d26a7c4e5e6aeec6e3c2624c"}},"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/214465","number":214465,"mergeCommit":{"message":"[Console]
Add autocomplete for data streams (#214465)\n\nCloses
https://github.com/elastic/kibana/issues/212905\n\n## Summary\n\nThis PR
adds autocompletion for data-stream related endpoints.\nPreviously, it
didn't work because the generated spec definitions that\nwere extracted
from the Es specs repo were using the generic `{name}`\npattern instead
of `{data_stream}`. In this PR, we override those\ndefinition files and
specify the correct pattern.\n\n### How to test:\n\nTest the following
endpoints and make sure that data stream names are\nsuggested:\n\n`GET
_data_stream/{data_stream}/_stats`\n`DELETE
_data_stream/{data_stream}/_lifecycle`\n`DELETE
_data_stream/{data_stream}`\n`GET
_data_stream/{dataStream}/_lifecycle`\n`GET
_data_stream/{data_stream}`\n`POST
_data_stream/_migrate/{data_stream}`\n`POST
_data_stream/_promote/{data_stream}`\n`PUT
_data_stream/{data_stream}/_lifecycle`","sha":"f89e03c286a7a7b1d26a7c4e5e6aeec6e3c2624c"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <[email protected]>
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 21, 2025
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Mar 24, 2025
Closes elastic#212905

## Summary

This PR adds autocompletion for data-stream related endpoints.
Previously, it didn't work because the generated spec definitions that
were extracted from the Es specs repo were using the generic `{name}`
pattern instead of `{data_stream}`. In this PR, we override those
definition files and specify the correct pattern.

### How to test:

Test the following endpoints and make sure that data stream names are
suggested:

`GET _data_stream/{data_stream}/_stats`
`DELETE _data_stream/{data_stream}/_lifecycle`
`DELETE _data_stream/{data_stream}`
`GET _data_stream/{dataStream}/_lifecycle`
`GET _data_stream/{data_stream}`
`POST _data_stream/_migrate/{data_stream}`
`POST _data_stream/_promote/{data_stream}`
`PUT _data_stream/{data_stream}/_lifecycle`
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

kibanamachine added a commit that referenced this pull request Mar 25, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Console] Add autocomplete for data streams
(#214465)](#214465)

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

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

<!--BACKPORT [{"author":{"name":"Elena
Stoeva","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-20T19:43:15Z","message":"[Console]
Add autocomplete for data streams (#214465)\n\nCloses
https://github.com/elastic/kibana/issues/212905\n\n## Summary\n\nThis PR
adds autocompletion for data-stream related endpoints.\nPreviously, it
didn't work because the generated spec definitions that\nwere extracted
from the Es specs repo were using the generic `{name}`\npattern instead
of `{data_stream}`. In this PR, we override those\ndefinition files and
specify the correct pattern.\n\n### How to test:\n\nTest the following
endpoints and make sure that data stream names are\nsuggested:\n\n`GET
_data_stream/{data_stream}/_stats`\n`DELETE
_data_stream/{data_stream}/_lifecycle`\n`DELETE
_data_stream/{data_stream}`\n`GET
_data_stream/{dataStream}/_lifecycle`\n`GET
_data_stream/{data_stream}`\n`POST
_data_stream/_migrate/{data_stream}`\n`POST
_data_stream/_promote/{data_stream}`\n`PUT
_data_stream/{data_stream}/_lifecycle`","sha":"f89e03c286a7a7b1d26a7c4e5e6aeec6e3c2624c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Console","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-minor","v9.1.0","v8.19.0","v9.0.1"],"title":"[Console]
Add autocomplete for data
streams","number":214465,"url":"https://github.com/elastic/kibana/pull/214465","mergeCommit":{"message":"[Console]
Add autocomplete for data streams (#214465)\n\nCloses
https://github.com/elastic/kibana/issues/212905\n\n## Summary\n\nThis PR
adds autocompletion for data-stream related endpoints.\nPreviously, it
didn't work because the generated spec definitions that\nwere extracted
from the Es specs repo were using the generic `{name}`\npattern instead
of `{data_stream}`. In this PR, we override those\ndefinition files and
specify the correct pattern.\n\n### How to test:\n\nTest the following
endpoints and make sure that data stream names are\nsuggested:\n\n`GET
_data_stream/{data_stream}/_stats`\n`DELETE
_data_stream/{data_stream}/_lifecycle`\n`DELETE
_data_stream/{data_stream}`\n`GET
_data_stream/{dataStream}/_lifecycle`\n`GET
_data_stream/{data_stream}`\n`POST
_data_stream/_migrate/{data_stream}`\n`POST
_data_stream/_promote/{data_stream}`\n`PUT
_data_stream/{data_stream}/_lifecycle`","sha":"f89e03c286a7a7b1d26a7c4e5e6aeec6e3c2624c"}},"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/214465","number":214465,"mergeCommit":{"message":"[Console]
Add autocomplete for data streams (#214465)\n\nCloses
https://github.com/elastic/kibana/issues/212905\n\n## Summary\n\nThis PR
adds autocompletion for data-stream related endpoints.\nPreviously, it
didn't work because the generated spec definitions that\nwere extracted
from the Es specs repo were using the generic `{name}`\npattern instead
of `{data_stream}`. In this PR, we override those\ndefinition files and
specify the correct pattern.\n\n### How to test:\n\nTest the following
endpoints and make sure that data stream names are\nsuggested:\n\n`GET
_data_stream/{data_stream}/_stats`\n`DELETE
_data_stream/{data_stream}/_lifecycle`\n`DELETE
_data_stream/{data_stream}`\n`GET
_data_stream/{dataStream}/_lifecycle`\n`GET
_data_stream/{data_stream}`\n`POST
_data_stream/_migrate/{data_stream}`\n`POST
_data_stream/_promote/{data_stream}`\n`PUT
_data_stream/{data_stream}/_lifecycle`","sha":"f89e03c286a7a7b1d26a7c4e5e6aeec6e3c2624c"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Stoeva <[email protected]>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.19.0 v9.0.0 v9.0.1 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Console] No datastream names for autocomplete
4 participants