Skip to content

Incompatible Indices Bulk Actions - #26827

Open
gally47 wants to merge 10 commits into
masterfrom
incompatible-indices-bulk-actions
Open

Incompatible Indices Bulk Actions#26827
gally47 wants to merge 10 commits into
masterfrom
incompatible-indices-bulk-actions

Conversation

@gally47

@gally47 gally47 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

/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):

Screenshot 2026-07-30 at 17 38 30

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@gally47
gally47 requested a review from Copilot July 30, 2026 15:39

Copilot AI left a comment

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants