fix: harden MCP session cleanup, extend deploy timeout, and add experiment tooling#33
Conversation
929d654 to
81c12b1
Compare
81c12b1 to
90174fa
Compare
Add --experiment NAME flag to deploy-agent.sh, deploy-benchmark.sh, deploy-and-evaluate.sh, and evaluate-benchmark.sh so parallel experiments get distinct pod/service names (e.g. exgentic-a2a-tool-calling-gsm8k-exp1 vs …-exp2). Reorder steps in deploy-agent.sh and deploy-benchmark.sh so resource limits and rollout stabilization happen before the health-check wait, avoiding a race where the pod restarts mid-check. Add delete-all-deployments.sh to bulk-delete all agent and benchmark deployments in a namespace via the Kagenti API. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Yoav Katz <katz@il.ibm.com>
- runner: catch delete_session errors inside the MCP.DeleteSession child span so a residual cleanup failure (e.g. sidecar reaped after an agent timeout) never flips a completed session's span to ERROR - mcp_client: match benign "already gone" markers case-insensitively and recognize "no longer alive" as a clean no-op on session delete - deploy-benchmark: extend rollout stabilization timeout 120s -> 360s - analyze_traces: aggregate experiment comparison into a single table with dynamic column widths Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Yoav Katz <katz@il.ibm.com>
Rework analyze-run.sh to reach MLflow via kubectl port-forward for both --kind and --openshift, mirroring evaluate-benchmark.sh's OTEL collector approach. MLflow location, TLS, workspace, auth mode, and experiment id now default per cluster mode, with env/flag overrides. - Add --openshift DOMAIN / --kind cluster modes with per-mode defaults (namespace, service, port, TLS, workspace, auth mode, experiment id) - Add --auth-mode (secret | oc-token); oc-token uses `oc whoami -t` - Replace --limit trace count with --window (e.g. 3h, 90m, 2d); the downloader pages newest-first and stops at the first out-of-window trace - Skip trivially short traces (MIN_DURATION_S) before fetching their spans - Send x-mlflow-workspace header and allow insecure TLS for port-forwarded reencrypt HTTPS endpoints (RHOAI) - Verify kubectl context matches the cluster mode via libsh helper - Harden secret-mode token flow against set -e command-substitution aborts Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Yoav Katz <katz@il.ibm.com>
90174fa to
f2579bd
Compare
|
Ran this end-to-end against my kind cluster and an OpenShift cluster, both local scripts and in-cluster Job. The core code changes work. Summary below; happy to share full logs if useful. Coverage
How I built the runner imageFollowed the README's "In-Cluster Execution (Kubernetes Job)" section. From docker build -t ghcr.io/kellyaa/workload-harness/workload-harness:0.2 .
docker push ghcr.io/kellyaa/workload-harness/workload-harness:0.2Then patched Session-cleanup fix — solid evidenceThe Zero tracebacks, zero propagated exceptions, zero outer-span errors across all three runs. This is exactly what the PR is meant to do. Deploy timeout,
|
…ride
Resolve conflicts in deploy-agent.sh and deploy-benchmark.sh by combining
the experiment-suffix block from this branch with NAMESPACE="${NAMESPACE:-team1}"
from rossoctl/main (PR rossoctl#35), so both features coexist.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Merged and created issues for remaining issues . |
Summary
This PR bundles four sets of changes from the fork:
Session cleanup + deploy timeout (
c9a36bd)delete_sessionerrors inside theMCP.DeleteSessionchild span (success and failure paths) so a residual cleanup failure — e.g. the MCP sidecar reaped after an agent timeout — never flips a completed session's span to ERROR or propagates to the outer failure handler."no longer alive"as a clean no-op on session delete.120s → 360s.Experiment tooling (
6a52068)--experimentflag support.delete-all-deployments.shscript.Action timeout + fail-fast (
f0ce136,fef2443)--action-timeoutflag and extend MCP wait time.pyyamldependency.OpenShift MLflow + time-window trace fetch (
2afc116)analyze-run.shto reach MLflow viakubectl port-forwardfor both--kindand--openshift, mirroringevaluate-benchmark.sh's OTEL collector approach.--openshift DOMAIN/--kindcluster modes with per-mode defaults (namespace, service, port, TLS, workspace, auth mode, experiment id).--auth-mode (secret | oc-token);oc-tokenusesoc whoami -t.--limittrace count with--window(e.g.3h,90m,2d); downloader pages newest-first and stops at the first out-of-window trace.MIN_DURATION_S) before fetching their spans.x-mlflow-workspaceheader and allow insecure TLS for port-forwarded reencrypt HTTPS endpoints (RHOAI).kubectlcontext matches the cluster mode via libsh helper.set -ecommand-substitution aborts.Verification
avgguards empty lists and each metric row keeps its own> 0division guard.analyze-run.shtested against both Kind and OpenShift (RHOAI) MLflow endpoints.Assisted-By: Claude Code