[Fleet] Only show fleet managed data streams on data streams list page#143300
Merged
hop-dev merged 1 commit intoelastic:mainfrom Oct 13, 2022
Merged
Conversation
7cf5288 to
d0571da
Compare
d0571da to
4742a1f
Compare
Contributor
|
Pinging @elastic/fleet (Team:Fleet) |
kpollich
approved these changes
Oct 13, 2022
Member
kpollich
left a comment
There was a problem hiding this comment.
Change looks simple enough - thanks for updating the test data as well. 🚀
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: cc @hop-dev |
This was referenced Jan 24, 2023
criamico
added a commit
that referenced
this pull request
Jan 26, 2023
…149504) ## Summary Closes #147605 ### Description Clusters that exist since pre-8.0 might have data streams that have `managed_by: ingest_manager` in their` _meta` properties, instead of the current value `managed_by: fleet`. However, with the merge of #143300, the data streams view filters out any data streams that don't have `managed_by: fleet` metadata, so when updating from 7.x to 8.6.x no data streams are returned. ### Solution It was decided to simply add an additional check in the data stream handler to allow for "legacy" metadata, and to avoid doing migrations that can be dangerous for the users data. ### Testing I'm looking for a way to reliably test this locally - I've only managed to reproduce it on cloud
criamico
added a commit
to criamico/kibana
that referenced
this pull request
Jan 26, 2023
…lastic#149504) ## Summary Closes elastic#147605 ### Description Clusters that exist since pre-8.0 might have data streams that have `managed_by: ingest_manager` in their` _meta` properties, instead of the current value `managed_by: fleet`. However, with the merge of elastic#143300, the data streams view filters out any data streams that don't have `managed_by: fleet` metadata, so when updating from 7.x to 8.6.x no data streams are returned. ### Solution It was decided to simply add an additional check in the data stream handler to allow for "legacy" metadata, and to avoid doing migrations that can be dangerous for the users data. ### Testing I'm looking for a way to reliably test this locally - I've only managed to reproduce it on cloud (cherry picked from commit 49ff27e) # Conflicts: # x-pack/plugins/fleet/server/routes/data_streams/handlers.ts
criamico
added a commit
that referenced
this pull request
Jan 26, 2023
…pings (#149504) (#149583) # Backport This will backport the following commits from `main` to `8.6`: - [[Fleet] Add check for legacy managed_by field in datastream mappings (#149504)](#149504) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Cristina Amico","email":"criamico@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-01-26T08:15:14Z","message":"[Fleet] Add check for legacy managed_by field in datastream mappings (#149504)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/147605\r\n\r\n### Description\r\nClusters that exist since pre-8.0 might have data streams that have\r\n`managed_by: ingest_manager` in their` _meta` properties, instead of the\r\ncurrent value `managed_by: fleet`.\r\nHowever, with the merge of\r\nhttps://github.com//pull/143300, the data streams view\r\nfilters out any data streams that don't have `managed_by: fleet`\r\nmetadata, so when updating from 7.x to 8.6.x no data streams are\r\nreturned.\r\n\r\n### Solution\r\nIt was decided to simply add an additional check in the data stream\r\nhandler to allow for \"legacy\" metadata, and to avoid doing migrations\r\nthat can be dangerous for the users data.\r\n\r\n\r\n### Testing\r\nI'm looking for a way to reliably test this locally - I've only managed\r\nto reproduce it on cloud","sha":"49ff27e2ff109ef28a8640e056db1cda645986ca","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.7.0","v8.6.1"],"number":149504,"url":"https://github.com/elastic/kibana/pull/149504","mergeCommit":{"message":"[Fleet] Add check for legacy managed_by field in datastream mappings (#149504)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/147605\r\n\r\n### Description\r\nClusters that exist since pre-8.0 might have data streams that have\r\n`managed_by: ingest_manager` in their` _meta` properties, instead of the\r\ncurrent value `managed_by: fleet`.\r\nHowever, with the merge of\r\nhttps://github.com//pull/143300, the data streams view\r\nfilters out any data streams that don't have `managed_by: fleet`\r\nmetadata, so when updating from 7.x to 8.6.x no data streams are\r\nreturned.\r\n\r\n### Solution\r\nIt was decided to simply add an additional check in the data stream\r\nhandler to allow for \"legacy\" metadata, and to avoid doing migrations\r\nthat can be dangerous for the users data.\r\n\r\n\r\n### Testing\r\nI'm looking for a way to reliably test this locally - I've only managed\r\nto reproduce it on cloud","sha":"49ff27e2ff109ef28a8640e056db1cda645986ca"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/149504","number":149504,"mergeCommit":{"message":"[Fleet] Add check for legacy managed_by field in datastream mappings (#149504)\n\n## Summary\r\n\r\nCloses https://github.com/elastic/kibana/issues/147605\r\n\r\n### Description\r\nClusters that exist since pre-8.0 might have data streams that have\r\n`managed_by: ingest_manager` in their` _meta` properties, instead of the\r\ncurrent value `managed_by: fleet`.\r\nHowever, with the merge of\r\nhttps://github.com//pull/143300, the data streams view\r\nfilters out any data streams that don't have `managed_by: fleet`\r\nmetadata, so when updating from 7.x to 8.6.x no data streams are\r\nreturned.\r\n\r\n### Solution\r\nIt was decided to simply add an additional check in the data stream\r\nhandler to allow for \"legacy\" metadata, and to avoid doing migrations\r\nthat can be dangerous for the users data.\r\n\r\n\r\n### Testing\r\nI'm looking for a way to reliably test this locally - I've only managed\r\nto reproduce it on cloud","sha":"49ff27e2ff109ef28a8640e056db1cda645986ca"}},{"branch":"8.6","label":"v8.6.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
kqualters-elastic
pushed a commit
to kqualters-elastic/kibana
that referenced
this pull request
Feb 6, 2023
…lastic#149504) ## Summary Closes elastic#147605 ### Description Clusters that exist since pre-8.0 might have data streams that have `managed_by: ingest_manager` in their` _meta` properties, instead of the current value `managed_by: fleet`. However, with the merge of elastic#143300, the data streams view filters out any data streams that don't have `managed_by: fleet` metadata, so when updating from 7.x to 8.6.x no data streams are returned. ### Solution It was decided to simply add an additional check in the data stream handler to allow for "legacy" metadata, and to avoid doing migrations that can be dangerous for the users data. ### Testing I'm looking for a way to reliably test this locally - I've only managed to reproduce it on cloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #123569
Only return data stream info for fleet managed data streams.
I have updated the test data for the integration tests to cover this behaviour.
Manual test steps:
/app/fleet/data-streams, this stream should not be visible. Whereas previously we had something like:Checklist
Delete any items that are not applicable to this PR.