-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fleet] Show warning when download upgrade is failing (#173844)
Fixes #173370 Closes #171941 ## Summary Show a warning when download upgrade is failing. This PR addresses a specific case of `upgrade downloading`: when the upgrade started but it's failing with an error. In this case, since 8.12, the agent metadata have a `retry_msg` that can be used to distinguish this case from the regular upgrade. I'm also fixing one smaller bug that I introduced with #173253, the tooltip shown in the case when the agent is not upgradeable was hiding the badge, so I'm moving the if as the last one in the function. ## Testing - Have an 8.12 agent installed with Multipass (it needs to be upgradeable) - Change the download binary url to something broken: `sourceURI: https://artifacts.elastic.co/notdownloads/` - Force upgrade from dev tools: ``` POST kbn:/api/fleet/agents/c3f09103-4e69-4a36-bee2-84223bedef36/upgrade { "version": "8.12.0", "force": true } ``` - Go to agent overview, the badge will show "upgrading" but will also have a warning icon with a tooltip, showing the retry message and the `retry_until` time in humanized format (retry until...remaining): ![Screenshot 2024-01-02 at 16 54 20](https://github.com/elastic/kibana/assets/16084106/ac340e7d-5151-4e4e-b6a6-731a113ff984) This way the message shows the values present in the agent metadata. - Same is reported in the agent list table: ![Screenshot 2024-01-02 at 16 54 28](https://github.com/elastic/kibana/assets/16084106/1f8823c4-9e5c-4f4c-9cdc-2839b16214bb) - After a while the retries will be finished and the agent will show the regular "upgrade failed" badge (this was already implemented): ![Screenshot 2023-12-21 at 12 07 27](https://github.com/elastic/kibana/assets/16084106/c1d5bf67-a4fd-4b04-aa8d-24dc8d4af54e) ### Checklist - [ ] [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 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
5f40efb
commit 1de5cde
Showing
5 changed files
with
134 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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