-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Improve Functionality around Managed Package Policies #114526
[Fleet] Improve Functionality around Managed Package Policies #114526
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
({ policy }) => policy?.package_policies as string[] | ||
); | ||
const fulfilledPolicyPackagePolicyIds = fulfilledPolicies | ||
.filter(({ policy }) => policy?.package_policies) |
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.
@nchaulet - Here's the fix for that Not Found
error we were throwing in tests yesterday
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.
Great 👍 I am still wondering how this happen in the first place (a default agent policy without package policies)
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @kpollich |
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.
Looks good to me 🚀
…c#114526) * Enabled auto policy upgrades for APM and Synthetics * fixup! Enabled auto policy upgrades for APM and Synthetics * Rework preconfiguration policy upgrade flow + report errors * Fix type error in test * Fix type errors + tests * wip * Remove keep policies up to date checks * Remove references to KEEP_POLICIES_UP_TO_DATE_PACKAGES * Move package policy upgrade results to nonFatalErrors * Fix types * Fix type error Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…mple/introduce-baseline-tests * 'master' of github.com:elastic/kibana: (55 commits) [Fleet] Improve Functionality around Managed Package Policies (elastic#114526) cleanup (elastic#114902) remove stray semicolon (elastic#114969) [Security Solution] Edit host isolation exception IP UI (elastic#114279) [ML] APM Correlations: Round duration values to be used in range aggregations. (elastic#114833) [Index Management] Added `data-test-subj` values to the index context menu buttons (elastic#114900) [Stack monitoring] Fix logstash functional tests for react (elastic#114819) Implement hybrid approach to writing rule execution event logs (elastic#114852) [Detection Rules] Add 7.16 rules (elastic#114939) Fixing exceptions export format (elastic#114920) Clean up inaccurate comments (elastic#114935) chore(NA): fixes a typo on persist_bazel_cache.sh comment (elastic#114943) [ci] Fixes Bazel cache writes (elastic#114915) fix package.json: (elastic#114936) [Controls] Redux Toolkit and Embeddable Redux Wrapper (elastic#114371) [APM] Fixes incorrect index config names (elastic#114901) (elastic#114904) [Workplace Search] Fix button order and remove extra source name label (elastic#114899) [Actions] Fixed actions telemetry for multiple namespaces usage (elastic#114748) docs: fix config names (elastic#114903) Update kibana to EMS 7.16 (elastic#114865) ...
… (#114980) * Enabled auto policy upgrades for APM and Synthetics * fixup! Enabled auto policy upgrades for APM and Synthetics * Rework preconfiguration policy upgrade flow + report errors * Fix type error in test * Fix type errors + tests * wip * Remove keep policies up to date checks * Remove references to KEEP_POLICIES_UP_TO_DATE_PACKAGES * Move package policy upgrade results to nonFatalErrors * Fix types * Fix type error Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
Summary
Ref #114306
This is a repurposed PR that initially handled adding functionality such that APM and Synthetics would automatically have their policies upgraded as part of Fleet's preconfiguration/setup flow. That concept was altered, but there were still some valuable pieces here, namely:
packagePolicyUpgradeResults
value returned from setup API callsWe need to perform a dry run before upgrading package policies during setup, because our
packagePolicyService.upgrade
method does not report errors or return a diff in the same manner as our dry run process. By running the dry run first, we can report granular errors and the full upgrade diff in the event of a conflict.