Incompatible Indices Bulk Actions - #26827
Open
gally47 wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds bulk-action support and refactors state management for the OpenSearch upgrade “Incompatible indices” UI in graylog2-web-interface/, including new bulk endpoints usage (delete/reindex/rotate) and shared action state via React context. It also updates archive plugin bindings to support bulk archive+delete and avoids extending the user session for background/polling requests.
Changes:
- Introduces bulk actions for incompatible indices (bulk delete, bulk reindex for system indices, bulk rotate for write indices, and bulk archive+delete for managed indices).
- Refactors incompatible-indices action state into
IncompatibleIndicesContext+ new hooks (useIncompatibleIndexActionState,useTrackedIncompatibleIndices) and updates renderers/actions to consume context. - Opts out of session extension for outdated/incompatible indices queries by passing
{ requestShouldExtendSession: false }.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
graylog2-web-interface/src/components/indices/hooks/useIncompatibleIndices.ts |
Avoid session extension when polling incompatible indices. |
graylog2-web-interface/src/components/indices/hooks/useCanArchive.test.ts |
Updates archive plugin mock to match new binding shape/return values. |
graylog2-web-interface/src/components/indices/archive/types.ts |
Extends archive binding with bulk archive+delete and makes systemJobId required. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndicesTable.tsx |
Refactors table to use context + new hooks and simplifies action rendering. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndicesTable.test.tsx |
Updates tests for context-based column rendering and request options. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndicesContext.tsx |
Adds shared context for incompatible-index action state. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndicesColumnRenderers.tsx |
Moves archived/status logic into a context-driven cell component. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndicesBulkActions.tsx |
Implements new bulk actions (delete/reindex/rotate/archive+delete) and telemetry wiring. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndicesBulkActions.test.tsx |
Adds coverage for new bulk actions and partial-success behaviors. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/IncompatibleIndexTableActions.tsx |
Updates per-row actions to use context and adds reindex pending indicator. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/incompatibleIndexActions.tsx |
Updates action definitions and archived detection helper for new flow. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/useTrackedIncompatibleIndices.ts |
New hook to persist selection/tracked indices across pagination and refreshes. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/useTrackedIncompatibleIndices.test.ts |
Tests for cross-page selection persistence and edge cases. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/usePendingIncompatibleIndexActions.ts |
Adds reindex tracking, storage-read hardening, and updated polling enablement. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/usePendingIncompatibleIndexActions.test.ts |
Tests storage-blocked reads and off-page action tracking/polling. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/useIncompatibleIndexActionState.ts |
New hook that composes archive eligibility, archived names, pending statuses, and refetching into context value. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/useIncompatibleIndexActionState.test.ts |
Tests composed hook behavior and archive availability gating. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/hooks/useArchivedIndexNames.test.ts |
Updates plugin mock to match new archive binding shape/return values. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/fetchIncompatibleIndices.ts |
Passes { requestShouldExtendSession: false } to the paginated outdated-indices API. |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/constants.ts |
Removes bulk concurrency constant (bulk is now via backend endpoints). |
graylog2-web-interface/src/components/datanode/opensearch-upgrade/bulkIndexActions.ts |
Reworks bulk candidate selection, adds rotate/archive-delete candidates, and factors partial-result notifications. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/nocl
/prd https://github.com/Graylog2/graylog-plugin-enterprise/pull/15034
Motivation and Context
fixes https://github.com/Graylog2/graylog-plugin-enterprise/issues/14608
and fixes https://github.com/Graylog2/graylog-plugin-enterprise/issues/14972
Screenshots (if appropriate):
Types of changes
Checklist: