Skip to content

[ILM] Fix bug when adding to an index template#249168

Merged
SoniaSanzV merged 4 commits intoelastic:mainfrom
SoniaSanzV:fix/ilm_reject_updates
Jan 21, 2026
Merged

[ILM] Fix bug when adding to an index template#249168
SoniaSanzV merged 4 commits intoelastic:mainfrom
SoniaSanzV:fix/ilm_reject_updates

Conversation

@SoniaSanzV
Copy link
Contributor

@SoniaSanzV SoniaSanzV commented Jan 15, 2026

Summary

Elasticsearch's GET index_template API returns created_date_millis and modified_date_millis properties, but these properties are not allowed in PUT index_template requests, causing Elasticsearch to reject updates. The fix removes these read-only date properties before sending the template back to Elasticsearch in the PUT request.

How to test

  • Go to ILM plugin
  • Click the tree dots icon in the actions column for some custom policy
  • Click Add to index template
  • Select an index template and save
  • The policy should correctly be applied to the index template

Before this change

Screenshot 2026-01-15 at 11 01 29

After this change

Screenshot 2026-01-15 at 11 42 30
@SoniaSanzV SoniaSanzV requested a review from a team as a code owner January 15, 2026 10:45
@SoniaSanzV SoniaSanzV self-assigned this Jan 15, 2026
@SoniaSanzV SoniaSanzV added release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// backport:all-open Backport to all branches that could still receive a release labels Jan 15, 2026
@elasticmachine
Copy link
Contributor

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

@SoniaSanzV SoniaSanzV added bug Fixes for quality problems that affect the customer experience Feature:ILM labels Jan 15, 2026
@SoniaSanzV SoniaSanzV force-pushed the fix/ilm_reject_updates branch from 315c14a to 65369b9 Compare January 15, 2026 13:25
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.

Lgtm, tested locally 👍

@SoniaSanzV SoniaSanzV enabled auto-merge (squash) January 21, 2026 20:37
@SoniaSanzV SoniaSanzV merged commit 575e9bb into elastic:main Jan 21, 2026
16 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout: [ platform / fleet ] plugin / Integrations are visible but cannot be added
  • [job] [logs] FTR Configs #30 / Observability specs (trial) fetching observability alerts details context for AI assistant contextual insights when traces and logs are ingested and logs are not annotated with service.name when service name is specified returns downstream dependencies
  • [job] [logs] Scout: [ platform / fleet ] plugin / stateful - When the user has All privileges for Integrations but None for Fleet - Integrations are visible but cannot be added

Metrics [docs]

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
indexManagement 254 256 +2
Unknown metric groups

API count

id before after diff
indexManagement 260 262 +2

History

cc @SoniaSanzV

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1, 9.2, 9.3

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>

(cherry picked from commit 575e9bb)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>

(cherry picked from commit 575e9bb)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>

(cherry picked from commit 575e9bb)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>

(cherry picked from commit 575e9bb)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1
9.2
9.3

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 Jan 22, 2026
)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ILM] Fix bug when adding to an index template
(#249168)](#249168)

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

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

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T22:54:40Z","message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:ILM","Team:Kibana
Management","backport:all-open","v9.4.0"],"title":"[ILM] Fix bug when
adding to an index
template","number":249168,"url":"https://github.com/elastic/kibana/pull/249168","mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249168","number":249168,"mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 22, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [[ILM] Fix bug when adding to an index template
(#249168)](#249168)

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

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

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T22:54:40Z","message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:ILM","Team:Kibana
Management","backport:all-open","v9.4.0"],"title":"[ILM] Fix bug when
adding to an index
template","number":249168,"url":"https://github.com/elastic/kibana/pull/249168","mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249168","number":249168,"mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 22, 2026
# Backport

This will backport the following commits from `main` to `9.1`:
- [[ILM] Fix bug when adding to an index template
(#249168)](#249168)

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

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

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T22:54:40Z","message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:ILM","Team:Kibana
Management","backport:all-open","v9.4.0"],"title":"[ILM] Fix bug when
adding to an index
template","number":249168,"url":"https://github.com/elastic/kibana/pull/249168","mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249168","number":249168,"mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
kibanamachine added a commit that referenced this pull request Jan 22, 2026
# Backport

This will backport the following commits from `main` to `9.2`:
- [[ILM] Fix bug when adding to an index template
(#249168)](#249168)

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

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

<!--BACKPORT [{"author":{"name":"Sonia Sanz
Vivas","email":"sonia.sanzvivas@elastic.co"},"sourceCommit":{"committedDate":"2026-01-21T22:54:40Z","message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Feature:ILM","Team:Kibana
Management","backport:all-open","v9.4.0"],"title":"[ILM] Fix bug when
adding to an index
template","number":249168,"url":"https://github.com/elastic/kibana/pull/249168","mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/249168","number":249168,"mergeCommit":{"message":"[ILM]
Fix bug when adding to an index template (#249168)\n\n##
Summary\n\nElasticsearch's `GET index_template` API returns
`created_date_millis`\nand `modified_date_millis` properties, but these
properties are not\nallowed in `PUT index_template` requests, causing
Elasticsearch to\nreject updates. The fix removes these read-only date
properties before\nsending the template back to Elasticsearch in the PUT
request.\n\n### How to test\n* Go to ILM plugin\n* Click the tree dots
icon in the actions column for some custom policy\n* Click `Add to index
template`\n* Select an index template and save\n* The policy should
correctly be applied to the index template\n\n### Before this
change\n<img width=\"1170\" height=\"1070\" alt=\"Screenshot 2026-01-15
at 11 01
29\"\nsrc=\"https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481\"\n/>\n\n###
After this change\n<img width=\"1296\" height=\"1159\" alt=\"Screenshot
2026-01-15 at 11 42
30\"\nsrc=\"https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a\"\n/>","sha":"575e9bbd9501018a90a1812ab5cb17dd9658c592"}}]}]
BACKPORT-->

Co-authored-by: Sonia Sanz Vivas <sonia.sanzvivas@elastic.co>
@SoniaSanzV SoniaSanzV deleted the fix/ilm_reject_updates branch January 22, 2026 07:52
yuliia-fryshko pushed a commit to yuliia-fryshko/kibana that referenced this pull request Jan 22, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>
qn895 pushed a commit to qn895/kibana that referenced this pull request Jan 22, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>
dennis-tismenko pushed a commit to dennis-tismenko/kibana that referenced this pull request Jan 22, 2026
## Summary

Elasticsearch's `GET index_template` API returns `created_date_millis`
and `modified_date_millis` properties, but these properties are not
allowed in `PUT index_template` requests, causing Elasticsearch to
reject updates. The fix removes these read-only date properties before
sending the template back to Elasticsearch in the PUT request.

### How to test
* Go to ILM plugin
* Click the tree dots icon in the actions column for some custom policy
* Click `Add to index template`
* Select an index template and save
* The policy should correctly be applied to the index template

### Before this change
<img width="1170" height="1070" alt="Screenshot 2026-01-15 at 11 01 29"
src="https://github.com/user-attachments/assets/45d86252-4466-4d51-bd1a-75a47cd1b481"
/>

### After this change
<img width="1296" height="1159" alt="Screenshot 2026-01-15 at 11 42 30"
src="https://github.com/user-attachments/assets/6047c7b6-f4d0-4b19-8f23-29ecbf8fcb7a"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release bug Fixes for quality problems that affect the customer experience Feature:ILM release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v8.19.11 v9.1.11 v9.2.5 v9.3.0 v9.4.0

4 participants