Skip to content

Commit 078cdc5

Browse files
authored
fix port-fwd for k8s with default http_rpc (#1960)
* fix port-fwd for k8s with default http_rpc * eslint
1 parent 2cb4431 commit 078cdc5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

javascript/packages/orchestrator/src/networkNode.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { makeRe } from "minimatch";
44
import {
55
DEFAULT_INDIVIDUAL_TEST_TIMEOUT,
66
LOCALHOST,
7+
RPC_HTTP_PORT,
78
RPC_WS_PORT,
89
WS_URI_PATTERN,
910
} from "./constants";
@@ -78,10 +79,14 @@ export class NetworkNode implements NetworkNodeInterface {
7879

7980
const url = new URL(this.wsUri);
8081
if (
81-
parseInt(url.port, 10) !== RPC_WS_PORT &&
82+
![RPC_WS_PORT, RPC_HTTP_PORT].includes(parseInt(url.port, 10)) &&
8283
client.providerName !== "native"
8384
) {
84-
const fwdPort = await client.startPortForwarding(RPC_WS_PORT, this.name);
85+
// use rpc_port as default (since ws_port was deprecated in https://github.com/paritytech/substrate/pull/13384)
86+
const fwdPort = await client.startPortForwarding(
87+
RPC_HTTP_PORT,
88+
this.name,
89+
);
8590

8691
this.wsUri = WS_URI_PATTERN.replace("{{IP}}", LOCALHOST).replace(
8792
"{{PORT}}",

0 commit comments

Comments
 (0)