Skip to content

[Fleet] Fix agent status badge when stuck upgrading #226893

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Supplementing
Copy link
Contributor

@Supplementing Supplementing commented Jul 7, 2025

Summary

Closes #5785

  • Added status badge showing 'Upgrade failed' when an agent is in failed upgrade state (UPG_FAILED), instead of continuing to show 'updating'

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

N/A

@Supplementing Supplementing requested a review from a team as a code owner July 7, 2025 20:04
@Supplementing Supplementing added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to (9.1) the previous minor version (i.e. one version back from main) v9.1.0 v9.2.0 labels Jul 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

Comment on lines 48 to +49
status: Agent['status'];
inFailedUpgradeState: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

it feels a bit odd to introduce a new prop just for this specific sub-state.. I wonder if we can just accept the agent upgrade details information like this:

Suggested change
status: Agent['status'];
inFailedUpgradeState: boolean;
status: Agent['status'];
upgradeDetails?: Agent['upgrade_details'];

and then use isAgentInFailedUpgradeState() directly in this component to derive the badge. WDYT?

then this component could show other upgrade sub-states in the future if we choose to (I see 9 of them in AgentUpgradeStateType!)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #22 / Unified Tabs Examples Managing Unified Tabs can edit tab label with keyboard events
  • [job] [logs] Fleet Cypress Tests #2 / View agents list Bulk actions should allow to bulk upgrade agents and cancel that upgrade

Metrics [docs]

Async chunks

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

id before after diff
fleet 2.1MB 2.1MB +390.0B

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.1) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants