Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/gax-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.9.0
Choose a base ref
...
head repository: googleapis/gax-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.10.0
Choose a head ref
  • 6 commits
  • 52 files changed
  • 5 contributors

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    25433da View commit details
    Browse the repository at this point in the history
  2. chore(main): release 2.9.1-SNAPSHOT (#1604)

    Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
    release-please[bot] authored Jan 19, 2022
    Configuration menu
    Copy the full SHA
    f631a25 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2022

  1. feat: add api key support (#1436)

    * feat: add api key support
    
    * Update gax/src/test/java/com/google/api/gax/rpc/ClientContextTest.java
    
    Co-authored-by: Chanseok Oh <chanseok@google.com>
    
    * Update gax/src/test/java/com/google/api/gax/rpc/ClientContextTest.java
    
    Co-authored-by: Chanseok Oh <chanseok@google.com>
    
    * update
    
    * update
    
    * Update gax/src/test/java/com/google/api/gax/rpc/ClientContextTest.java
    
    Co-authored-by: Chanseok Oh <chanseok@google.com>
    
    * Update gax/src/test/java/com/google/api/gax/rpc/ClientContextTest.java
    
    Co-authored-by: Chanseok Oh <chanseok@google.com>
    
    Co-authored-by: Chanseok Oh <chanseok@google.com>
    arithmetic1728 and chanseokoh authored Jan 20, 2022
    Configuration menu
    Copy the full SHA
    5081ec6 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2022

  1. feat: introduce HttpJsonClientCall, Listeners infrastructure and Serv…

    …erStreaming support in REST transport (#1599)
    
    This includes the following changes for `HTTP1.1/REST` transport:
    1) `HttpJsonClientCall` class (with `HttpJsonClientCall.Listener`) mimicking [io.grpc.ClientCall](https://github.com/grpc/grpc-java/blob/master/api/src/main/java/io/grpc/ClientCall.java#L102) functionality. Most of the complexity of this PR is concentrated in `HttpJsonClientCallImpl` class.
    2) The unary callables are rewritten to be based on `HttpJsonClientCall` flow (similarly to how it is already done in gRPC unary calls).
    3) Server streaming support for REST transport. The implementation is based on `HttpJsonClientCall` and `HttpJsonClientCall.Listener` (introduced in this PR), similarly to how gRPC streaming is based on `io.grpc.ClientCall` and `io.grpc.ClientCall.Listener` (implemented in [grpc-java](https://github.com/grpc/grpc-java/) library) respectively.
    
    The extreme similarity between `HttpJsonClientCall` call and `io.grpc.ClientCall` is intentional and crucial for consistency of the two transports and also intends simplifying creation and maintenance of multi-transport manual wrappers (like [google-ads-java](https://github.com/googleads/google-ads-java)).
    
    The server streaming abstractions in gax java are all based on the flow control managed by a ClientCall, so having similar set of abstractions in REST transport is necessary to reuse transport-independent portions of streaming logic in gax and maintain identical user-facing streaming surface.
    
    This PR also builds a foundation for the soon-coming [ClientInterceptor](https://github.com/grpc/grpc-java/blob/master/api/src/main/java/io/grpc/ClientInterceptor.java#L42)-like infrastructure in REST transport. This is specifically required to support REST transport in [google-ads-java](https://github.com/googleads/google-ads-java/blob/main/google-ads/src/main/java/com/google/ads/googleads/lib/logging/LoggingInterceptor.java#L42).
    
    REST-based client-side streaming and bidirectional streaming is not implemented by this PR and most likely will never be due to limitations of the `HTTP1.1/REST` protocol compared to `HTTP2/gRPC`.
    
    Most of the java docs in `HttpJsonClientCall` class is a modified version of the java docs from `io.grpc.ClientCall`, which is intentional, because `HttpJsonClientCall` is designed to be as similar to `io.grpc.ClientCall` in both surface and behavior as possible (while the two classes cannot be a part of the same class hierarchy, because they belong to two independent transport layers).
    
    **What server-streaming means in case of REST transport** 
    In REST transport server-streaming methods return a JSON array of response messages (i.e. the array element type is the same one used as a returned type in the corresponding method definition in protobuf). The response is provided as as [Chunck-encoded](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) input stream, containing one big JSON array. To parse the json array we rely on [JsonReader](https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/stream/JsonReader.java#L191) from gson  library, which gax-httpjson already depended on even prior this PR (check `ProtoMessageJsonStreamIterator` class implementation in this PR for details). Note, we must process elements of the array one-by-one because the size of the full array may be in realm of gigabytes.
    
    _**Note**, ideally I need to split this PR at least in two separate ones: 1) HttpJsonClientCall stuff and unary calls based on it in one PR and then 2) server streaming feature in a second PR. Unfortunately the most reasonable way to test `HttpJsonClientCall` infrastructure is by doing it from server streaming logic beause most of the complexity introduced in HttpJsonClient call is induced by necessity to support streaming workflow in the first place (and to support call interceptors (not part of this PR) as a secondary goal)._
    
    _**Note**, there are a few minor breaking changes in gax-httpjson module (and only there) inroduced in this PR. This should be ok, because unlike gax and gax-grpc, gax-httpjson is not GA yet. The breaking changes are very minor (in the space of `HttpJsonCallContext` and `ManagedHttpJsonChannel`) and are backward-compatible with `java-compute` (the main and only officially supported user of gax-httpjson as of now)._
    vam-google authored Jan 21, 2022
    Configuration menu
    Copy the full SHA
    3c97529 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de285de View commit details
    Browse the repository at this point in the history
  3. chore(main): release 2.10.0 (#1605)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ## [2.10.0](v2.9.0...v2.10.0) (2022-01-21)
    
    
    ### Features
    
    * add api key support ([#1436](#1436)) ([5081ec6](5081ec6))
    * introduce HttpJsonClientCall, Listeners infrastructure and ServerStreaming support in REST transport ([#1599](#1599)) ([3c97529](3c97529))
    
    ---
    This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
    release-please[bot] authored Jan 21, 2022
    Configuration menu
    Copy the full SHA
    8b33f10 View commit details
    Browse the repository at this point in the history
Loading