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 ListAllComputeTemplates proto comments #407

Merged
merged 2 commits into from
Jul 25, 2022
Merged
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
4 changes: 2 additions & 2 deletions apiserver/pkg/manager/resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (r *ResourceManager) ListComputeTemplates(ctx context.Context, namespace st
client := r.getKubernetesConfigMapClient(namespace)
configMapList, err := client.List(ctx, metav1.ListOptions{LabelSelector: "ray.io/config-type=compute-template"})
if err != nil {
return nil, util.Wrap(err, "List compute runtimes failed")
return nil, util.Wrap(err, "List compute templates failed")
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice catch. We use template to replace original runtime. This comes from previous code and we forgot to update them.

}

var result []*v1.ConfigMap
Expand Down Expand Up @@ -282,7 +282,7 @@ func getComputeTemplateByName(ctx context.Context, client clientv1.ConfigMapInte
runtime, err := client.Get(ctx, name, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
return nil, util.NewNotFoundError(err, "Cluster %s not found", name)
return nil, util.NewNotFoundError(err, "Compute template %s not found", name)
}

return nil, util.Wrap(err, "Get compute template failed")
Expand Down
2 changes: 1 addition & 1 deletion docs/design/protobuf-grpc-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ service ComputeTemplateService {
};
}

// Finds all compute templates in a given namespace. Supports pagination, and sorting on certain fields.
// Finds all compute templates in all namespaces. Supports pagination, and sorting on certain fields.
rpc ListAllComputeTemplates(ListAllComputeTemplatesRequest) returns (ListAllComputeTemplatesResponse) {
option (google.api.http) = {
get: "/apis/v1alpha2/compute_templates"
Expand Down
2 changes: 1 addition & 1 deletion proto/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ service ComputeTemplateService {
};
}

// Finds all compute templates in a given namespace. Supports pagination, and sorting on certain fields.
// Finds all compute templates in all namespaces. Supports pagination, and sorting on certain fields.
rpc ListAllComputeTemplates(ListAllComputeTemplatesRequest) returns (ListAllComputeTemplatesResponse) {
option (google.api.http) = {
get: "/apis/v1alpha2/compute_templates"
Expand Down
4 changes: 2 additions & 2 deletions proto/go_client/config_grpc.pb.go

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

2 changes: 1 addition & 1 deletion proto/swagger/config.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"paths": {
"/apis/v1alpha2/compute_templates": {
"get": {
"summary": "Finds all compute templates in a given namespace. Supports pagination, and sorting on certain fields.",
"summary": "Finds all compute templates in all namespaces. Supports pagination, and sorting on certain fields.",
"operationId": "ComputeTemplateService_ListAllComputeTemplates",
"responses": {
"200": {
Expand Down