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

fix port-fwd for k8s with default http_rpc #1960

Merged
merged 2 commits into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions javascript/packages/orchestrator/src/networkNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { makeRe } from "minimatch";
import {
DEFAULT_INDIVIDUAL_TEST_TIMEOUT,
LOCALHOST,
RPC_HTTP_PORT,
RPC_WS_PORT,
WS_URI_PATTERN,
} from "./constants";
Expand Down Expand Up @@ -78,10 +79,14 @@ export class NetworkNode implements NetworkNodeInterface {

const url = new URL(this.wsUri);
if (
parseInt(url.port, 10) !== RPC_WS_PORT &&
![RPC_WS_PORT, RPC_HTTP_PORT].includes(parseInt(url.port, 10)) &&
client.providerName !== "native"
) {
const fwdPort = await client.startPortForwarding(RPC_WS_PORT, this.name);
// use rpc_port as default (since ws_port was deprecated in https://github.com/paritytech/substrate/pull/13384)
const fwdPort = await client.startPortForwarding(
RPC_HTTP_PORT,
this.name,
);

this.wsUri = WS_URI_PATTERN.replace("{{IP}}", LOCALHOST).replace(
"{{PORT}}",
Expand Down
Loading