Skip to content

Commit ea86fab

Browse files
committed
fix port-forward
1 parent ce29594 commit ea86fab

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ CLAUDE.md
1010

1111
.cert/
1212

13+
# Runtime-generated port-forward environment files
14+
**/.pf-env
15+
1316
.augment/

networks/solana/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"build": "npm run clean; tsc; tsc -p tsconfig.esm.json; npm run copy",
3737
"build:dev": "npm run clean; tsc --declarationMap; tsc -p tsconfig.esm.json; npm run copy",
3838
"dev": "tsc --watch",
39-
"starship:start": "npx @starship-ci/[email protected] start --config starship/configs/config.yaml",
39+
"starship:start": "npx @starship-ci/[email protected] start --config starship/configs/config.yaml && bash starship/port-forward.sh",
4040
"starship:stop": "npx @starship-ci/[email protected] stop --config starship/configs/config.yaml",
4141
"test": "jest",
4242
"test:keypair": "jest starship/__tests__/keypair.test.ts",

networks/solana/starship/port-forward.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ start_pf() {
4747
free_port "$local_port"
4848

4949
# Start in background
50-
# Capture logs for troubleshooting in CI
5150
mkdir -p "$(dirname "$PORTS_ENV_FILE")"
52-
local log_file="$(dirname "$PORTS_ENV_FILE")/pf_${local_port}.log"
53-
kubectl -n "$NS" port-forward "$target" "$mapping" >"$log_file" 2>&1 &
51+
kubectl -n "$NS" port-forward "$target" "$mapping" >/dev/null 2>&1 &
5452
local pf_pid=$!
5553

5654
# Health check: wait for local port to open
@@ -91,12 +89,6 @@ start_pf() {
9189
else
9290
err "✗ Failed to forward $target → 127.0.0.1:$mapping after ${retries} retries; killing pid $pf_pid"
9391
kill -9 "$pf_pid" >/dev/null 2>&1 || true
94-
# Surface port-forward logs to help debugging
95-
if [[ -f "$log_file" ]]; then
96-
err "---- port-forward log ($log_file) ----"
97-
tail -n +1 "$log_file" >&2 || true
98-
err "---- end log ----"
99-
fi
10092
return 1
10193
fi
10294
}

0 commit comments

Comments
 (0)