Skip to content

Show unconsumed partitions in consumer groups#2466

Open
jvorcak wants to merge 1 commit into
masterfrom
UX-407-show-unconsumed-partitions-in-consumer-groups
Open

Show unconsumed partitions in consumer groups#2466
jvorcak wants to merge 1 commit into
masterfrom
UX-407-show-unconsumed-partitions-in-consumer-groups

Conversation

@jvorcak
Copy link
Copy Markdown
Collaborator

@jvorcak jvorcak commented May 25, 2026

No description provided.

@jvorcak jvorcak marked this pull request as draft May 25, 2026 18:20
@jvorcak jvorcak force-pushed the UX-407-show-unconsumed-partitions-in-consumer-groups branch 2 times, most recently from edebc33 to 5a3070c Compare May 25, 2026 18:58
@jvorcak jvorcak force-pushed the UX-407-show-unconsumed-partitions-in-consumer-groups branch from 5a3070c to 9a705e0 Compare May 25, 2026 19:14
@jvorcak jvorcak marked this pull request as ready for review May 25, 2026 19:19
@jvorcak jvorcak requested review from a team and c-julin May 25, 2026 19:19
@r-vasquez r-vasquez requested a review from Copilot May 25, 2026 19:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: null for partitions without committed offsets and include those partitions in partitionOffsets.
  • Frontend: render “—” for Group Offset / Lag when groupOffset is 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,
Copy link
Copy Markdown
Contributor

@r-vasquez r-vasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
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.

Instead of

groupOffset := int64(1)
...
GroupOffset: &groupOffset,

With newer Go you can do just

GroupOffset: new(int64(1)),

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.

3 participants