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

feat: DH-18086: grpc transport #202

Merged
merged 10 commits into from
Jan 21, 2025
116 changes: 65 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@
"dependencies": {
"@deephaven-enterprise/auth-nodejs": "^1.20240723.124-beta",
"@deephaven-enterprise/query-utils": "^1.20240723.124-beta",
"@deephaven/jsapi-nodejs": "0.102.0",
"@deephaven/jsapi-nodejs": "^0.103.0",
"nanoid": "^5.0.7"
},
"devDependencies": {
Expand Down
18 changes: 9 additions & 9 deletions src/controllers/ExtensionController.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import * as vscode from 'vscode';
import type { dh as DhcType } from '@deephaven/jsapi-types';
import type { EnterpriseDhType as DheType } from '@deephaven-enterprise/jsapi-types';
import {
createClient as createDheClient,
getWsUrl,
type AuthenticatedClient as DheAuthenticatedClient,
type UnauthenticatedClient as DheUnauthenticatedClient,
} from '@deephaven-enterprise/auth-nodejs';
import { NodeHttp2gRPCTransport } from '@deephaven/jsapi-nodejs';
import {
CLEAR_SECRET_STORAGE_CMD,
CREATE_NEW_TEXT_DOC_CMD,
Expand Down Expand Up @@ -76,12 +83,6 @@ import { ConnectionController } from './ConnectionController';
import { PipServerController } from './PipServerController';
import { PanelController } from './PanelController';
import { UserLoginController } from './UserLoginController';
import {
createClient as createDheClient,
getWsUrl,
type AuthenticatedClient as DheAuthenticatedClient,
type UnauthenticatedClient as DheUnauthenticatedClient,
} from '@deephaven-enterprise/auth-nodejs';

const logger = new Logger('ExtensionController');

Expand Down Expand Up @@ -343,9 +344,8 @@ export class ExtensionController implements Disposable {
const dhc = await this._coreJsApiCache.get(url);

const client = new dhc.CoreClient(url.toString(), {
// `useWebsockets: true` is needed for 0.37.x servers until we enable
// the http2 based gRPC transport DH-18086
useWebsockets: true,
debug: false, // Set `debug` to true to see debug logs for gRPC transport
transportFactory: NodeHttp2gRPCTransport.factory,
}) as CoreUnauthenticatedClient;

// Attach a dispose method so that client caches can dispose of the client
Expand Down
Loading