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] Make allowAutoCreate param optional as its not available for legacy templates #189618

Merged

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Jul 31, 2024

Closes #188268

Summary

This PR convers the allowAutoCreate param (see #178321) from the validation schema of index templates to be optional as its not availabel for legacy templates.

Steps to reproduce:

  1. Put a legacy template in Kibana Dev tools.
PUT _template/test_legacy_template
{
  "order": 10,
  "index_patterns": [
    "whatever*"
  ],
  "settings": {
    "index": {
      "number_of_shards": "1",
      "number_of_replicas": "1"
    }
  },
  "mappings": {
  }
}
  1. Go to Kibana Stack Management -> Index Management -> Index Templates -> Legacy index templates section, edit this legacy template.
  2. Without changing anything, just click Next, Next to the final step and Save template, error will occur.

@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 backport:skip This commit does not require backporting v8.16.0 labels Jul 31, 2024
@sabarasaba sabarasaba self-assigned this Jul 31, 2024
@sabarasaba sabarasaba marked this pull request as ready for review July 31, 2024 12:56
@sabarasaba sabarasaba requested a review from a team as a code owner July 31, 2024 12:56
@elasticmachine
Copy link
Contributor

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

@sabarasaba
Copy link
Member Author

/ci

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing this bug, @sabarasaba!
I think this fix might be worth backporting to other minors if possible

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #62 / dashboard dashboard lens by value updates panel on dashboard when a by value panel is saved to library

Metrics [docs]

✅ unchanged

History

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

cc @sabarasaba

@sabarasaba sabarasaba added v7.15.0 and removed backport:skip This commit does not require backporting labels Aug 2, 2024
@sabarasaba sabarasaba merged commit cd55732 into elastic:main Aug 2, 2024
23 checks passed
@sabarasaba sabarasaba added v8.15.0 and removed v7.15.0 labels Aug 2, 2024
@sabarasaba
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.15

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

Questions ?

Please refer to the Backport tool documentation

sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Aug 2, 2024
…ilable for legacy templates (elastic#189618)

(cherry picked from commit cd55732)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 2, 2024
…ilable for legacy templates (elastic#189618)

(cherry picked from commit cd55732)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 2, 2024
…ilable for legacy templates (elastic#189618)

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

💔 Some backports could not be created

Status Branch Result
7.15 Backport failed because of merge conflicts
7.17 Backport failed because of merge conflicts
8.14
8.15

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 189618

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Aug 2, 2024
…not available for legacy templates (#189618) (#189779)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Index management] Make allowAutoCreate param optional as its not
available for legacy templates
(#189618)](#189618)

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

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

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2024-08-02T09:05:57Z","message":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy templates
(#189618)","sha":"cd55732a00cd303e26851cf9935770fbeeed0955","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","v7.15.0","v8.16.0"],"title":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy
templates","number":189618,"url":"https://github.com/elastic/kibana/pull/189618","mergeCommit":{"message":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy templates
(#189618)","sha":"cd55732a00cd303e26851cf9935770fbeeed0955"}},"sourceBranch":"main","suggestedTargetBranches":["7.15"],"targetPullRequestStates":[{"branch":"7.15","label":"v7.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189618","number":189618,"mergeCommit":{"message":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy templates
(#189618)","sha":"cd55732a00cd303e26851cf9935770fbeeed0955"}}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
kibanamachine added a commit that referenced this pull request Aug 5, 2024
…not available for legacy templates (#189618) (#189778)

# Backport

This will backport the following commits from `main` to `8.14`:
- [[Index management] Make allowAutoCreate param optional as its not
available for legacy templates
(#189618)](#189618)

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

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

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2024-08-02T09:05:57Z","message":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy templates
(#189618)","sha":"cd55732a00cd303e26851cf9935770fbeeed0955","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index
Management","Team:Kibana
Management","release_note:skip","v7.15.0","v8.16.0"],"title":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy
templates","number":189618,"url":"https://github.com/elastic/kibana/pull/189618","mergeCommit":{"message":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy templates
(#189618)","sha":"cd55732a00cd303e26851cf9935770fbeeed0955"}},"sourceBranch":"main","suggestedTargetBranches":["7.15"],"targetPullRequestStates":[{"branch":"7.15","label":"v7.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189618","number":189618,"mergeCommit":{"message":"[Index
management] Make allowAutoCreate param optional as its not available for
legacy templates
(#189618)","sha":"cd55732a00cd303e26851cf9935770fbeeed0955"}}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.14.4 backport missing Added to PRs automatically when the are determined to be missing a backport. labels Aug 5, 2024
@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.

@sabarasaba sabarasaba removed the v8.14.4 label Aug 7, 2024
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.0 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when saving a legacy template in Kibana Index Template UI
5 participants