Skip to content

Commit b9006d7

Browse files
author
Radovan Fuchs
committed
fix
1 parent 1b0dfb2 commit b9006d7

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

tests/e2e-prow/rhoai/pipeline.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,18 @@ oc expose pod lightspeed-stack-service \
224224
--type=ClusterIP \
225225
-n $NAMESPACE
226226

227-
# Kill any existing processes on ports 8080 and 8000
228-
lsof -ti:8080 | xargs kill -9 2>/dev/null || true
229-
lsof -ti:8000 | xargs kill -9 2>/dev/null || true
227+
# Kill any existing processes on ports 8080 and 8000 (lsof often missing in minimal images)
228+
kill_listeners_on_ports() {
229+
local p
230+
for p in "$@"; do
231+
if command -v lsof >/dev/null 2>&1; then
232+
lsof -ti:"$p" | xargs kill -9 2>/dev/null || true
233+
elif command -v fuser >/dev/null 2>&1; then
234+
fuser -k "${p}/tcp" 2>/dev/null || true
235+
fi
236+
done
237+
}
238+
kill_listeners_on_ports 8080 8000
230239

231240
# Start port-forward for lightspeed-stack
232241
progress "Starting port-forward, then E2E tests"

tests/e2e-prow/rhoai/run-tests.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,22 @@ for i in $(seq 1 12); do
3535
done
3636
ts "End: wait for service"
3737

38-
ts "Start: pip install uv"
38+
ts "Start: ensure uv is available"
3939
echo "Installing test dependencies..."
40-
pip install uv
41-
ts "End: pip install uv"
40+
if command -v uv >/dev/null 2>&1; then
41+
echo "uv already on PATH"
42+
elif command -v pip >/dev/null 2>&1; then
43+
pip install uv
44+
elif command -v python3 >/dev/null 2>&1 && python3 -m pip --version >/dev/null 2>&1; then
45+
python3 -m pip install --user uv
46+
export PATH="${HOME}/.local/bin:${PATH}"
47+
else
48+
echo "Installing uv via astral.sh (no pip in image)..."
49+
curl -LsSf https://astral.sh/uv/install.sh | sh
50+
export PATH="${HOME}/.local/bin:${PATH}"
51+
fi
52+
command -v uv >/dev/null 2>&1 || { echo "❌ uv not available after install"; exit 1; }
53+
ts "End: ensure uv is available"
4254

4355
ts "Start: uv sync"
4456
uv sync

0 commit comments

Comments
 (0)