Skip to content

Commit

Permalink
fix: DH-18424: Force websocket connections for 0.37.x+ Core servers (#…
Browse files Browse the repository at this point in the history
…207)

DH-18424: Force websocket connections for 0.37.x+ Core servers

**Testing**
I tested the following scenarios on my Mac:
* Grizzly with Core+ 0.37.x (can use dev-grizzly2)
* San Luis with Core+ 0.37.x (can use dev-sanluis)
* Community http
* Community https (note `-Dhttp.websockets=true` needs to be set when
starting the server)
Example `START_OPTS -Dhttp.port=444 -Dhttp.websockets=true
-Dssl.identity.type=privatekey
-Dssl.identity.certChainPath=/dev-certs/localhost.crt
-Dssl.identity.privateKeyPath=/dev-certs/localhost.key`. Also
`NODE_EXTRA_CA_CERTS` needs to be set when using self signed SSL certs
(see README).

NOTE: Would be good to test at least the first 2 items on Windows since
the user originally had some Windows specific issues. I don't have a way
to do this since my Windows machine does not have access to the VPN
  • Loading branch information
bmingles authored Jan 17, 2025
1 parent 9828fb0 commit 4fd2604
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Community servers can be configured via the `"deephaven.coreServers"` setting in

![Community Server Settings](./docs/assets/add-community-server.gif)

#### Self-signed SSL Certificates
If you are running a Community server with a self-signed SSL certificate, vscode will need to be run in an environment that has the `NODE_EXTRA_CA_CERTS` environment variable set to the path of the cert that was used to sign your cert. Depending on your setup, this could be the server certificate or a CA certificate.

### Enterprise Servers
Enterprise servers can be configured via the `"deephaven.enterpriseServers"` setting in `VS Code` user or workspace settings.
Expand Down
14 changes: 7 additions & 7 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 @@ -875,7 +875,7 @@
},
"devDependencies": {
"@deephaven-enterprise/jsapi-types": "^1.20240723.124-beta",
"@deephaven/jsapi-types": "^1.0.0-dev0.36.1",
"@deephaven/jsapi-types": "^1.0.0-dev0.37.3",
"@types/node": "22.5.4",
"@types/vscode": "^1.91.0",
"@types/ws": "^8.5.10",
Expand Down
Binary file modified releases/vscode-deephaven-latest.vsix
Binary file not shown.
8 changes: 5 additions & 3 deletions src/controllers/ExtensionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,11 @@ export class ExtensionController implements Disposable {
assertDefined(this._coreJsApiCache, 'coreJsApiCache');
const dhc = await this._coreJsApiCache.get(url);

const client = new dhc.CoreClient(
url.toString()
) as CoreUnauthenticatedClient;
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,
}) as CoreUnauthenticatedClient;

// Attach a dispose method so that client caches can dispose of the client
return Object.assign(client, {
Expand Down

0 comments on commit 4fd2604

Please sign in to comment.