Commit a4433c2
authored
fix(ci3): accept slashes in /list/<path:key> for merge-train history (#23160)
## Summary
Test logs print a **History** link like
`…/list/history_<hash>_<TARGET_BRANCH>`. For
`TARGET_BRANCH=merge-train/spartan` the URL contains a `/`, and Flask's
default `/list/<key>` converter only matches a single path segment, so
the link 404s. Percent-encoding (`%2F`) doesn't help: WSGI (gunicorn)
URL-decodes `PATH_INFO` per PEP 3333, so by the time Werkzeug routes the
request, the `%2F` is already a `/`.
Fix: change the route to `/list/<path:key>`, which matches slashes. This
makes the existing history links work — and recovers all data already
written to Redis under keys like `history_<hash>_merge-train/spartan`
(history tracking for `merge-train/*` is already enabled by the existing
condition in `ci3/run_test_cmd`).
This commit reverts the earlier producer-side sanitization in
`ci3/run_test_cmd` / `ci3/exec_test`. Doing it in the producer would
leave existing entries orphaned under the old slash keys; the
dashboard-side fix avoids the split.
Note: dashboard changes ship via `ci3/dashboard/deploy.sh` (manual rsync
+ `systemctl restart rkapp`).
Reproducer: http://ci.aztec-labs.com/54e749c45512a629 → click
**History**.
Background:
https://gist.github.com/AztecBot/33fcdd84eba7b273d3f67dfd2ad6be8f
## Test plan
- [ ] After `ci3/dashboard/deploy.sh`, the History link on a test run on
a `merge-train/*` PR resolves to the existing list.
- [ ] Existing `/list/<key>` URLs without slashes (e.g. `…_next`,
`…_v4`) continue to work.1 parent 01f196a commit a4433c2
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
| |||
0 commit comments