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

Feature: Debug Bundle #1493

Merged
merged 92 commits into from
Nov 6, 2024
Merged

Feature: Debug Bundle #1493

merged 92 commits into from
Nov 6, 2024

Conversation

bojand
Copy link
Member

@bojand bojand commented Nov 4, 2024

Adds the proto types and service definitions for debug bundle feature.
Adds frontend implementation.

jvorcak and others added 30 commits September 6, 2024 11:55
proto: broker_ids -> broker_id
proto: remove required from label selector param
@bojand bojand requested review from jvorcak and weeco November 4, 2024 01:19
Copy link

github-actions bot commented Nov 4, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / push-module (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedNov 5, 2024, 8:25 PM

Comment on lines -3 to -7
- buf.build/envoyproxy/protoc-gen-validate:dfcdc5ea103dda467963fb7079e4df28debcfd28
- buf.build/grpc-ecosystem/grpc-gateway:a1ecdc58eccd49aa8bea2a7a9022dc27
- buf.build/googleapis/googleapis
- buf.build/bufbuild/protovalidate
- buf.build/redpandadata/common
Copy link
Contributor

Choose a reason for hiding this comment

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

Why can we remove these dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

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

they were not being used in any of the protos

proto/redpanda/api/console/v1alpha1/debug_bundle.proto Outdated Show resolved Hide resolved
proto/redpanda/api/console/v1alpha1/debug_bundle.proto Outdated Show resolved Hide resolved
Comment on lines 289 to 290
// leaderless partitions. example values:
map<string, PartitionIDList> leaderless_partitions = 8;
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume the string refers to the topic name. I'm wondering whether an own type has better semantics:

message TopicPartitions {
  string topic_name = 1;
  repeated int32 partition_ids = 2;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

@jvorcak and I had a discussion about the structure of this property and landed on this approach. I think it may be convenient for frontend to be able to just iterate on topic names and have the full list. I don't really have a strong opinion. @jvorcak if this structure is Ok with you I can change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine for me to keep then, but for a public API eventually - I think we should change it to a separate type

Copy link
Collaborator

Choose a reason for hiding this comment

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

The current structure is convenient for the frontend, but what @weeco suggest is also doable. If we can get consistent with the public API later, I'm ok with changing the FE for this purpose. It's up to you.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have changed the type to represent the suggestion.

proto/redpanda/api/console/v1alpha1/debug_bundle.proto Outdated Show resolved Hide resolved
bool is_healthy = 1;

repeated UnhealthyReason unhealthy_reasons = 2;
int32 controller_id = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in some scenarios it's possible to have no controller in a cluster. Wondering whether we want to make it an optional or report a negative number. Maybe worth to check what franz-go does and if we choose to report a negative number in that case we should document it here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Admin API return -1 if leader is not elected. I changed the property to be optional.

@weeco weeco self-requested a review November 5, 2024 20:09
@@ -83,43 +125,89 @@ message DebugBundleStatus {
// Path in API to get the file.
string filename = 5;

// Size of the debug bundle zip file.
int64 size = 6;
Copy link
Contributor

Choose a reason for hiding this comment

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

You already used the _bytes suffix above:

controller_logs_size_limit_bytes

I think that's missing here. AIP-141 says:

Quantities with a clear unit of measurement (such as bytes, miles, and so on) must include the unit of measurement as the suffix.

@weeco weeco self-requested a review November 5, 2024 20:15
@bojand bojand merged commit e03e5c4 into master Nov 6, 2024
9 checks passed
@bojand bojand deleted the feature/debug-bundle branch November 6, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants