Skip to content

Commit

Permalink
Update connect lib
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 committed Oct 7, 2023
1 parent 854045d commit d3978e1
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 25 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@
"webpack-cli": "^4.7.2"
},
"dependencies": {
"@connectrpc/connect-node": "1.1.2",
"@connectrpc/connect": "1.1.2",
"@gitpod/gitpod-protocol": "main-gha",
"@gitpod/local-app-api-grpcweb": "main-gha",
"@gitpod/public-api": "main-gha",
Expand All @@ -448,7 +450,6 @@
"configcat-node": "^8.0.0",
"js-yaml": "^4.1.0",
"long": "^5.2.1",
"mustard-connect-node": "^0.11.2",
"nice-grpc": "^2.1.3",
"nice-grpc-common": "^2.0.1",
"node-fetch-commonjs": "^3.2.4",
Expand Down
2 changes: 1 addition & 1 deletion src/internalApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import WebSocket, { ErrorEvent } from 'ws';
import ReconnectingWebSocket from 'reconnecting-websocket';
import * as vscode from 'vscode';
import { ILogService } from './services/logService';
import { Code } from '@bufbuild/connect';
import { Code } from '@connectrpc/connect';
import { WrapError } from './common/utils';

type UsedGitpodFunction = ['getLoggedInUser', 'getWorkspace', 'getOwnerToken', 'getSSHPublicKeys', 'sendHeartBeat'];
Expand Down
2 changes: 1 addition & 1 deletion src/local-ssh/ipc/extensionServiceServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { CreateSSHKeyPairRequest } from '@gitpod/supervisor-api-grpcweb/lib/cont
import * as ssh2 from 'ssh2';
import { ParsedKey } from 'ssh2-streams';
import { WrapError } from '../../common/utils';
import { ConnectError, Code } from '@bufbuild/connect';
import { ConnectError, Code } from '@connectrpc/connect';
import { rawWorkspaceToWorkspaceData } from '../../publicApi';

function isServiceError(obj: any): obj is ServiceError {
Expand Down
2 changes: 1 addition & 1 deletion src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Registry, Counter, Histogram, metric } from 'prom-client';
import { MethodKind } from '@bufbuild/protobuf';
import { StreamResponse, UnaryResponse, Code, ConnectError, Interceptor, StreamRequest, UnaryRequest } from '@bufbuild/connect';
import { StreamResponse, UnaryResponse, Code, ConnectError, Interceptor, StreamRequest, UnaryRequest } from '@connectrpc/connect';
import { ILogService } from './services/logService';
import { addCounter, addHistogram } from './common/metrics';

Expand Down
7 changes: 4 additions & 3 deletions src/publicApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { createConnectTransport } from 'mustard-connect-node';
import { createPromiseClient, Interceptor, PromiseClient, ConnectError, Code } from '@bufbuild/connect';
import { createConnectTransport } from '@connectrpc/connect-node';
import { createPromiseClient, Interceptor, PromiseClient, ConnectError, Code } from '@connectrpc/connect';
import { WorkspacesService } from '@gitpod/public-api/lib/gitpod/experimental/v1/workspaces_connectweb';
import { IDEClientService } from '@gitpod/public-api/lib/gitpod/experimental/v1/ide_client_connectweb';
import { UserService } from '@gitpod/public-api/lib/gitpod/experimental/v1/user_connectweb';
Expand Down Expand Up @@ -87,7 +87,8 @@ export class GitpodPublicApi extends Disposable implements IGitpodAPI {
httpVersion: '2',
interceptors: [authInterceptor, metricsInterceptor],
useBinaryFormat: true,
pingIntervalMs: 120000
pingIntervalMs: 120000,
pingTimeoutMs: 10000
});

this.workspaceService = createPromiseClient(WorkspacesService, transport);
Expand Down
42 changes: 24 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
resolved "https://registry.yarnpkg.com/@bufbuild/connect-web/-/connect-web-0.2.1.tgz#a7ee2914bf1b77d640fc4ee3c3a89d626f3015fa"
integrity sha512-L580cL9VZCXcjwXMCvIvdFBqdQofVBQcL+jmSis7m8ZxPj5NQ4p7fUhQRTsZMWHkyWINdlZnr7WsHQL0BT7wPQ==

