Repository navigation
fix(stage-results): accept the app's /infx/inference chart links - #4931
Conversation
|
Generally most InferenceX submissions don't need to add changes to the infx package. On the off chance they do, generally the diff is small. Please prompt your agent to clean your PR to keep your diff to only necessary & minimal changes too. We have an increased code quality bar for changes to the infx package. 中文大多数 InferenceX 提交通常不需要修改 infx 包。即使确实需要,改动通常也很小。请让你的 agent 清理 PR,使改动只包含必要且最小的内容。infx 包的改动有更高的代码质量要求。 |
| if ( | ||
| f"{parsed.scheme}://{parsed.netloc}" != STAGING_SITE | ||
| or parsed.path != "/inference" | ||
| or parsed.path != INFERENCE_PATH |
There was a problem hiding this comment.
🟡 (optional) Completion callbacks whose chart links still use the old /inference path will now fail, and the PR comment never gets its links. The check at line 42 requires parsed.path to equal INFERENCE_PATH exactly. A link from any app run built before InferenceX-app #1709 (for example a re-run of an older staging workflow) raises "Chart link must select a Pareto line from the staged run". Fix: accept both /infx/inference and the legacy /inference path during the transition, since the old path still redirects with a 308. This is the same strict-path failure this PR fixes, pointed the other way.
Why this was flagged
This only triggers if some InferenceX-app callback still sends chart-links URLs on {STAGING_SITE}/inference. Examples are a re-run of an app workflow that started before #1709, or a staging deployment that has not picked up #1709 yet. Those callbacks reach report() through .github/workflows/stage-results-callback.yml:32. chart_links() at stage_results_callback.py:42 compares parsed.path != INFERENCE_PATH and raises RuntimeError. main() then exits 1 and the source PR comment stays on "staging" with no completion link. On the base branch those same /inference links were accepted. Per the PR description the old URL still works as a 308 redirect, so nothing makes the strict rejection necessary. No other safeguard catches this, because the path check is the only one.
Verification: An InferenceX-app callback built before #1709 still sends chart-links on {STAGING_SITE}/inference. stage_results_callback.py:42 now reads or parsed.path != INFERENCE_PATH, which matches exactly and has no legacy alternative. The base code accepted "/inference". Such a link now raises RuntimeError("Chart link must select a Pareto line from the staged run") at line 48, __main__ calls sys.exit(1), and the PR comment stays at "staging".
InferenceX-app #1709 (merged 2026-11-07 08:12Z) moved the dashboards to
/infx/inference, so the staged chart links it sends back now use that path.stage_results_callback.pystill required/inferenceand rejected every completion callback withChart link must select a Pareto line from the staged run. Staging itself succeeded, but every/usestaging comment since then kept saying "staging" and never got its completion link (for example #4864 and run 42525904099).This accepts
/infx/inferenceand moves the fallback link to it as well. The old path still redirects with a 308.