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

fix: do not return repeated directly #1605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions backend/pkg/protogen/redpanda/api/dataplane/v1alpha2/topic.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions proto/redpanda/api/dataplane/v1alpha2/topic.proto
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,7 @@ service TopicService {
};
}
rpc GetTopicConfigurations(GetTopicConfigurationsRequest) returns (GetTopicConfigurationsResponse) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we also need to rename this from Get to List accordingly @sago2k8 @bojand . One could argue for both cases. It could be argued as one resource (the configuration of a topic which happens to have several properties) or a list of resources (configurations for topics)

Copy link
Member

Choose a reason for hiding this comment

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

Good observation. Maybe ListTopicConfigurations() is a better choice. Agree it kinda depends on how you look at it. But I do not feel strongly about it.

option (google.api.http) = {
get: "/v1alpha2/topics/{topic_name}/configurations"
response_body: "configurations"
};
option (google.api.http) = {get: "/v1alpha2/topics/{topic_name}/configurations"};
Copy link
Contributor

@weeco weeco Feb 3, 2025

Choose a reason for hiding this comment

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

Should we do it, despite knowing the number of entries is very limited and will never exceed an unreasonable number that couldn't be retrieved in one go? The AIP-132 seems to suggest that. I guess we'll follow then

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Get Topic Configurations"
description: "Get key-value configs for a topic."
Expand Down Expand Up @@ -323,7 +320,6 @@ service TopicService {
option (google.api.http) = {
patch: "/v1alpha2/topics/{topic_name}/configurations"
body: "configurations"
response_body: "configurations"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Update Topic Configuration"
Expand Down Expand Up @@ -352,7 +348,6 @@ service TopicService {
option (google.api.http) = {
put: "/v1alpha2/topics/{topic_name}/configurations"
body: "configurations"
response_body: "configurations"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Set Topic Configurations"
Expand Down
Loading