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 debug bundle: save additional admin API requests. #15136

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

r-vasquez
Copy link
Contributor

@r-vasquez r-vasquez commented Nov 25, 2023

This PR introduces more admin API requests to the debug bundle as well as a way to add extra request for specific topic/partitions.

  • Commits a7e8b49 and a8ab323 introduce the new admin API requests.
  • Commit 1a96eda introduce the new --partition/-p flag and the new extra request if this flag is provided.

Fixes #14483

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
  • v23.2.x
  • v23.1.x
  • v22.3.x

Release Notes

Features

  • rpk debug bundle: now you can use the --partition flag to request additional debugging information to the admin API for the provided partitions.

Improvements

  • rpk: additional admin API requests are saved to the debug bundle.

This includes existing methods in our adminapi
package to the debug bundle.
@@ -204,40 +200,3 @@ func runToggle(ctx context.Context, cl *adminapi.AdminAPI, all bool, topicArg, p
}
return g.Wait()
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was moved to the out package. The toggle_test.go file was deleted and moved to in_test.go (inside out package)

@r-vasquez r-vasquez marked this pull request as ready for review November 27, 2023 18:43
twmb
twmb previously approved these changes Nov 27, 2023
Copy link
Contributor

@twmb twmb left a comment

Choose a reason for hiding this comment

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

Although it's good the new api's are added to the adminapi package, it's probably worth it to have some blind GetLeader(context, path) and GetAny(...) type of request, so that it's less work to just request arbitrary endpoints and capture the arbitrary results.

Anyway, might be good for the future but this is good now too

src/go/rpk/pkg/adminapi/api_cloud_storage.go Outdated Show resolved Hide resolved
src/go/rpk/pkg/adminapi/api_features.go Show resolved Hide resolved
src/go/rpk/pkg/cli/debug/bundle/bundle.go Show resolved Hide resolved
This introduce the ability to pass a partition
flag to `rpk debug bundle`, if passed, rpk will
save extra requests to the admin API.
@twmb twmb merged commit e56e3fd into redpanda-data:dev Nov 28, 2023
23 checks passed
@r-vasquez r-vasquez deleted the add-admin-bundle branch December 6, 2023 19:32
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.

[rpk] additional endpoints to scrape for the debug bundle
2 participants