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

v1 migrations: drop fleet-agent-events during a migration #92188

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

rudolf
Copy link
Contributor

@rudolf rudolf commented Feb 22, 2021

Summary

Fixes #91869

This will drop fleet-agent-events during v1 migrations.

v2 migrations use Elasticsearch to reindex all documents so we're not currently able to drop saved objects during the migration itself although this will change in #86247. However, this also means that v2 migrations won't be affected by large numbers of fleet-agent-events in 7.12.

So for 7.12 this will only benefit customers who switch off v2 migrations.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@rudolf rudolf added bug Fixes for quality problems that affect the customer experience v8.0.0 labels Feb 22, 2021
@rudolf rudolf marked this pull request as ready for review February 22, 2021 15:59
@rudolf rudolf requested review from a team as code owners February 22, 2021 15:59
@rudolf rudolf added the v7.12.0 label Feb 22, 2021
@nchaulet nchaulet self-requested a review February 22, 2021 16:13
@@ -124,6 +124,8 @@ const getSavedObjectTypes = (
'7.10.0': migrateAgentActionToV7100(encryptedSavedObjects),
},
},
// TODO: Remove this saved object type. Core will drop any saved objects of
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we're dropping any fleet-agent-events it would be critical if we started saving something there that was important to keep. As a follow-up to this PR we should remove this saved object type from fleet and once that's done I can add fleet-agent-events to a denylist inside core so that future plugins don't accidentally start using this saved object.

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 22, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Tested with migrations.enableV2: false and works as expected it drop agent events

@rudolf rudolf merged commit 3b1ca52 into elastic:master Feb 23, 2021
@rudolf rudolf deleted the fix-91869 branch February 23, 2021 10:45
rudolf added a commit to rudolf/kibana that referenced this pull request Feb 23, 2021
)

* v1 migrations: drop fleet-agent-events during a migration

* Add TODO to fleet to make it clear that fleet-agent-events should not be used

* Fix test
rudolf added a commit to rudolf/kibana that referenced this pull request Feb 23, 2021
)

* v1 migrations: drop fleet-agent-events during a migration

* Add TODO to fleet to make it clear that fleet-agent-events should not be used

* Fix test
rudolf added a commit that referenced this pull request Feb 23, 2021
…92371)

* v1 migrations: drop fleet-agent-events during a migration

* Add TODO to fleet to make it clear that fleet-agent-events should not be used

* Fix test
rudolf added a commit that referenced this pull request Feb 23, 2021
…92372)

* v1 migrations: drop fleet-agent-events during a migration

* Add TODO to fleet to make it clear that fleet-agent-events should not be used

* Fix test
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7.11.0/7.12.0 upgrade migrations take very long to complete or timeout due to huge number of saved objects
6 participants