-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Add tooltip when upgradeable = false and "Upgrade agent" action is disabled #173281
Comments
Pinging @elastic/fleet (Team:Fleet) |
One of the conditions in this logic is:
AFAIK the |
Yes this is accurate. Fleet can do a best effort for some of the other derived values in that file above, but I'd expect most cases where this is disabled to be a result of that |
I've added some implementation detail tasks here. We'll need contributions in both Fleet and Agent to make this happen. cc @jen-huang @jlind23 for prioritization. |
This might be related elastic/elastic-agent#3906 |
Even a link to a doc laying out all possible reasons for an agent being "not upgradeable" can go a long way. |
I have a PR where I'm doing something similar, I'm returning a message explaining the reason why the agent is not upgradeable. I'm sure that this could be handled in a better way if we do further changes to the elastic agent, as for now when the agent returns "not_upgradeable" Fleet has no way to know why. |
#173253 would be a good first step before doing all the changes from Elastic Agent to Fleet. |
) Closes #171840 Also implements the UI part of #173281 ## Summary When trying to upgrade a single agent that is not upgradeable, the error message doesn't specify _why_ the agent cannot be upgraded. This PR is introducing: - More granular error messages in the endpoint `POST agent/{agent_id}/upgrade`. The messages are now different depending on which conditions are met. For the case when the agent is reported not upgradeable from elastic agent, there is now an error message the states it explicitly. - When clicking on the `upgrade 1 agent` from the bulk actions, if the agent is not upgradeable the submit button is now greyed out and a message explaining the reason is shown: - ![Screenshot 2023-12-18 at 14 41 48](https://github.com/elastic/kibana/assets/16084106/8e0a03b4-c8fc-4a2e-aea6-77c7cc1acdf3) The same warning appears when clicking on other upgrade actions in the bulk action menu, but only for a single agent. Multiple upgrades have not been changed. - In the agents list, reuse the existing tooltip besides the version to show the same messages when the agent is not upgradeable: ![Screenshot 2023-12-18 at 14 40 32](https://github.com/elastic/kibana/assets/16084106/ada30bc0-8c58-40d9-b7cf-c5c7a81a75f7) ### 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>
Tooltip and a warning message explaining why an agent is not upgradeable were merged in in 8.13. I think that we'll need some work on the elastic agent side to be able to implement the rest of the points outlined in the description. |
AFAIK it is not done yet, maybe @pierrehilbert has a tracking issue that we can reference here. |
This is not implemented in Elastic Agent yet. |
Currently, Fleet will disable the "Upgrade" action in the actions dropdown when an agent is determined to be non-upgradeable. We should try to surface why this is in a tooltip.
Fleet has some extensive logic around this derived
is_agent_upgradeable
flag here: https://github.com/elastic/kibana/blob/main/x-pack/plugins/fleet/common/services/is_agent_upgradeable.tsWe should add a notion of "error codes" or some kind of status string that maps to a meaningful human readable message we can report in a tooltip when hovering over the disabled "Upgrade" action.
Tasks
upgradeable_reason
value in the tooltip if agent provides it #192427The text was updated successfully, but these errors were encountered: