Skip to content

[Dataset Quality] Fix index template update issue#231407

Merged
achyutjhunjhunwala merged 2 commits intoelastic:mainfrom
achyutjhunjhunwala:fixing-flaky-api-test-due-to-created-date-property
Aug 12, 2025
Merged

[Dataset Quality] Fix index template update issue#231407
achyutjhunjhunwala merged 2 commits intoelastic:mainfrom
achyutjhunjhunwala:fixing-flaky-api-test-due-to-created-date-property

Conversation

@achyutjhunjhunwala
Copy link
Contributor

@achyutjhunjhunwala achyutjhunjhunwala commented Aug 12, 2025

Summary

closes #230901

Analysis

This test suddenly started failing with an Elasticsearch error index_template [logs] invalid, cause [provided a template property which is managed by the system: created_date]

The created_date is an Elasticsearch managed property and what i found is this property has been a managed property since 8.x meaning nothing changed here and makes me wonder why this test started failing suddenly.

Hence to safeguard this is not happening, i update the logic to dedicated handle this part and delete created_date property while updating index templates

Also the call to this function in the after each block was unnecessary, seems like a copy paste mistake. Hence it has also been removed.

Flaky Test Runner

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9098

@achyutjhunjhunwala achyutjhunjhunwala self-assigned this Aug 12, 2025
@achyutjhunjhunwala achyutjhunjhunwala requested a review from a team as a code owner August 12, 2025 09:44
@achyutjhunjhunwala achyutjhunjhunwala added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:obs-onboarding Observability Onboarding Team labels Aug 12, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

@achyutjhunjhunwala achyutjhunjhunwala changed the title [Dataset Quality]fix index template update issue [Dataset Quality] Fix index template update issue Aug 12, 2025
@mohamedhamed-ahmed
Copy link
Contributor

I think this might be related to recent changes in ES, could also be the same reason some other tests for Streams were failing as well.
#231394 (comment)

@achyutjhunjhunwala
Copy link
Contributor Author

I think this might be related to recent changes in ES, could also be the same reason some other tests for Streams were failing as well. #231394 (comment)

Oh wow, thank you for linking the issue

@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) August 12, 2025 10:25
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#9098

[✅] x-pack/solutions/observability/test/dataset_quality_api_integration/basic/config.ts: 25/25 tests passed.

see run history

@achyutjhunjhunwala achyutjhunjhunwala merged commit 1347703 into elastic:main Aug 12, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

cc @achyutjhunjhunwala

@achyutjhunjhunwala achyutjhunjhunwala deleted the fixing-flaky-api-test-due-to-created-date-property branch August 12, 2025 12:15
mistic pushed a commit that referenced this pull request Aug 13, 2025
## Summary

closes #231478
closes #231477

As part of this [PR](#231407), i
fixed the issue but
[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)
there are more fields which are causing issue. Hence removing the
exhaustive list of keys which are causing issues

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Aug 14, 2025
…1615)

## Summary

closes elastic#231478
closes elastic#231477

As part of this [PR](elastic#231407), i
fixed the issue but
[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)
there are more fields which are causing issue. Hence removing the
exhaustive list of keys which are causing issues

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
## Summary

closes elastic#230901

## Analysis

This test suddenly started failing with an Elasticsearch error
`index_template [logs] invalid, cause [provided a template property
which is managed by the system: created_date]`

The `created_date` is an Elasticsearch managed property and what i found
is this property has been a managed property since `8.x` meaning nothing
changed here and makes me wonder why this test started failing suddenly.

Hence to safeguard this is not happening, i update the logic to
dedicated handle this part and delete `created_date` property while
updating `index templates`

Also the call to this function in the after each block was unnecessary,
seems like a copy paste mistake. Hence it has also been removed.

## Flaky Test Runner

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9098
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
…1615)

## Summary

closes elastic#231478
closes elastic#231477

As part of this [PR](elastic#231407), i
fixed the issue but
[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)
there are more fields which are causing issue. Hence removing the
exhaustive list of keys which are causing issues

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
achyutjhunjhunwala added a commit to achyutjhunjhunwala/kibana that referenced this pull request Aug 19, 2025
…1615)

## Summary

closes elastic#231478
closes elastic#231477

As part of this [PR](elastic#231407), i
fixed the issue but
[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)
there are more fields which are causing issue. Hence removing the
exhaustive list of keys which are causing issues

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit a26d279)

# Conflicts:
#	x-pack/solutions/observability/test/dataset_quality_api_integration/tests/data_streams/es_utils.ts
achyutjhunjhunwala added a commit that referenced this pull request Aug 19, 2025
) (#232259)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Dataset Quality]Fix ES issue with index template updates
(#231615)](#231615)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Achyut
Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2025-08-13T19:24:44Z","message":"[Dataset
Quality]Fix ES issue with index template updates (#231615)\n\n##
Summary\n\ncloses
https://github.com/elastic/kibana/issues/231478\ncloses
https://github.com/elastic/kibana/issues/231477\n\nAs part of this
[PR](#231407), i\nfixed the issue
but\n[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)\nthere
are more fields which are causing issue. Hence removing the\nexhaustive
list of keys which are causing issues\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a26d279ed4d25fccb774e9ebb8ac76bfcf63afe7","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:obs-ux-logs","v9.2.0"],"title":"[Dataset
Quality]Fix ES issue with index template
updates","number":231615,"url":"https://github.com/elastic/kibana/pull/231615","mergeCommit":{"message":"[Dataset
Quality]Fix ES issue with index template updates (#231615)\n\n##
Summary\n\ncloses
https://github.com/elastic/kibana/issues/231478\ncloses
https://github.com/elastic/kibana/issues/231477\n\nAs part of this
[PR](#231407), i\nfixed the issue
but\n[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)\nthere
are more fields which are causing issue. Hence removing the\nexhaustive
list of keys which are causing issues\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a26d279ed4d25fccb774e9ebb8ac76bfcf63afe7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231615","number":231615,"mergeCommit":{"message":"[Dataset
Quality]Fix ES issue with index template updates (#231615)\n\n##
Summary\n\ncloses
https://github.com/elastic/kibana/issues/231478\ncloses
https://github.com/elastic/kibana/issues/231477\n\nAs part of this
[PR](#231407), i\nfixed the issue
but\n[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)\nthere
are more fields which are causing issue. Hence removing the\nexhaustive
list of keys which are causing issues\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a26d279ed4d25fccb774e9ebb8ac76bfcf63afe7"}}]}]
BACKPORT-->
achyutjhunjhunwala added a commit that referenced this pull request Aug 19, 2025
…1615) (#232260)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Dataset Quality]Fix ES issue with index template updates
(#231615)](#231615)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Achyut
Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2025-08-13T19:24:44Z","message":"[Dataset
Quality]Fix ES issue with index template updates (#231615)\n\n##
Summary\n\ncloses
https://github.com/elastic/kibana/issues/231478\ncloses
https://github.com/elastic/kibana/issues/231477\n\nAs part of this
[PR](#231407), i\nfixed the issue
but\n[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)\nthere
are more fields which are causing issue. Hence removing the\nexhaustive
list of keys which are causing issues\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a26d279ed4d25fccb774e9ebb8ac76bfcf63afe7","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:obs-ux-logs","v9.2.0"],"title":"[Dataset
Quality]Fix ES issue with index template
updates","number":231615,"url":"https://github.com/elastic/kibana/pull/231615","mergeCommit":{"message":"[Dataset
Quality]Fix ES issue with index template updates (#231615)\n\n##
Summary\n\ncloses
https://github.com/elastic/kibana/issues/231478\ncloses
https://github.com/elastic/kibana/issues/231477\n\nAs part of this
[PR](#231407), i\nfixed the issue
but\n[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)\nthere
are more fields which are causing issue. Hence removing the\nexhaustive
list of keys which are causing issues\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a26d279ed4d25fccb774e9ebb8ac76bfcf63afe7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/231615","number":231615,"mergeCommit":{"message":"[Dataset
Quality]Fix ES issue with index template updates (#231615)\n\n##
Summary\n\ncloses
https://github.com/elastic/kibana/issues/231478\ncloses
https://github.com/elastic/kibana/issues/231477\n\nAs part of this
[PR](#231407), i\nfixed the issue
but\n[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)\nthere
are more fields which are causing issue. Hence removing the\nexhaustive
list of keys which are causing issues\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"a26d279ed4d25fccb774e9ebb8ac76bfcf63afe7"}}]}]
BACKPORT-->
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
## Summary

closes elastic#230901

## Analysis

This test suddenly started failing with an Elasticsearch error
`index_template [logs] invalid, cause [provided a template property
which is managed by the system: created_date]`

The `created_date` is an Elasticsearch managed property and what i found
is this property has been a managed property since `8.x` meaning nothing
changed here and makes me wonder why this test started failing suddenly.

Hence to safeguard this is not happening, i update the logic to
dedicated handle this part and delete `created_date` property while
updating `index templates`

Also the call to this function in the after each block was unnecessary,
seems like a copy paste mistake. Hence it has also been removed.

## Flaky Test Runner

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9098
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
…1615)

## Summary

closes elastic#231478
closes elastic#231477

As part of this [PR](elastic#231407), i
fixed the issue but
[realised](https://github.com/elastic/kibana/pull/231394/files#diff-b0b75c67a5e67b5f0d2ab1bfc8cd4cd866485a6486d31c6a2b0deafc42beed05R116)
there are more fields which are causing issue. Hence removing the
exhaustive list of keys which are causing issues

---------

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:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:obs-onboarding Observability Onboarding Team v9.2.0

Projects

None yet

4 participants