Skip to content

[Fleet] Display warning when trying to upgrade agent to version > max fleet server version#178079

Merged
criamico merged 14 commits intoelastic:mainfrom
criamico:173727_warning_upgrade_versions
Mar 11, 2024
Merged

[Fleet] Display warning when trying to upgrade agent to version > max fleet server version#178079
criamico merged 14 commits intoelastic:mainfrom
criamico:173727_warning_upgrade_versions

Conversation

@criamico
Copy link
Copy Markdown
Member

@criamico criamico commented Mar 6, 2024

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

Screenshot 2024-03-11 at 10 39 49

Screenshot 2024-03-08 at 17 17 26

Warning for "not upgradeable agent":
Screenshot 2024-03-11 at 10 50 10

Checklist

  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)

@criamico criamico self-assigned this Mar 6, 2024
@criamico criamico added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 6, 2024
@ghost
Copy link
Copy Markdown

ghost commented Mar 6, 2024

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@criamico criamico changed the title 173727 warning upgrade versions [Fleet] Display warning when trying to upgrade agent to version > max fleet server version Mar 7, 2024
@criamico
Copy link
Copy Markdown
Member Author

criamico commented Mar 8, 2024

/ci

@criamico
Copy link
Copy Markdown
Member Author

criamico commented Mar 8, 2024

@elasticmachine merge upstream

@criamico criamico marked this pull request as ready for review March 8, 2024 10:47
@criamico criamico requested a review from a team as a code owner March 8, 2024 10:47
@elasticmachine
Copy link
Copy Markdown
Contributor

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();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - let's go with a warning callout instead of an error here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@juliaElastic
Copy link
Copy Markdown
Contributor

The submit button is only disabled in the case of a single agent upgrade

Is the button disabled in the latest commits? I haven't checked locally, just noticed on the screenshot it is not disabled.

@criamico
Copy link
Copy Markdown
Member Author

criamico commented Mar 11, 2024

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.

@criamico
Copy link
Copy Markdown
Member Author

Recording:

Screen.Recording.2024-03-11.at.10.40.24.mov

Copy link
Copy Markdown
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@criamico
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 968 969 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.2MB 1.2MB +1.7KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 153.8KB 155.1KB +1.3KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @criamico

@criamico criamico merged commit f3f2315 into elastic:main Mar 11, 2024
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team v8.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fleet] Add warning in agent upgrade modal when trying to upgrade to version > max fleet server version

6 participants