"@bufbuild/[email protected]":
version "0.11.0"
resolved "https://registry.yarnpkg.com/@bufbuild/connect/-/connect-0.11.0.tgz#b7afeabf0fe0cf665af736bb6b6d16814cbb2e88"
integrity sha512-a6hrNtBzDzj4hpqylPqpJfMpIP4+O/SnszGgOuRzcuifpTvkwjSmVHLtcvkUYh0wpvjYB0CFmTYzrvAMOftbHw==

"@bufbuild/[email protected]", "@bufbuild/protobuf@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-0.1.1.tgz#163dee03af49e82d300dfa2bf60c8c0f04c80b4c"
Expand All @@ -80,6 +75,18 @@
dependencies:
"@bufbuild/protobuf" "0.1.1"

"@connectrpc/[email protected]":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@connectrpc/connect-node/-/connect-node-1.1.2.tgz#ac99a696bb1a2d376b3146315cea8b056b278529"
integrity sha512-IAwQhh05Qm/T/+ZShEnQz+FFZsr2fbq/DCHhXbmwYjePxvo+kF9YIDkTpVy+vjrV+CwZPBfgOdSaRSJLHUykdg==
dependencies:
undici "^5.25.4"

"@connectrpc/[email protected]":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@connectrpc/connect/-/connect-1.1.2.tgz#d1b5fa1dcec310a8210c1523c99abdc227643f4b"
integrity sha512-oDuKJFRORtzyH4IhZyNgIQ5DKjlDnbP72AH55Aabpc0fwApyus/h4cmYU1KDvahVbqsvUOpd5qUTyMH8IhMmLA==

"@discoveryjs/json-ext@^0.5.0":
version "0.5.7"
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
Expand All @@ -100,6 +107,11 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"

"@fastify/busboy@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.0.0.tgz#f22824caff3ae506b18207bad4126dbc6ccdb6b8"
integrity sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==

"@gitpod/gitpod-protocol@main-gha":
version "0.1.5-main-gha.11049"
resolved "https://registry.yarnpkg.com/@gitpod/gitpod-protocol/-/gitpod-protocol-0.1.5-main-gha.11049.tgz#1b6f3672c790e882d0863ee336e5729d6b5f06e8"
Expand Down Expand Up @@ -2211,11 +2223,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==

headers-polyfill@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.1.2.tgz#9a4dcb545c5b95d9569592ef7ec0708aab763fbe"
integrity sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA==

hexer@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/hexer/-/hexer-1.5.0.tgz#b86ce808598e8a9d1892c571f3cedd86fc9f0653"
Expand Down Expand Up @@ -2802,14 +2809,6 @@ [email protected], ms@^2.0.0:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

mustard-connect-node@^0.11.2:
version "0.11.2"
resolved "https://registry.yarnpkg.com/mustard-connect-node/-/mustard-connect-node-0.11.2.tgz#89628232d6e2a7b035fe9199f4d525cf64d75cf1"
integrity sha512-NrH576KU4TfTzk3tPDT0ow8vQ104f8iLEeDN5PP5fathrKZ3OSitdr7D0EAhetZYHNRUL/1aZWzjsKEruimaXw==
dependencies:
"@bufbuild/connect" "0.11.0"
headers-polyfill "^3.1.2"

mute-stream@~0.0.4:
version "0.0.8"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
Expand Down Expand Up @@ -3976,6 +3975,13 @@ underscore@^1.12.1:
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441"
integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==

undici@^5.25.4:
version "5.25.4"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.25.4.tgz#7d8ef81d94f84cd384986271e5e5599b6dff4296"
integrity sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==
dependencies:
"@fastify/busboy" "^2.0.0"

[email protected], unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
Expand Down

0 comments on commit d3978e1

Please sign in to comment.