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

[Fleet] Enable auto package and package policy upgrades for APM and Synthetics packages #114306

Closed
joshdover opened this issue Oct 7, 2021 · 2 comments
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team v7.16.0

Comments

@joshdover
Copy link
Contributor

joshdover commented Oct 7, 2021

Breaking independent issue out of #112831 (comment) for 7.16

This should only be merged if the package owners verify the conditions in the comment above ⬆️

Upgrade behavior

The APM and Synthetics packages need to be:

  • Added to the autoUpdatePackages list, to have the same behavior as Endpoint:
    export const autoUpdatePackages = [FLEET_ENDPOINT_PACKAGE];
  • Opted in to always have "keep policies up to date" behavior from [Fleet] Add "Keep Policies up to Date" functionality for integrations #112702
    • Most likely the easiest way to accomplish this for 7.16 is to leave the existing functionality in and add a new constant for a list of managed packages that should always have this behavior. If a package is in this list, we ignore the value of the keep_policies_up_to_date field on epm-packages and always attempt to upgrade the policies
    • We should hide the "Keep policies up to date" toggle in the integrations detail UI for packages in this list as well

Error handling

We also need to verify and potentially improve error handling for policies that fail to upgrade during Fleet Setup. At a minimum we need:

  • Logging at the error level when a package policy fails to upgrade during setup (or in general) including the exception that caused the error, the stack trace, and if a conflict was encountered, a diff of the package policies that shows the reason for the conflict.
  • All of this same information should be bubbled up to the UI when the user visits the Fleet app and setup is called and fails.
  • @kpollich do you know if we already have any of this error handling?
@joshdover joshdover added Team:Fleet Team label for Observability Data Collection Fleet team v7.16.0 labels Oct 7, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kpollich
Copy link
Member

Logging at the error level when a package policy fails to upgrade during setup (or in general) including the exception that caused the error, the stack trace, and if a conflict was encountered, a diff of the package policies that shows the reason for the conflict.

All of this same information should be bubbled up to the UI when the user visits the Fleet app and setup is called and fails.

@kpollich do you know if we already have any of this error handling?

We don't have error handling like this right now. We're swallowing errors that come from package policy upgrades in order to not block the completion of setup. I will take a look at surfacing these errors as non-fatal during the setup process instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team v7.16.0
Projects
None yet
Development

No branches or pull requests

3 participants