-
Notifications
You must be signed in to change notification settings - Fork 8
PMM-14325 HA info inventory #862
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
base: v3
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds High Availability (HA) information to the Node inventory feature by integrating HA status, node roles, and filtering capabilities. The changes enable users to view which nodes are part of the HA cluster and their current roles (leader/follower).
Key changes:
- Introduced HA service layer with API endpoints for status and node information
- Added Redux state management for HA data with async thunks
- Enhanced Node inventory UI to display HA roles and provide PMM server filtering
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| public/app/percona/shared/services/nodes/Nodes.types.ts | Added is_pmm_server_node field to NodePayload interface |
| public/app/percona/shared/services/highAvailability/mocks/HighAvailability.service.ts | Created mock service for HA with test data for various HA states |
| public/app/percona/shared/services/highAvailability/HighAvailability.types.ts | Defined TypeScript types for HA status, node roles, and responses |
| public/app/percona/shared/services/highAvailability/HighAvailability.service.ts | Implemented service to fetch HA status and nodes from API |
| public/app/percona/shared/core/selectors.ts | Added selector for accessing HA state from Redux store |
| public/app/percona/shared/core/reducers/nodes/nodes.utils.ts | Updated node mapper to include isPmmServerNode field |
| public/app/percona/shared/core/reducers/index.ts | Registered HA reducer in the Redux store |
| public/app/percona/shared/core/reducers/highAvailability/highAvailability.types.ts | Defined HA state interface for Redux |
| public/app/percona/shared/core/reducers/highAvailability/highAvailability.ts | Created HA reducer with async thunks for fetching status and nodes |
| public/app/percona/shared/components/PerconaBootstrapper/PerconaBootstrapper.tsx | Added HA status fetch during application bootstrap |
| public/app/percona/shared/components/Elements/Table/Filter/Filter.tsx | Enhanced filter layout to support 3-column grid when applicable |
| public/app/percona/shared/components/Elements/Table/Filter/Filter.styles.ts | Added styling for 3-column filter layout |
| public/app/percona/shared/components/Elements/Table/Filter/Filter.constants.ts | Added constants for boolean filter labels and values |
| public/app/percona/inventory/mocks/Inventory.service.ts | Updated mock nodes to include is_pmm_server_node field |
| public/app/percona/inventory/Tabs/Nodes.utils.ts | Added utilities to map nodes with HA data and format HA role badges |
| public/app/percona/inventory/Tabs/Nodes.types.ts | Defined InventoryNode type extending Node with HA fields |
| public/app/percona/inventory/Tabs/Nodes.tsx | Integrated HA role display and PMM server filtering in nodes table |
| public/app/percona/inventory/Inventory.types.ts | Added isPmmServerNode to Node and NodeDB interfaces |
| public/app/percona/inventory/Inventory.constants.ts | Added cancel token constant for HA nodes fetch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| })); | ||
| builder.addCase(fetchHighAvailabilityNodes.fulfilled, (state, action) => ({ | ||
| ...state, | ||
| nodes: action.payload.nodes, |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isLoading state is not reset to false when fetchHighAvailabilityNodes.fulfilled completes. This will leave the loading indicator active indefinitely. Add isLoading: false to the returned state.
| nodes: action.payload.nodes, | |
| nodes: action.payload.nodes, | |
| isLoading: false, |
| ...((isHighAvailabilityEnabled | ||
| ? [ | ||
| { | ||
| Header: 'Node Filter', |
Copilot
AI
Dec 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header 'Node Filter' is not user-facing since this column is hidden, but it's unclear what filtering is being applied. Consider renaming to something more descriptive like 'PMM Server Node Filter' to better indicate its purpose.
| Header: 'Node Filter', | |
| Header: 'PMM Server Node Filter', |
Provide information and filtering for HA in Node inventory.
PMM-14325