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

api: Add gRPC status proto definition #10631

Closed
wants to merge 3 commits into from

Conversation

tonya11en
Copy link
Member

Adds a gRPC status proto definition, analogous to the HTTP status found in http_status.proto. Currently, this proto is not in use, but is needed for #9658.

Risk Level: Low
Testing: n/a
Docs Changes: Proto documented
Release Notes: n/a

Signed-off-by: Tony Allen <tony@allen.gg>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #10631 was opened by tonya11en.

see: more, trace.

@mattklein123 mattklein123 self-assigned this Apr 2, 2020
@@ -0,0 +1,40 @@
syntax = "proto3";
Copy link
Member

Choose a reason for hiding this comment

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

Where is this used or planned to be used?

Copy link
Member

Choose a reason for hiding this comment

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

See the linked PR in the description.

// GRPC status.
message GrpcStatus {
// Supplies GRPC response code.
Status status = 1 [(validate.rules).enum = {defined_only: true not_in: 0}];
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean that it can't be OK?

Copy link
Member

Choose a reason for hiding this comment

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

I had the same question/comment in the other PR.

option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.type.grpc.v3";

// [#protodoc-title: GRPC status codes]
Copy link
Member

Choose a reason for hiding this comment

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

Nit: s/GRPC/gRPC/ everywhere

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

I'm actually not sure we need this PR at all if we switch to expressing the status as an int as @lizan suggested in the other PR?

/wait

// [#protodoc-title: GRPC status codes]

// GRPC response codes supported.
enum Status {
Copy link
Member

Choose a reason for hiding this comment

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

See @lizan comment in the other PR about not using an enum for this.

// GRPC status.
message GrpcStatus {
// Supplies GRPC response code.
Status status = 1 [(validate.rules).enum = {defined_only: true not_in: 0}];
Copy link
Member

Choose a reason for hiding this comment

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

I had the same question/comment in the other PR.

@@ -0,0 +1,40 @@
syntax = "proto3";
Copy link
Member

Choose a reason for hiding this comment

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

See the linked PR in the description.

@tonya11en
Copy link
Member Author

@mattklein123 I'm more than happy to drop this PR in favor of just using an integer, but my only concern would be readability of the configurations.

I'm fine either way, so feel free to just close this out if you'd prefer the integer specification.

Signed-off-by: Tony Allen <tony@allen.gg>
Signed-off-by: Tony Allen <tony@allen.gg>
@mattklein123
Copy link
Member

I'm fine either way, so feel free to just close this out if you'd prefer the integer specification.

My feeling is that we should use an integer per @lizan and just clearly document what the integer means with a link/reference to the code mappings. So yeah I will close.

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.

3 participants