Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpk: group describe supporting regex #19839

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

daisukebe
Copy link
Contributor

Motivation explained in #17710

when redpanda admins/support want to get a description of all consumer groups...
the drill is a  "for i in " loop based on "rpk group list" ..
which runs
rpk group describe $i
on each group

We should have the ability to get the group description in a single rpk group command

I lean towards supporting regex in the describe command as topic describe does. As group describe already accepts more than one group in one command, I feel it is natural to support regex too.

Fixes #17710

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.1.x
  • v23.3.x
  • v23.2.x

Release Notes

Improvements

  • rpk: group describe supports --regex flag

Copy link
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 2 requests but thanks for doing this!

src/go/rpk/pkg/cli/group/describe.go Outdated Show resolved Hide resolved
src/go/rpk/pkg/cli/group/describe.go Outdated Show resolved Hide resolved
@daisukebe daisukebe force-pushed the rpk-describe-group-regex branch from 7024d9f to 7f38f6f Compare June 14, 2024 03:47
@daisukebe
Copy link
Contributor Author

Based on @r-vasquez 's feedback, made some changes below and rebased.

  • moved examples to the cobra.Command's Example field
  • made the regex function universal under the utils package, regex_filter.go
  • removed the regex logic from topic/utils.go
  • moved the test code from topic/utils_test.go to utils/regex_filter_test.go

r-vasquez
r-vasquez previously approved these changes Jun 14, 2024
Copy link
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.

This is awesome, thanks!

@daisukebe daisukebe force-pushed the rpk-describe-group-regex branch from 9e03d6a to 071cb3f Compare June 15, 2024 03:20
@daisukebe daisukebe requested review from r-vasquez and micheleRP June 15, 2024 14:56
@daisukebe
Copy link
Contributor Author

/ci-repeat 3

@daisukebe
Copy link
Contributor Author

@r-vasquez , is the build failure relevant?

@r-vasquez
Copy link
Contributor

r-vasquez commented Jun 19, 2024

@daisukebe They were unrelated failures, not sure why the bot didn't retry (I did it manually). Merging it now, thanks

@r-vasquez r-vasquez merged commit 74b4cfe into redpanda-data:dev Jun 19, 2024
22 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v24.1.x

@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add a "detail" option for "rpk group list"
4 participants