[Fleet] Show warning when download upgrade is failing#173844
[Fleet] Show warning when download upgrade is failing#173844criamico merged 7 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
/ci |
|
@elasticmachine merge upstream |
|
Pinging @elastic/fleet (Team:Fleet) |
|
The PR is almost ready, the only thing left to address is this comment : after all the retries fail, the agent goes to "UPG_FAILED" state but it doesn't seem to reset even after long time. Coupled with a "healthy" state this looks weird and I think that we should reset it after some time. I don't know if we want to use this PR to address it or merge it and do it separately. |
| defaultMessage="Upgrade failing: {retryMsg}. {retryUntil}" | ||
| values={{ | ||
| retryMsg: agentUpgradeDetails?.metadata?.retry_error_msg, | ||
| retryUntil: formatRetryUntil(agentUpgradeDetails?.metadata?.retry_until), |
There was a problem hiding this comment.
Since the retry_until is a deadline in UTC, it might be easier for the user to read to if we also calculated and presented the time remaining as retry_until - now(). This would let us present something like "Retrying until: 2024-01-30T15:03:38.159Z (1h53m remaining)" to save the user from having to calculate this in their own head.
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @criamico |
|
Hey @criamico it looks like the errors reported often delimit individual errors with One piece of concern is that there's no newline after the |
@kpollich I'm not sure about it, I can take a quick look tomorrow but if it's too involved I would rather file an enhancement ticket for it. |

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 aretry_msgthat 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
sourceURI: https://artifacts.elastic.co/notdownloads/retry_untiltime in humanized format (retry until...remaining):This way the message shows the values present in the agent metadata.
Same is reported in the agent list table:

After a while the retries will be finished and the agent will show the regular "upgrade failed" badge (this was already implemented):

Checklist