Skip to content

Commit 99c68bb

Browse files
CI: probe MLflow span export on tracing failure
1 parent debca5b commit 99c68bb

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,27 @@ jobs:
7272
echo "=== installed claude-code + mlflow CLI ==="
7373
claude --version || true
7474
"$(uv tool dir --bin)/mlflow" --version || true
75+
# Diagnostic: reproduce the client-side span export from the runner with
76+
# verbose logging. The hook's `log_spans` failure is logged at WARNING to
77+
# mlflow's own logger (not the hook file log), so surface it directly to
78+
# see why the root span never reaches the trace server from CI.
79+
- if: ${{ failure() }}
80+
name: Probe MLflow span export
81+
env:
82+
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_BEARER }}
83+
run: |
84+
uv run --extra tracing python - <<'PY' 2>&1 || true
85+
import logging
86+
logging.basicConfig(level=logging.DEBUG)
87+
import os, mlflow
88+
mlflow.set_tracking_uri("databricks")
89+
mlflow.set_experiment(experiment_id="2190569664060193")
90+
print("=== starting probe span ===")
91+
with mlflow.start_span(name="ci_export_probe") as span:
92+
span.set_inputs({"probe": True})
93+
try:
94+
mlflow.flush_trace_async_logging()
95+
except Exception as e:
96+
print("flush error:", repr(e))
97+
print("=== probe done ===")
98+
PY

0 commit comments

Comments
 (0)