fix: TEM-31, TEM-32, TEM-39, TEM-37 pip warm-up, RunPod REST API v2 in smoke tests, proxy-first checks - #30
Conversation
Co-authored-by: mchekm <mchekm@softserveinc.com>
|
Thanks, I rechecked the current head ( I still see four issues that should be addressed before merging:
Minor issue: the pip latency test uses whole-second timestamps and accepts Once these issues are addressed and covered by targeted checks, I can review the updated version again. |
…m/runpod-workers/comfyui-base into fix/TEM-31-unavailable-pip-and-uv
Closes TEM-31, TEM-32, TEM-37, TEM-39.
Summary
Image fixes
python -m pip --versionwith a 5s timeout; on a cold container the first pip invocation could exceed it (slow network volume) and Manager reported "Neither pip nor uv are available".start.shnow warms pip up before ComfyUI starts and logs the wall time. A matching always-on pip check in the smoke tests fails the run if pip is missing or slower than Manager's 5s budget. The check measures wall time in milliseconds via bash 5's$EPOCHREALTIME(whole-second timestamps would record a ~5.9s run as "5s" and let it slip under the budget), loggingpip_wall_ms=…. Deliberately timed with shell built-ins — a python-based clock would pre-warm the interpreter from the network volume and bias the cold-start cost being measured.start.shnow tracks SIGTERM/SIGINT in the trap: on a normal shutdown it logs a single "Pod is shutting down" line, cleanly stops Jupyter and FileBrowser (Docker only signals PID 1), and exits. The crash banner is printed only when ComfyUI itself dies, and now includes the actual exit code (e.g. 137 for OOM-kill vs. 1/2 for a Python error). A real crash still keeps the container alive viasleep infinity, so SSH/Jupyter stay accessible — that behavior is unchanged.Smoke tests: RunPod REST API v2 adoption (TEM-32)
GET /v2/pods/{id}. SSH stays the readiness gate, but the v2statusis polled alongside: unlike the legacydesiredStatus(RUNNING from second one, even when the container never starts), v2 distinguishesSTARTING/RUNNINGand surfacesERROR— onERROR/EXITED/TERMINATEDwe bail immediately instead of sitting out the fullCREATE_TIMEOUT.LOG_ERROR_PATTERN, now also matchingcrash(ed/es/ing)), and the scan fails the run on a match. An empty fetch is never a pass: the image always logs on boot, so an empty or failed fetch is retried (3×, 10s apart) and then FAILs aslog scan unverifiedinstead of silently passing.GET /v2/pods/{id}/logs?source=system) on stall/timeout/terminal state and in every diagnostic dump. That's where image-pull and container-init failures are reported — container stdout is empty when the container never started. Filtered by the newSYS_LOG_ERROR_PATTERN(error/failed/crashed markers).Smoke tests: reliability & UX
PORT_PROXY_TIMEOUTand then fails, so a transient proxy 404 can't masquerade as a healthy service. Every app we test serves 200 on/(redirects are followed, so a healthy redirect chain still ends in 200); the in-pod diagnostic probe (localhost, no proxy in the middle) keeps the looser<500criterion.start.shkeeps the container (and SSH) alive viasleep infinityafter a crash, and the log scan used to run before dwell. After the dwell the runner now re-probes ComfyUI's/system_statsvia the proxy (when the group tests ComfyUI) and re-runs the container-log error scan, so anything that crashed or logged errors during the window fails the pair.GET /server_download/folder_pathswas a single-shot probe, so a transient proxy 404/5xx was misclassified as "node not installed in this image" (intermittent CI failures). It now retries for up toCOMFYUI_ROUTES_TIMEOUT(default 60s) and the FAIL message includes the last HTTP code/error.[W2-A100 SXM 40GB]instead of[W2]), so interleaved lines from parallel jobs are attributable at a glance.Pipeline examples: