Skip to content

Commit 4fd2604

Browse files
authored
fix: DH-18424: Force websocket connections for 0.37.x+ Core servers (#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
1 parent 9828fb0 commit 4fd2604

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Community servers can be configured via the `"deephaven.coreServers"` setting in
3737

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

40+
#### Self-signed SSL Certificates
41+
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.
4042

4143
### Enterprise Servers
4244
Enterprise servers can be configured via the `"deephaven.enterpriseServers"` setting in `VS Code` user or workspace settings.

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@
875875
},
876876
"devDependencies": {
877877
"@deephaven-enterprise/jsapi-types": "^1.20240723.124-beta",
878-
"@deephaven/jsapi-types": "^1.0.0-dev0.36.1",
878+
"@deephaven/jsapi-types": "^1.0.0-dev0.37.3",
879879
"@types/node": "22.5.4",
880880
"@types/vscode": "^1.91.0",
881881
"@types/ws": "^8.5.10",
119 KB
Binary file not shown.

src/controllers/ExtensionController.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,11 @@ export class ExtensionController implements Disposable {
342342
assertDefined(this._coreJsApiCache, 'coreJsApiCache');
343343
const dhc = await this._coreJsApiCache.get(url);
344344

345-
const client = new dhc.CoreClient(
346-
url.toString()
347-
) as CoreUnauthenticatedClient;
345+
const client = new dhc.CoreClient(url.toString(), {
346+
// `useWebsockets: true` is needed for 0.37.x servers until we enable
347+
// the http2 based gRPC transport DH-18086
348+
useWebsockets: true,
349+
}) as CoreUnauthenticatedClient;
348350

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

0 commit comments

Comments
 (0)