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

http rule's response_body support to stream rpc #1206

Closed
wants to merge 616 commits into from

Conversation

adasari
Copy link
Contributor

@adasari adasari commented Apr 9, 2020

The changes regarding #1202.

what is changed ?

  1. Added response body changes for runtime/handler.go and test cases
  2. template.go
  3. stream rpc with response body http rule field example and integration tests
  4. Existing test cases are failing in local due to port busy issue. changed the port of test cases so that it never fail.
  5. auto generated files from bazel sync

Please review. thanks.

drigz and others added 30 commits November 8, 2018 22:58
buildifier autoformats the files to give a consistent style. This makes
edits easier for contributors that have their editor set to
autoformat-on-save.

buildifier has been added to the Bazel workspace so that the same
version can be used by contributors and CI. You can run `bazel run
:buildifier_check` to check for necessary changes and `bazel run
:buildifier` to apply them.

`bazel test //...` also builds all targets. These changes should make
the CI steps run a little faster.
* Update rules_go and gazelle

This requires/allows the following changes:
- rerun Gazelle to regenerate the build files
- fix marshal_jsonpb_test to assert correct behavior when
  EnumsAsInts == false
- remove `repositories.bzl` (replaced by @go_googleapis)

Also, enforce up-to-date build files in the CI check.

Note: this version of the commit includes an out-of-date BUILD file to
test the CI check.

* Update Gopkg.toml and Gopkg.lock

* Update generated proto code

The generated code changed with the updated dependencies.

* Fix node_test

Enum values inside maps are now supported.
* Make Bazel CI failures clearer

- don't try to run tests if the BUILD files are out-of-date
- run buildifier even if the tests fail, as it may still be useful
- use a parameter to hold Bazel config to simplify config.yml
- ignore the vendor/ directory when running Gazelle
  (otherwise it will fail if you've used `dep` to create vendor/)

* Add Bazel invocation to CONTRIBUTING.md
…-ecosystem#813)

* Revert "Adding support for more well known types in descriptor (grpc-ecosystem#809)"

This reverts commit 1659831.
* Added support for more WKT

* Lint fix: added comments on exported functions

* Lint fix: added comments on exported functions

* Added end to end example to show support of StringValue in url option template

* updated more example protos; removed server and proxy for now

* Updated convert.go to fix float and other wkt

* brazel build fix
* Updated Patch behavior

* Patch update with regenerated BUILD files

* Added documentation for PATCH usage

* Added some curl examples for PATCH
This allows other projects to generate proto code for other
languages, e.g. py_proto_library
- swaggerSchemaObject.Properties is now optional (pointer), because
  google.protobuf.Empty requires us to set Properties{} instead of nil, because
  this equals in Swagger to an empty JSON object (which is exactly what Empty
  represents and how the gateway treats it). If it's not a pointer, we can't
  distinguish between "not set" (in most cases, we don't want Properties to be
  set, instead usually just .Ref is set), and "set to an empty value e.g.
  Properties{} with length 0). We don't want Properties{} to occur except for
  specific cases, e.g. for Empty.
- Wrappers and Empty are not rendered as definitions, now also for RPC Method
  input/output. instead, all necessary schema information is provided "in-line"
  via schema.type and schema.properties.
- Empty is now omitted as well if it's input/output of a RPC Method.
Signed-off-by: Sam Batschelet <[email protected]>
rowe0x and others added 11 commits March 25, 2020 08:41
* feat: add enumAsInts flag

* Update protoc-gen-swagger/genswagger/template.go

Co-Authored-By: Johan Brandhorst <[email protected]>

* fix: typo

* feat: add comment

* feat: add test

Co-authored-by: Johan Brandhorst <[email protected]>
* Add message as another argument for supporting deep level reserved json name

* Get reserved json name in non direct field of a grpc method

* Change variable names based on google naming policy

* Change variable names based on google naming policy in test

* Reuse variable value

* Format code

* Update test names

* Add doCamelCase and one more test case

* Correct a comment in test

* Keep all prefix in camel case

* Use regular for loop instead of foreach to avoid unnecessary slicing

* Update protoc-gen-swagger/genswagger/template_test.go

Co-Authored-By: Johan Brandhorst <[email protected]>

* Add space in comments

* Remove a unnecessary comment

Co-authored-by: Johan Brandhorst <[email protected]>
* OperationId includes service name

* Re-generate and fix tests
Lets use HOST_RAM*0.5. Hopefully helps a bit with the flakiness.
@adasari
Copy link
Contributor Author

adasari commented Apr 9, 2020

pipe line error says.

Use --sandbox_debug to see verbose messages from the sandbox
ERROR: /src/grpc-gateway/protoc-gen-swagger/options/BUILD.bazel:34:1 C++ compilation of rule '@com_google_protobuf//:protoc_lib' failed (Killed): clang failed: error executing command /usr/local/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 39 argument(s) skipped)

not sure what is causing the issue. any help ? @johanbrandhorst

@adasari adasari changed the title Stream responsebody http rule's response_body support to stream rpc Apr 9, 2020
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@adasari adasari force-pushed the stream-responsebody branch from 1e49543 to 1f14d33 Compare April 13, 2020 16:31
@adasari
Copy link
Contributor Author

adasari commented Apr 13, 2020

seems branch is messed up. hence closing the pull request.

@adasari adasari closed this Apr 13, 2020
@adasari adasari reopened this Apr 13, 2020
@adasari adasari closed this Apr 13, 2020
@adasari adasari deleted the stream-responsebody branch April 13, 2020 19:20
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.