[Fleet] Report automatic upgrade status in UI#215069
Conversation
…to tell whats happening
…or use in ActionStatus
…ogging, added retry attempt badge
…ristians feedback
…ded items due to simpler UI
|
/ci |
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…ons to use the correct types
|
Pinging @elastic/fleet (Team:Fleet) |
|
@elasticmachine merge upstream |
Sent you a direct message, but yes I can reproduce, seems to be a minor flaw in the way we are calculating upgrading vs not in that modal. May not be a blocker here, but we either need to get it added to this PR, or track it separately. |
|
Looking real good! Quick UX question: is there a reason we only show the |
No real reason other than that was in the original scope/mockup. |
I would keep the |
…completed on status column (to be moved to another issue)
https://www.elastic.co/guide/en/fleet/current/upgrade-elastic-agent.html is where it links. I dont know if we need it on already complete items though? |
… fix agent fetcher (#217024) ## Summary Filter out inactive agents in auto upgrade status API - this fixes uninstalled agents incorrectly included in the % calculation. For example with 10 active and 5 uninstalled agents, the percentages are lower than expected. <img width="1787" alt="image" src="https://github.com/user-attachments/assets/bd0ebcea-88c5-40d0-b982-f605e83b4eb8" /> After the change, the 5 uninstalled agents are not included: <img width="1778" alt="image" src="https://github.com/user-attachments/assets/72349902-bbb8-4adb-a69e-8dbfc92ad89e" /> The other fix is related to the auto upgrade logic: #215069 (comment) ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
As a note, this may need to be updated when we have public facing documentation for automatic upgrades. |
jillguyonnet
left a comment
There was a problem hiding this comment.
Thanks for your work on this, LGTM 🚀
|
@elasticmachine merge upstream |
|
@kilfoyle If you want to peek at the copy here now that you're back! |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
|
Closes [4718](elastic/ingest-dev#4718) ## Summary - After much discussion, updated to not show percentages but be very similar to existing upgrade text, but with an icon/tooltip letting the user know it was created from an automatic upgrade. Also applied to completed actions. - Made `policyId` persistent in newly created actions in order to streamline accessing the upgrade modal from agent activity - Added `is_automatic` field to `ActionStatus` type by retrieving from the source doc in `getActions` - Updated audit log to show if the action was created by the user or from the auto-upgrade functionality - Updated badging on table to show retry attempts - Added `manage auto-upgrade` button to agent activity actions created by automatic upgrades - Updated check in `automatic_upgrade_task` to only consider active agents in order to resolve an issue where uninstalled agents could affect the upgrade of new ones. - Reworked rounding functionality when percentages or counts of agents to upgrade were over or under where they should be. Rounding is now done in a way such that no agents get left behind, and we dont try to upgrade more than exist. - Added new test coverage for the rounding functionality, the new active vs inactive agents check, as well as ensuring the manage auto-upgrades button always renders. Simplified UI with tooltip and button to quickly access auto-upgrade settings for the policy the action belongs to:  Updated tooltip to let the user know that rounding is in place:  ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks N/A --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes [4718](elastic/ingest-dev#4718) - After much discussion, updated to not show percentages but be very similar to existing upgrade text, but with an icon/tooltip letting the user know it was created from an automatic upgrade. Also applied to completed actions. - Made `policyId` persistent in newly created actions in order to streamline accessing the upgrade modal from agent activity - Added `is_automatic` field to `ActionStatus` type by retrieving from the source doc in `getActions` - Updated audit log to show if the action was created by the user or from the auto-upgrade functionality - Updated badging on table to show retry attempts - Added `manage auto-upgrade` button to agent activity actions created by automatic upgrades - Updated check in `automatic_upgrade_task` to only consider active agents in order to resolve an issue where uninstalled agents could affect the upgrade of new ones. - Reworked rounding functionality when percentages or counts of agents to upgrade were over or under where they should be. Rounding is now done in a way such that no agents get left behind, and we dont try to upgrade more than exist. - Added new test coverage for the rounding functionality, the new active vs inactive agents check, as well as ensuring the manage auto-upgrades button always renders. Simplified UI with tooltip and button to quickly access auto-upgrade settings for the policy the action belongs to:  Updated tooltip to let the user know that rounding is in place:  Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) N/A --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes 4718
Summary
policyIdpersistent in newly created actions in order to streamline accessing the upgrade modal from agent activityis_automaticfield toActionStatustype by retrieving from the source doc ingetActionsmanage auto-upgradebutton to agent activity actions created by automatic upgradesautomatic_upgrade_taskto only consider active agents in order to resolve an issue where uninstalled agents could affect the upgrade of new ones.Simplified UI with tooltip and button to quickly access auto-upgrade settings for the policy the action belongs to:

Updated tooltip to let the user know that rounding is in place:

Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesIdentify risks
N/A