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

[Index management] Fix passthrough field bug #193246

Merged

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Sep 18, 2024

Fixes #192125

Summary

This PR adds support for allowing passthrough field types in index templates, mainly to prevent breaking the UI. Since this is a hidden experimental feature, the field can only be added to an index template mapping through a console call and not through the UI. And when editing an index template that contains a passthrough field this will be partially editable (only the mandatory field priority can be changed through the UI) and the rest can be updated through console.

Screenshot 2024-09-18 at 11 22 53 Screenshot 2024-09-18 at 11 23 07

@sabarasaba sabarasaba self-assigned this Sep 18, 2024
@sabarasaba sabarasaba added Feature:Index Management Index and index templates UI 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-major Backport to (8.x, 8.17, 8.16, 8.15) the previous major branch and other branches in development v8.16.0 labels Sep 18, 2024
@sabarasaba sabarasaba marked this pull request as ready for review September 18, 2024 10:06
@sabarasaba sabarasaba requested a review from a team as a code owner September 18, 2024 10:06
@elasticmachine
Copy link
Contributor

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

@ElenaStoeva ElenaStoeva self-requested a review September 23, 2024 12:41
Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

Thanks for patching this up @sabarasaba! Tested locally and I don't see the error anymore. Changes also lgtm.

One thing I noticed though is that if I change the priority value, the dynamic property gets deleted. Do you think there might be an easy fix for this to add to this PR?

Screen.Recording.2024-09-23.at.19.15.24.mov

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba
Copy link
Member Author

Thanks for the review @ElenaStoeva, I've just added another field to take into account the dynamic field but as its an experimental feature they might be adding/removing fields quite often. I tried to find a way to just update whatever was modified and leave the rest as is but was much more involved than expected

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexManagement 690 691 +1

Async chunks

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

id before after diff
indexManagement 683.4KB 684.3KB +945.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @sabarasaba

Copy link
Contributor

@ElenaStoeva ElenaStoeva left a comment

Choose a reason for hiding this comment

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

Thanks for adding the changes! Tested locally and it works well now.

@sabarasaba sabarasaba merged commit 99160b6 into elastic:main Sep 26, 2024
21 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 26, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 26, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15
8.x

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 Sep 26, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Index management] Fix passthrough field bug
(#193246)](#193246)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-26T16:26:51Z","message":"[Index
management] Fix passthrough field bug
(#193246)","sha":"99160b6f9963c3ba9b3065ae89c9042a44b3c3d9","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-major","v8.16.0"],"title":"[Index
management] Fix passthrough field
bug","number":193246,"url":"https://github.com/elastic/kibana/pull/193246","mergeCommit":{"message":"[Index
management] Fix passthrough field bug
(#193246)","sha":"99160b6f9963c3ba9b3065ae89c9042a44b3c3d9"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193246","number":193246,"mergeCommit":{"message":"[Index
management] Fix passthrough field bug
(#193246)","sha":"99160b6f9963c3ba9b3065ae89c9042a44b3c3d9"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <[email protected]>
kibanamachine added a commit that referenced this pull request Sep 26, 2024
# Backport

This will backport the following commits from `main` to `8.15`:
- [[Index management] Fix passthrough field bug
(#193246)](#193246)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-26T16:26:51Z","message":"[Index
management] Fix passthrough field bug
(#193246)","sha":"99160b6f9963c3ba9b3065ae89c9042a44b3c3d9","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","v9.0.0","backport:prev-major","v8.16.0"],"title":"[Index
management] Fix passthrough field
bug","number":193246,"url":"https://github.com/elastic/kibana/pull/193246","mergeCommit":{"message":"[Index
management] Fix passthrough field bug
(#193246)","sha":"99160b6f9963c3ba9b3065ae89c9042a44b3c3d9"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193246","number":193246,"mergeCommit":{"message":"[Index
management] Fix passthrough field bug
(#193246)","sha":"99160b6f9963c3ba9b3065ae89c9042a44b3c3d9"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16, 8.15) the previous major branch and other branches in development Feature:Index Management Index and index templates UI 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.15.2 v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passthrough field type triggers crash in index management
5 participants