Show unconsumed partitions in consumer groups#2466
Merged
jvorcak merged 2 commits intoMay 26, 2026
Conversation
edebc33 to
5a3070c
Compare
5a3070c to
9a705e0
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the consumer group offsets API and the consumer group details UI to surface partitions that have no committed offsets (“unconsumed” partitions), and adds automated coverage to validate the new behavior.
Changes:
- Backend: return
groupOffset: nullfor partitions without committed offsets and include those partitions inpartitionOffsets. - Frontend: render “—” for Group Offset / Lag when
groupOffsetis null, and disable per-partition edit/delete actions with a “No committed offset” tooltip. - Tests: add unit + E2E tests to validate rendering and disabled actions for unconsumed partitions.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/tests/test-variant-console/consumers/consumer-group-unconsumed-partitions.spec.ts | Adds Playwright E2E coverage for unconsumed partitions display + disabled actions. |
| frontend/src/utils/tsx-utils.tsx | Extends IconButton to support data-testid for test targeting (enabled and disabled states). |
| frontend/src/state/rest-interfaces.ts | Updates groupOffset type to number | null to represent missing commits. |
| frontend/src/components/pages/consumers/modals.tsx | Avoids copying null offsets from other groups; adapts offset lookup for nullable offsets. |
| frontend/src/components/pages/consumers/group-details.tsx | Marks unconsumed partitions, renders “—”, and disables row actions with tooltips; adjusts filtering behavior. |
| frontend/src/components/pages/consumers/group-details.test.tsx | Adds unit tests ensuring disabled/enabled edit controls and “—” rendering for unconsumed partitions. |
| backend/pkg/console/consumer_group_offsets.go | Makes groupOffset nullable and emits partition rows even when no committed offset exists. |
| backend/pkg/console/consumer_group_offsets_test.go | Updates expectations for groupOffset pointer semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
380
to
381
| disabledReason={cannotEditGroupReason(groupProps.group, featurePatchGroup)} | ||
| onClick={(e) => { |
|
|
||
| const partitions = groupProps.onlyShowPartitionsWithLag ? g.partitions.filter((e) => e.lag !== 0) : g.partitions; | ||
| const partitions = groupProps.onlyShowPartitionsWithLag | ||
| ? g.partitions.filter((e) => e.lag !== 0 || e.isUnconsumed) |
Comment on lines
+557
to
+561
| .filter((p) => p.groupOffset !== null) | ||
| .flatMap((p) => ({ | ||
| topicName: x.topic, | ||
| partitionId: p.partitionId, | ||
| offset: p.groupOffset as number, |
r-vasquez
approved these changes
May 25, 2026
Contributor
r-vasquez
left a comment
There was a problem hiding this comment.
LGTM, just one non-blocking minor nit. Also, if possible, let's add more context on why to the commit body or PR description please.
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.
Summary
Previously, consumer group details only showed partitions that had a committed offset.
This PR extends the backend and frontend so all partitions are visible — including those
that have never been consumed or whose offset was deleted.
Backend
PartitionOffsets.GroupOffsetchanged fromint64to*int64—nilsignals no committed offsetcontinue)Frontend
GroupPartitionOffset.groupOffsettyped asnumber | null—for Group Offset and Lag columnsonEditOffsets/onDeleteOffsetsat topic level only receive consumed partitions, preventing crashes in downstream modal handlersonlyShowPartitionsWithLag) updated to explicitly include unconsumed partitions rather than relying onnull !== 0cannotEditGroupReason/cannotDeleteGroupOffsetsReasonaccept an optionalconsumedPartitionsarray and own the "No committed offsets" check, removing inline ternaries at call sitesTests
group-details.test.tsx) covers: edit button enabled/disabled state,—rendering for unconsumed partitionsconsumer-group-unconsumed-partitions.spec.ts) covers the full flow: produce messages, consume partially, delete an offset, verify all 3 partitions appear with correct values and button states