Skip to content
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]: 1 count less is visible under Bulk actions when Upgrade available and Select everything on all pages filters are selected. #159976

Open
amolnater-qasource opened this issue Jun 20, 2023 · 6 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. QA:Ready for Testing Code is merged and ready for QA to validate Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@amolnater-qasource
Copy link

Kibana Build details:

VERSION: 8.9.0 Snapshot
BUILD: 64199
COMMIT: c131f41fd4180429bfee6a9ce857dd8e3f093d94

Host OS and Browser version: All, All

Preconditions:

  1. 8.9.0 SNAPSHOT Kibana cloud environment should be available.
  2. 100-105 horde agents should be installed.

Steps to reproduce:

  1. Navigate to Fleet>Agents tab.
  2. Select Upgrade available and Select everything on all pages filters.
  3. Click bulk actions, observe 1 count less than actual count is visible.
  4. Trigger upgrade to any version and observe all the agents including hosted fleet server count is visible under Agent activity.

Expected:
Accurate count should be visible under Bulk actions when Select everything on all pages and Upgrade available filter is selected.

Note:

  • Select everything on all pages is even selecting Hosted fleet server when Upgrade available filter is applied.
  • Hosted fleet server is of latest version and not part of the Upgrade available.

Screen Recording:

Agents.-.Fleet.-.Elastic.-.Google.Chrome.2023-06-20.11-58-52.mp4
@amolnater-qasource amolnater-qasource added bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Fleet Team label for Observability Data Collection Fleet team labels Jun 20, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@amolnater-qasource
Copy link
Author

@manishgupta-qasource Please review.

@manishgupta-qasource
Copy link

Secondary review for this ticket is Done

@juliaElastic
Copy link
Contributor

I think this is the same issue as #145094, related to "Upgrade available" feature.

@juliaElastic
Copy link
Contributor

Closing a duplicate of #145094

@jillguyonnet
Copy link
Contributor

Reopening this as this is bug has persisted after #177035 was merged and backported.

This should be a quick fix: the agent count used in the Actions menu is calculated as:

const agentCount =
selectionMode === 'manual'
? selectedAgents.length
: nAgentsInTable - totalManagedAgentIds?.length;

The issue arises in bulk selection mode when managed agents are filtered out.

Steps to reproduce:

  1. Have a mix of healthy and inactive agents (at least 6 inactive agents) + one healthy fleet server (managed unselectable agent).
  2. Change status filter to only include inactive agents.
  3. Change pagination to 5 rows per page: you should have at least 2 pages.
  4. Select everything on all pages: the agent count in the Actions menu will be 1 less than it should be. It should, however, correctly apply actions to all agents.

Suggested fix: totalManagedAgentIds should respect filtering:

const allManagedAgents = response.data?.items ?? [];
const allManagedAgentIds = allManagedAgents?.map((agent) => agent.id);
setTotalManagedAgentIds(allManagedAgentIds);

@jillguyonnet jillguyonnet reopened this Mar 26, 2024
@jillguyonnet jillguyonnet self-assigned this Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. QA:Ready for Testing Code is merged and ready for QA to validate Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

No branches or pull requests

5 participants