-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[UII] Make constant keyword backfill optional #192921
Conversation
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM 🚀 do you think it will make sense to add a unit test to document that scenario?
@nchaulet I added a few unit tests here :) |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @jen-huang |
## Summary Follow up to elastic#188145. In some edge cases (elastic/sdh-beats#5156), users could override the index template used by integration data streams. It is possible to create an index template without mappings, this causes `fillConstantKeywordValues` to receive an undefined object when upgrading the integration, and the upgrade then fails. This PR makes the backfill operation here more fail-safe. (cherry picked from commit b5abc4e)
## Summary Follow up to elastic#188145. In some edge cases (elastic/sdh-beats#5156), users could override the index template used by integration data streams. It is possible to create an index template without mappings, this causes `fillConstantKeywordValues` to receive an undefined object when upgrading the integration, and the upgrade then fails. This PR makes the backfill operation here more fail-safe. (cherry picked from commit b5abc4e)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[UII] Make constant keyword backfill optional (#192921)](#192921) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jen Huang","email":"its.jenetic@gmail.com"},"sourceCommit":{"committedDate":"2024-09-14T02:34:46Z","message":"[UII] Make constant keyword backfill optional (#192921)\n\n## Summary\r\n\r\nFollow up to #188145. In some edge cases\r\n(elastic/sdh-beats#5156), users could override\r\nthe index template used by integration data streams. It is possible to\r\ncreate an index template without mappings, this causes\r\n`fillConstantKeywordValues` to receive an undefined object when\r\nupgrading the integration, and the upgrade then fails.\r\n\r\nThis PR makes the backfill operation here more fail-safe.","sha":"b5abc4ec7e308815b0f338f4c836a9caf3ee48a3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"[UII] Make constant keyword backfill optional","number":192921,"url":"https://github.com/elastic/kibana/pull/192921","mergeCommit":{"message":"[UII] Make constant keyword backfill optional (#192921)\n\n## Summary\r\n\r\nFollow up to #188145. In some edge cases\r\n(elastic/sdh-beats#5156), users could override\r\nthe index template used by integration data streams. It is possible to\r\ncreate an index template without mappings, this causes\r\n`fillConstantKeywordValues` to receive an undefined object when\r\nupgrading the integration, and the upgrade then fails.\r\n\r\nThis PR makes the backfill operation here more fail-safe.","sha":"b5abc4ec7e308815b0f338f4c836a9caf3ee48a3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192921","number":192921,"mergeCommit":{"message":"[UII] Make constant keyword backfill optional (#192921)\n\n## Summary\r\n\r\nFollow up to #188145. In some edge cases\r\n(elastic/sdh-beats#5156), users could override\r\nthe index template used by integration data streams. It is possible to\r\ncreate an index template without mappings, this causes\r\n`fillConstantKeywordValues` to receive an undefined object when\r\nupgrading the integration, and the upgrade then fails.\r\n\r\nThis PR makes the backfill operation here more fail-safe.","sha":"b5abc4ec7e308815b0f338f4c836a9caf3ee48a3"}}]}] BACKPORT--> Co-authored-by: Jen Huang <its.jenetic@gmail.com>
# Backport This will backport the following commits from `main` to `8.15`: - [[UII] Make constant keyword backfill optional (#192921)](#192921) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jen Huang","email":"its.jenetic@gmail.com"},"sourceCommit":{"committedDate":"2024-09-14T02:34:46Z","message":"[UII] Make constant keyword backfill optional (#192921)\n\n## Summary\r\n\r\nFollow up to #188145. In some edge cases\r\n(elastic/sdh-beats#5156), users could override\r\nthe index template used by integration data streams. It is possible to\r\ncreate an index template without mappings, this causes\r\n`fillConstantKeywordValues` to receive an undefined object when\r\nupgrading the integration, and the upgrade then fails.\r\n\r\nThis PR makes the backfill operation here more fail-safe.","sha":"b5abc4ec7e308815b0f338f4c836a9caf3ee48a3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","backport:prev-major"],"title":"[UII] Make constant keyword backfill optional","number":192921,"url":"https://github.com/elastic/kibana/pull/192921","mergeCommit":{"message":"[UII] Make constant keyword backfill optional (#192921)\n\n## Summary\r\n\r\nFollow up to #188145. In some edge cases\r\n(elastic/sdh-beats#5156), users could override\r\nthe index template used by integration data streams. It is possible to\r\ncreate an index template without mappings, this causes\r\n`fillConstantKeywordValues` to receive an undefined object when\r\nupgrading the integration, and the upgrade then fails.\r\n\r\nThis PR makes the backfill operation here more fail-safe.","sha":"b5abc4ec7e308815b0f338f4c836a9caf3ee48a3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192921","number":192921,"mergeCommit":{"message":"[UII] Make constant keyword backfill optional (#192921)\n\n## Summary\r\n\r\nFollow up to #188145. In some edge cases\r\n(elastic/sdh-beats#5156), users could override\r\nthe index template used by integration data streams. It is possible to\r\ncreate an index template without mappings, this causes\r\n`fillConstantKeywordValues` to receive an undefined object when\r\nupgrading the integration, and the upgrade then fails.\r\n\r\nThis PR makes the backfill operation here more fail-safe.","sha":"b5abc4ec7e308815b0f338f4c836a9caf3ee48a3"}}]}] BACKPORT--> Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Summary
Follow up to #188145. In some edge cases (https://github.com/elastic/sdh-beats/issues/5156), users could override the index template used by integration data streams. It is possible to create an index template without mappings, this causes
fillConstantKeywordValues
to receive an undefined object when upgrading the integration, and the upgrade then fails.This PR makes the backfill operation here more fail-safe.