Skip to content

fix(inference-ref-arch): harden deployment_test.sh port-forward and fail-fast checks - #622

Open
karajendran wants to merge 1 commit into
mainfrom
fix/inference-test-port-forward-pid-check
Open

karajendran wants to merge 1 commit into
mainfrom
fix/inference-test-port-forward-pid-check

Conversation

@karajendran

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #615 hardening deployment_test.sh across online-inference-tpu/{max-diffusion,vllm} and online-inference-gpu/vllm (test/: +507 / -117 lines across 3 shell smoke tests and 1 unit-test suite):

  • Replace ps | grep " $PF_PID " (false-negatives in non-TTY subshells and on 6+/7-digit PIDs) and the unbounded telnet loop (telnet is absent from runner/devcontainer images) with kill -0 "${PF_PID}" 2>/dev/null, a bounded GET /health poll (120 × 0.5s), --address 127.0.0.1, and an EXIT cleanup trap.
  • Enable set -euo pipefail, exit non-zero on port-forward failure instead of breaking out with exit 0, fix http:/127.0.0.1 → http://127.0.0.1 on /v1/models, and enforce curl --fail plus PNG magic-byte (89504e470d0a1a0a) / jq -e response assertions.
  • Add test_deployment_test_scripts.py (python-unit-test / python-coverage-test CI jobs) exercising happy, dead-PF_PID, health-timeout, and invalid-payload paths under detached non-TTY sessions.

Validation

  • Live GKE Autopilot 1.37.1 E2E (europe-west4, private cluster, ClusterIP :8000 over 127.0.0.1 port-forward) under detached setsid ... </dev/null sessions with 7-digit PIDs: verified l4-qwen3-32b (8× NVIDIA L4), v6e-stable-diffusion-xl-base-1-0 (8× TPU v6e, 1024x1024 PNG), v6e-qwen3-32b (4× TPU v6e), and post-delete fail-fast exit (rc=1, 0 orphan port-forward processes).
  • Passed ./run_python_unittests.sh (159 tests OK; 99% coverage on test_deployment_test_scripts.py), black --check, isort --check-only, addlicense -check, final-newline, dictionaries_check.sh, and cspell.

Limitations

  • online-inference-{gpu,tpu}/vllm serve models from /gcs/${HF_MODEL_ID} via Cloud Storage FUSE (--model=/gcs/$(MODEL_ID)), so consolidating them onto online-inference-gpu/common.sh (which sends "model": "${MODEL_ID}") is left out of scope for this bug fix.

…ail-fast checks

Replace 'ps | grep " $PF_PID "' and unbounded telnet readiness loops with 'kill -0 "${PF_PID}" 2>/dev/null', EXIT-trapped port-forward cleanup, bounded GET /health probes, 'set -euo pipefail', 'curl --fail', PNG header / JSON content assertions, and subprocess regression tests across online-inference-tpu (max-diffusion, vllm) and online-inference-gpu (vllm).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant