[Fleet] Display warning when trying to upgrade agent to version > max fleet server version#178079
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
|
/ci |
|
@elasticmachine merge upstream |
|
Pinging @elastic/fleet (Team:Fleet) |
| /This action will upgrade the agent running on 'host00001' to version 8.10.2. This action can not be undone. Are you sure you wish to continue?/ | ||
| ) | ||
| ); | ||
| expect(utils.queryByText(/Error upgrading the selected agent/)).toBeInTheDocument(); |
There was a problem hiding this comment.
I think it would be better to use a warning instead of error, since this is not a result of an action, but preventing it: https://eui.elastic.co/#/display/callout#warning
Could have a title something like Action disallowed or Warning
There was a problem hiding this comment.
+1 - let's go with a warning callout instead of an error here.
There was a problem hiding this comment.
I repurposed the callout added in #173253 as those conditions are exclusive. Also updated the copy so the callout will just display "warning" as title and whatever message is relevant for the case.
I still need to do some cleanup on the component as there is some code duplication and the modal is now doing a lot of things.
...ins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx
Show resolved
Hide resolved
Is the button disabled in the latest commits? I haven't checked locally, just noticed on the screenshot it is not disabled. |
@juliaElastic I checked and it's disabled, I think I had an older screenshot. I added a recording with the latest changes and I pushed another commit where I'm cleaning up the component a little bit. |
|
Recording: Screen.Recording.2024-03-11.at.10.40.24.mov |
...ins/fleet/public/applications/fleet/sections/agents/components/agent_upgrade_modal/index.tsx
Outdated
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @criamico |
Closes 173727
Summary
Adding a warning to the agent upgrade modal: when the selected version is > than the greatest installed fleet server agent, a warning is presented to the user.
This happens both for a single agent upgrade and for a bulk upgrade. The submit button is only disabled in the case of a single agent upgrade to avoid blocking the user from doing a bulk upgrade. In that case the endpoint will respond with the same error.
Also adding a link to agent upgrade docs and opened a request to improve the docs: elastic/ingest-docs#966
Warning for "not upgradeable agent":

Checklist