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

client/ts-web: bump grpc-web from 1.3.1 to 1.4.0 in /client-sdk/ts-web #1137

Merged
merged 2 commits into from
Sep 27, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 26, 2022

Bumps grpc-web from 1.3.1 to 1.4.0.

Release notes

Sourced from grpc-web's releases.

Release 1.4.0

This is the 1.4.0 release of gRPC-Web.

Please see the notes for the previous releases here. Please consult grpc.io for all information regarding this product.

This release contains refinements, improvements, and bug fixes, with highlights listed below.

Major Features

The protoc-gen-grpc-web protoc plugin is now built through Github Actions! With ARM / Apple Silicon (M1/M2) support powered by Zig too (thanks to @​hronro!) 😃

  • #1249 Use Zig to build aarch64 binaries @​hronro
  • #1203 Github Actions (workflows) for building protoc-gen-grpc-web plugins

Other Changes

Changelog

Sourced from grpc-web's changelog.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

Dependabot will merge this PR once CI passes on it, as requested by @pro-wh.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added c:client-sdk/typescript Category: TypeScript client SDK c:deps Category: external dependencies labels Sep 26, 2022
@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Merging #1137 (aea7354) into main (0886f57) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1137   +/-   ##
=======================================
  Coverage   67.81%   67.81%           
=======================================
  Files         131      131           
  Lines       11575    11575           
=======================================
  Hits         7850     7850           
  Misses       3693     3693           
  Partials       32       32           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pro-wh
Copy link
Contributor

pro-wh commented Sep 27, 2022

I've been notified that grpc/grpc-web#1285 will affect us

dependabot bot and others added 2 commits September 27, 2022 15:38
Bumps [grpc-web](https://github.com/grpc/grpc-web) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/grpc/grpc-web/releases)
- [Changelog](https://github.com/grpc/grpc-web/blob/master/CHANGELOG.md)
- [Commits](grpc/grpc-web@1.3.1...1.4.0)

---
updated-dependencies:
- dependency-name: grpc-web
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@pro-wh pro-wh force-pushed the dependabot/npm_and_yarn/client-sdk/ts-web/grpc-web-1.4.0 branch from d2ba907 to aea7354 Compare September 27, 2022 22:38
@pro-wh
Copy link
Contributor

pro-wh commented Sep 27, 2022

seems .name is still available at runtime 🙏

@pro-wh
Copy link
Contributor

pro-wh commented Sep 27, 2022

ok for our information, the echo example from grpc-web generates this client code:

/**
 * @const
 * @type {!grpc.web.MethodDescriptor<
 *   !proto.grpc.gateway.testing.EchoRequest,
 *   !proto.grpc.gateway.testing.EchoResponse>}
 */
const methodDescriptor_EchoService_Echo = new grpc.web.MethodDescriptor(
  '/grpc.gateway.testing.EchoService/Echo', // (1)
  grpc.web.MethodType.UNARY,
  proto.grpc.gateway.testing.EchoRequest,
  proto.grpc.gateway.testing.EchoResponse,
  /**
   * @param {!proto.grpc.gateway.testing.EchoRequest} request
   * @return {!Uint8Array}
   */
  function(request) {
    return request.serializeBinary();
  },
  proto.grpc.gateway.testing.EchoResponse.deserializeBinary
);


/**
 * @param {!proto.grpc.gateway.testing.EchoRequest} request The
 *     request proto
 * @param {?Object<string, string>} metadata User defined
 *     call metadata
 * @param {function(?grpc.web.RpcError, ?proto.grpc.gateway.testing.EchoResponse)}
 *     callback The callback function(error, response)
 * @return {!grpc.web.ClientReadableStream<!proto.grpc.gateway.testing.EchoResponse>|undefined}
 *     The XHR Node Readable Stream
 */
proto.grpc.gateway.testing.EchoServiceClient.prototype.echo =
    function(request, metadata, callback) {
  return this.client_.rpcCall(this.hostname_ +
      '/grpc.gateway.testing.EchoService/Echo', // (2)
      request,
      metadata || {},
      methodDescriptor_EchoService_Echo,
      callback);
};

(comments added)

i.e. they repeat the method name in the method descriptor constructor argument (1) and in the full url (2) given to rpcCall.

internally, rpcCall does this:

  1. get the length of the method name from (1)
  2. slice that much off the end of the full url from (2), in order to get the "hostname"
  3. append the method name from (1) to the "hostname," in order to get the full url back
  4. send the request to the reconstructed full url

ugh

Copy link
Contributor

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

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

we should probably release this so that downstream projects that upgrade to grpc-web 1.4.0 don't break

@dependabot merge

@pro-wh
Copy link
Contributor

pro-wh commented Sep 27, 2022

ok as long as required tests pass and applicable tests pass

@pro-wh pro-wh merged commit 408b8c5 into main Sep 27, 2022
@pro-wh pro-wh deleted the dependabot/npm_and_yarn/client-sdk/ts-web/grpc-web-1.4.0 branch September 27, 2022 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:client-sdk/typescript Category: TypeScript client SDK c:deps Category: external dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant