You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
3.9 KiB

8 years ago
build(deps): Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (#7455) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's releases</a>.</em></p> <blockquote> <h2>Release 1.43.0</h2> <h1>API Changes</h1> <ul> <li>grpc: stabilize <code>WithConnectParams</code> <code>DialOption</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4915">#4915</a>) <ul> <li>Special Thanks: <a href="https://github.com/hypnoglow"><code>@​hypnoglow</code></a></li> </ul> </li> </ul> <h1>Behavior Changes</h1> <ul> <li>status: support wrapped errors in <code>FromContextError</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4977">#4977</a>) <ul> <li>Special Thanks: <a href="https://github.com/bestbeforetoday"><code>@​bestbeforetoday</code></a></li> </ul> </li> <li>config: remove the environment variable to disable retry support (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4922">#4922</a>)</li> </ul> <h1>New Features</h1> <ul> <li>balancer: new field <code>Authority</code> in <code>BuildOptions</code> for server name to use in the authentication handshake with a remote load balancer (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4969">#4969</a>)</li> </ul> <h1>Bug Fixes</h1> <ul> <li>xds/resolver: fix possible <code>ClientConn</code> leak upon resolver initialization failure (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4900">#4900</a>)</li> <li>client: fix <code>nil</code> panic in rare race conditions with the pick first LB policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4971">#4971</a>)</li> <li>xds: improve RPC error messages when xDS connection errors occur (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032">#5032</a>, <a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054">#5054</a>)</li> <li>transport: do not create stream object in the face of illegal stream IDs (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4873">#4873</a>) <ul> <li>Special Thanks: <a href="https://github.com/uds5501"><code>@​uds5501</code></a></li> </ul> </li> </ul> <h1>Documentation</h1> <ul> <li>client: clarify errors to indicate whether compressed or uncompressed messages exceeded size limits (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4918">#4918</a>) <ul> <li>Special Thanks: <a href="https://github.com/uds5501"><code>@​uds5501</code></a></li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/grpc/grpc-go/commit/14c11384b76b67f7b1b32a5d18f865762634c0ae"><code>14c1138</code></a> Change version to 1.43.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5039">#5039</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/ae29ac3e1e62a7b47fb672dec21de2dd83e4f027"><code>ae29ac3</code></a> xds/client: send NewStream errors to the watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032">#5032</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/296afc2e579c14228edadb3debcb040204a0870f"><code>296afc2</code></a> transport: better error message when per-RPC creds fail (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5033">#5033</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/e15d978c827661f8e7cfe807cb9fd8fd8f15a262"><code>e15d978</code></a> xds/client: send connection errors to all watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054">#5054</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/46e883a9ab006a3000afe0a510aea62b75495b8f"><code>46e883a</code></a> Backport &quot;xds/c2p: replace C2P resolver env var with experimental scheme suff...</li> <li><a href="https://github.com/grpc/grpc-go/commit/3786ae1778f5bfcc49da81cbd925b7175ec81839"><code>3786ae1</code></a> xds/resolver: Add support for cluster specifier plugins (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4987">#4987</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/512e89474bfbd567806e026e0afdec468b1ee1ea"><code>512e894</code></a> rls: support extra_keys and constant_keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4995">#4995</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/f3bbd12084380987ae0c9fcccdd7c4d405294a68"><code>f3bbd12</code></a> xds/bootstrap_config: add a string function to server config (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5031">#5031</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/46935b96506deef74e73192e70cc44e3795b1452"><code>46935b9</code></a> fix possible nil before casting (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5017">#5017</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/c2bccd0b1594416da57a74d15f09f8eb0a3d727b"><code>c2bccd0</code></a> xds/kokoro: install go 1.17, and retry go build (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5015">#5015</a>)</li> <li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.42.0&new-version=1.43.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details>
3 years ago
8 years ago
build(deps): Bump google.golang.org/grpc from 1.41.0 to 1.42.0 (#7200) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.42.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's releases</a>.</em></p> <blockquote> <h2>Release 1.42.0</h2> <h1>Behavior Changes</h1> <ul> <li>grpc: Dial(&quot;unix://relative-path&quot;) no longer works (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>) <ul> <li>use &quot;unix://absolute-path&quot; or &quot;unix:relative-path&quot; instead in accordance with <a href="https://github.com/grpc/grpc/blob/master/doc/naming.md#name-syntax">our documentation</a></li> </ul> </li> <li>xds/csds: use new field <code>GenericXdsConfig</code> instead of <code>PerXdsConfig</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4898">#4898</a>)</li> </ul> <h1>New Features</h1> <ul> <li>grpc: support <code>grpc.WithAuthority</code> when secure credentials are used (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)</li> <li>creds/google: add NewDefaultCredentialsWithOptions() to support custom per-RPC creds (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4830">#4830</a>)</li> <li>authz: create file watcher interceptor for gRPC SDK API (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4760">#4760</a>)</li> <li>attributes: add <code>Equal</code> method (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4855">#4855</a>)</li> <li>resolver: add <code>AddressMap</code> and <code>State.BalancerAttributes</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4855">#4855</a>)</li> <li>resolver: Add <code>URL</code> field to <code>Target</code> to store parsed dial target (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)</li> <li>grpclb: add a <code>target_name</code> field to lb config to specify target when used as a child policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4847">#4847</a>)</li> <li>grpclog: support formatting log output as JSON (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4854">#4854</a>)</li> </ul> <h1>Bug Fixes</h1> <ul> <li>server: add missing conn.Close if the connection dies before reading the HTTP/2 preface (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4837">#4837</a>)</li> <li>grpclb: recover if addresses are received after an empty server list was received previously (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4879">#4879</a>)</li> <li>authz: support empty principals and fix rbac authenticated matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4883">#4883</a>)</li> <li>xds/rds: NACK the RDS response if it contains unknown cluster specifier (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4788">#4788</a>)</li> <li>xds/priority: do not switch to low priority when high priority is in Idle (e.g. ringhash) (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4889">#4889</a>)</li> </ul> <h1>Documentation</h1> <ul> <li>grpc: stabilize WithDefaultServiceConfig and improve godoc (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4888">#4888</a>)</li> <li>status: clarify FromError docstring (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4880">#4880</a>)</li> <li>examples: add example illustrating the use of unix abstract sockets (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4848">#4848</a>)</li> <li>examples: update load balancing example to use loadBalancingConfig (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4887">#4887</a>)</li> <li>doc: promote WithDisableRetry to stable; clarify retry is enabled by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4901">#4901</a>)</li> </ul> <h1>API Changes</h1> <ul> <li>credentials: Mark <code>TransportCredentials.OverrideServerName</code> method as deprecated (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/grpc/grpc-go/commit/aff571cc86e6e7e740130dbbb32a9741558db805"><code>aff571c</code></a> Change version to 1.42.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4910">#4910</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/2d7bdf2d2327ce888df559ca90db6bac53ef8b99"><code>2d7bdf2</code></a> xds: Set RBAC on by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4909">#4909</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/d47437c91e798b5370e019660cd74c9c0c8e32fb"><code>d47437c</code></a> xds: Fix invert functionality for header matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4902">#4902</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/9fa26982649594f2b84a442644d3c8995d4dac1b"><code>9fa2698</code></a> xds/csds: populate new GenericXdsConfig field (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4898">#4898</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/6e8625df635bd7afe589d38a1559ebacf4273b07"><code>6e8625d</code></a> doc: promote WithDisableRetry to stable; clarify retry is enabled by default ...</li> <li><a href="https://github.com/grpc/grpc-go/commit/f1d87c14c2165a7ddbc26f6319e777c88c1b3c85"><code>f1d87c1</code></a> client: properly disable retry if GRPC_GO_RETRY=off (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4899">#4899</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/03753f593ccb9034846f7a17db5165a4827b35a2"><code>03753f5</code></a> creds/google: fix CFE cluster name check (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4893">#4893</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/4f21cde702d9f9b1c874791e1c3751b1f7d192ce"><code>4f21cde</code></a> authz: support empty principals and fix rbac authenticated matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4883">#4883</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/f00baa6c3c8455ef1db2ac64f7b89a63ec7d2776"><code>f00baa6</code></a> resolver: replace AddressMap.Range with Keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4891">#4891</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/2a312458e6bd0d3fd9ffccee9b6906b6e753bb8f"><code>2a31245</code></a> client: don't force passthrough as default resolver (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4890">#4890</a>)</li> <li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.41.0...v1.42.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.41.0&new-version=1.42.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details>
3 years ago
build(deps): Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (#7455) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's releases</a>.</em></p> <blockquote> <h2>Release 1.43.0</h2> <h1>API Changes</h1> <ul> <li>grpc: stabilize <code>WithConnectParams</code> <code>DialOption</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4915">#4915</a>) <ul> <li>Special Thanks: <a href="https://github.com/hypnoglow"><code>@​hypnoglow</code></a></li> </ul> </li> </ul> <h1>Behavior Changes</h1> <ul> <li>status: support wrapped errors in <code>FromContextError</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4977">#4977</a>) <ul> <li>Special Thanks: <a href="https://github.com/bestbeforetoday"><code>@​bestbeforetoday</code></a></li> </ul> </li> <li>config: remove the environment variable to disable retry support (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4922">#4922</a>)</li> </ul> <h1>New Features</h1> <ul> <li>balancer: new field <code>Authority</code> in <code>BuildOptions</code> for server name to use in the authentication handshake with a remote load balancer (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4969">#4969</a>)</li> </ul> <h1>Bug Fixes</h1> <ul> <li>xds/resolver: fix possible <code>ClientConn</code> leak upon resolver initialization failure (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4900">#4900</a>)</li> <li>client: fix <code>nil</code> panic in rare race conditions with the pick first LB policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4971">#4971</a>)</li> <li>xds: improve RPC error messages when xDS connection errors occur (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032">#5032</a>, <a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054">#5054</a>)</li> <li>transport: do not create stream object in the face of illegal stream IDs (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4873">#4873</a>) <ul> <li>Special Thanks: <a href="https://github.com/uds5501"><code>@​uds5501</code></a></li> </ul> </li> </ul> <h1>Documentation</h1> <ul> <li>client: clarify errors to indicate whether compressed or uncompressed messages exceeded size limits (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4918">#4918</a>) <ul> <li>Special Thanks: <a href="https://github.com/uds5501"><code>@​uds5501</code></a></li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/grpc/grpc-go/commit/14c11384b76b67f7b1b32a5d18f865762634c0ae"><code>14c1138</code></a> Change version to 1.43.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5039">#5039</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/ae29ac3e1e62a7b47fb672dec21de2dd83e4f027"><code>ae29ac3</code></a> xds/client: send NewStream errors to the watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032">#5032</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/296afc2e579c14228edadb3debcb040204a0870f"><code>296afc2</code></a> transport: better error message when per-RPC creds fail (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5033">#5033</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/e15d978c827661f8e7cfe807cb9fd8fd8f15a262"><code>e15d978</code></a> xds/client: send connection errors to all watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054">#5054</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/46e883a9ab006a3000afe0a510aea62b75495b8f"><code>46e883a</code></a> Backport &quot;xds/c2p: replace C2P resolver env var with experimental scheme suff...</li> <li><a href="https://github.com/grpc/grpc-go/commit/3786ae1778f5bfcc49da81cbd925b7175ec81839"><code>3786ae1</code></a> xds/resolver: Add support for cluster specifier plugins (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4987">#4987</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/512e89474bfbd567806e026e0afdec468b1ee1ea"><code>512e894</code></a> rls: support extra_keys and constant_keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4995">#4995</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/f3bbd12084380987ae0c9fcccdd7c4d405294a68"><code>f3bbd12</code></a> xds/bootstrap_config: add a string function to server config (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5031">#5031</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/46935b96506deef74e73192e70cc44e3795b1452"><code>46935b9</code></a> fix possible nil before casting (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5017">#5017</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/c2bccd0b1594416da57a74d15f09f8eb0a3d727b"><code>c2bccd0</code></a> xds/kokoro: install go 1.17, and retry go build (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5015">#5015</a>)</li> <li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.42.0&new-version=1.43.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details>
3 years ago
8 years ago
  1. package example
  2. import (
  3. "context"
  4. "fmt"
  5. "math/rand"
  6. "net"
  7. "os"
  8. "testing"
  9. "time"
  10. "github.com/stretchr/testify/require"
  11. "google.golang.org/grpc"
  12. "google.golang.org/grpc/credentials/insecure"
  13. "github.com/tendermint/tendermint/libs/log"
  14. tmnet "github.com/tendermint/tendermint/libs/net"
  15. abciclient "github.com/tendermint/tendermint/abci/client"
  16. "github.com/tendermint/tendermint/abci/example/code"
  17. "github.com/tendermint/tendermint/abci/example/kvstore"
  18. abciserver "github.com/tendermint/tendermint/abci/server"
  19. "github.com/tendermint/tendermint/abci/types"
  20. )
  21. func init() {
  22. rand.Seed(time.Now().UnixNano())
  23. }
  24. func TestKVStore(t *testing.T) {
  25. ctx, cancel := context.WithCancel(context.Background())
  26. defer cancel()
  27. logger := log.NewTestingLogger(t)
  28. logger.Info("### Testing KVStore")
  29. testBulk(ctx, t, logger, kvstore.NewApplication())
  30. }
  31. func TestBaseApp(t *testing.T) {
  32. ctx, cancel := context.WithCancel(context.Background())
  33. defer cancel()
  34. logger := log.NewTestingLogger(t)
  35. logger.Info("### Testing BaseApp")
  36. testBulk(ctx, t, logger, types.NewBaseApplication())
  37. }
  38. func TestGRPC(t *testing.T) {
  39. ctx, cancel := context.WithCancel(context.Background())
  40. defer cancel()
  41. logger := log.NewTestingLogger(t)
  42. logger.Info("### Testing GRPC")
  43. testGRPCSync(ctx, t, logger, types.NewGRPCApplication(types.NewBaseApplication()))
  44. }
  45. func testBulk(ctx context.Context, t *testing.T, logger log.Logger, app types.Application) {
  46. t.Helper()
  47. const numDeliverTxs = 700000
  48. socketFile := fmt.Sprintf("test-%08x.sock", rand.Int31n(1<<30))
  49. defer os.Remove(socketFile)
  50. socket := fmt.Sprintf("unix://%v", socketFile)
  51. // Start the listener
  52. server := abciserver.NewSocketServer(logger.With("module", "abci-server"), socket, app)
  53. t.Cleanup(server.Wait)
  54. err := server.Start(ctx)
  55. require.NoError(t, err)
  56. // Connect to the socket
  57. client := abciclient.NewSocketClient(logger.With("module", "abci-client"), socket, false)
  58. t.Cleanup(client.Wait)
  59. err = client.Start(ctx)
  60. require.NoError(t, err)
  61. // Construct request
  62. rfb := types.RequestFinalizeBlock{Txs: make([][]byte, numDeliverTxs)}
  63. for counter := 0; counter < numDeliverTxs; counter++ {
  64. rfb.Txs[counter] = []byte("test")
  65. }
  66. // Send bulk request
  67. res, err := client.FinalizeBlock(ctx, rfb)
  68. require.NoError(t, err)
  69. require.Equal(t, numDeliverTxs, len(res.Txs), "Number of txs doesn't match")
  70. for _, tx := range res.Txs {
  71. require.Equal(t, tx.Code, code.CodeTypeOK, "Tx failed")
  72. }
  73. // Send final flush message
  74. err = client.Flush(ctx)
  75. require.NoError(t, err)
  76. }
  77. //-------------------------
  78. // test grpc
  79. func dialerFunc(ctx context.Context, addr string) (net.Conn, error) {
  80. return tmnet.Connect(addr)
  81. }
  82. func testGRPCSync(ctx context.Context, t *testing.T, logger log.Logger, app types.ABCIApplicationServer) {
  83. t.Helper()
  84. numDeliverTxs := 680000
  85. socketFile := fmt.Sprintf("/tmp/test-%08x.sock", rand.Int31n(1<<30))
  86. defer os.Remove(socketFile)
  87. socket := fmt.Sprintf("unix://%v", socketFile)
  88. // Start the listener
  89. server := abciserver.NewGRPCServer(logger.With("module", "abci-server"), socket, app)
  90. require.NoError(t, server.Start(ctx))
  91. t.Cleanup(server.Wait)
  92. // Connect to the socket
  93. conn, err := grpc.Dial(socket,
  94. grpc.WithTransportCredentials(insecure.NewCredentials()),
  95. grpc.WithContextDialer(dialerFunc),
  96. )
  97. require.NoError(t, err, "Error dialing GRPC server")
  98. t.Cleanup(func() {
  99. if err := conn.Close(); err != nil {
  100. t.Error(err)
  101. }
  102. })
  103. client := types.NewABCIApplicationClient(conn)
  104. // Construct request
  105. rfb := types.RequestFinalizeBlock{Txs: make([][]byte, numDeliverTxs)}
  106. for counter := 0; counter < numDeliverTxs; counter++ {
  107. rfb.Txs[counter] = []byte("test")
  108. }
  109. // Send request
  110. response, err := client.FinalizeBlock(ctx, &rfb)
  111. require.NoError(t, err, "Error in GRPC FinalizeBlock")
  112. require.Equal(t, numDeliverTxs, len(response.Txs), "Number of txs returned via GRPC doesn't match")
  113. for _, tx := range response.Txs {
  114. require.Equal(t, tx.Code, code.CodeTypeOK, "Tx failed")
  115. }
  116. }