Show unconsumed partitions in consumer groups#2466
Open
jvorcak wants to merge 1 commit into
Open
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) => { |
Comment on lines
389
to
390
| disabledReason={cannotDeleteGroupOffsetsReason(groupProps.group, featureDeleteGroupOffsets)} | ||
| 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.
| req.NoError(err, "Should not error when one topic is deleted") | ||
|
|
||
| // Expected result: only the existing topic, with 1 partition and offset at position 1 | ||
| groupOffset := int64(1) |
Contributor
There was a problem hiding this comment.
Instead of
groupOffset := int64(1)
...
GroupOffset: &groupOffset,With newer Go you can do just
GroupOffset: new(int64(1)),
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.
No description provided.