Skip to content

Reflect excluded streams in the Streams page archiving indicator - #26974

Open
patrickmann wants to merge 4 commits into
masterfrom
fix/14996-archiving-excluded-streams
Open

Reflect excluded streams in the Streams page archiving indicator#26974
patrickmann wants to merge 4 commits into
masterfrom
fix/14996-archiving-excluded-streams

Conversation

@patrickmann

@patrickmann patrickmann commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

/prd Graylog2/graylog-plugin-enterprise#15196

What

Make the "Archiving is enabled" indicator on the Streams overview and stream details pages reflect the archive plugin's excluded-streams list, not just the index set's retention strategy.

Why

The indicator was computed purely from the stream's index set (archive retention strategy, or data-tiering archive_before_deletion). It never consulted the archive plugin's excluded_streams list, so a stream excluded under Archive > Configuration > Streams to archive still showed as "Archiving is enabled". Reported in Graylog2/graylog-plugin-enterprise#14996.

How

  • Add useExcludedArchiveStreams, which reads the excluded list through a new archive plugin-store export. In open source (no archive plugin) it returns an empty list via a stable no-op fallback, so the hook is always called and rules-of-hooks is satisfied. Archiving is never enabled without the enterprise plugin anyway.
  • Treat a stream as archived only when its index set archives and the stream is not in excluded_streams, in both ArchivingsCell (overview) and DestinationIndexSetSection (details). The details change also correctly gates the Data Lake warning, which keys off the same flag.
  • Add the PluginArchive type to @types/graylog-web-plugin.

Details

The enterprise side that provides the export is Graylog2/graylog-plugin-enterprise#15196. This PR degrades gracefully without it (indicator keeps its previous, index-set-only behavior), so there is no hard merge-order dependency.

How tested

yarn test for ArchivingsCell.test.tsx (5 cases, incl. the excluded-stream regression) and useExcludedArchiveStreams.test.ts (2 cases) — all green.

Manual:

  1. Enterprise installed, an index set using the Archive retention strategy (or data tiering with archive-before-delete), and a stream on that index set.
  2. Streams page: the stream shows "Archiving is enabled".
  3. Archive > Configuration > Streams to archive: uncheck that stream (adds it to excluded_streams).
  4. Streams page: the indicator now clears; the stream details Index Set section shows "Archiving is disabled".
  5. Re-check it: the indicator returns.
  6. Default stream: when the default index set archives, the default stream now shows the indicator too (previously always hidden); excluding it clears it.

Related

  • Graylog2/graylog-plugin-enterprise#14996
  • Graylog2/graylog-plugin-enterprise#15196 (enterprise counterpart)

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.

patrickmann and others added 3 commits August 13, 2026 13:46
The "Archiving is enabled" indicator on the Streams overview and stream
details pages was computed only from the stream's index set retention
strategy (archive retention strategy or data tiering archive-before-delete).
It never consulted the archive plugin's excluded_streams list, so a stream
excluded under Archive > Configuration > Streams to archive still showed as
archiving enabled.

Add a useExcludedArchiveStreams hook that reads the excluded list through the
enterprise "archive" plugin-store export (with a no-op fallback for open
source, where archiving is never enabled anyway) and treat a stream as
archived only when its index set archives AND the stream is not excluded.

Related: Graylog2/graylog-plugin-enterprise#14996

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Align with the customization plugin's plugin-store hook pattern: read the
enterprise export through usePluginEntities('archive') and the nested
`hooks` key, rather than raw PluginStore.exports.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ArchivingsCell copied the `is_default || !is_editable` guard from the sibling
action cells (outputs, pipelines, rules), which hid the archiving indicator
for the default stream even though it writes to the default index set and is
archived like any other stream. Archiving is a read-only status, not an
editable action, so drop the guard and let the archiving state (index set
archives AND stream not excluded) decide on its own.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@patrickmann
patrickmann marked this pull request as ready for review August 13, 2026 14:05
@patrickmann
patrickmann requested a review from a team August 13, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant