Conversation
Inject the WebUI base path into the SPA shell when serving the HTML fallback. Keep the generated bundle and render-blocking stylesheet unchanged, and cover root, deep-link, and proxy-prefixed paths. Fixes milvus-io#53670 Signed-off-by: gaoxizhi <gx_zone@163.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
✅ CI Loop Results
|
| Stage | Result | Duration | Tests |
|---|---|---|---|
| ✅ Build | SUCCESS | 17.4min | - |
| ✅ Code-Check | SUCCESS | 11.3min | - |
| ✅ UT-Integration | SUCCESS | 39.5min | - |
| ✅ UT-GO | SUCCESS | 30.5min | - |
| ✅ UT-CPP-Cov | SUCCESS | 63.7min | 9706 total, 9706 passed, 0 failed |
Total: 111min | Pipeline | Artifacts
Overall Coverage: 77.0%
Diff Coverage: Go 69.2% (36 hit, 16 miss, 52 measurable lines, 14 unmeasured)
Diff Coverage HTML: view changed lines
Total Patch Coverage: 69.2% (36/52 measurable lines, 14 unmeasured)
|
Hi @czs007 @yanliang567, could you please review this PR when you have a chance? The Go server now injects the WebUI base path into the SPA fallback, preserving the generated bundle and stylesheet loading behavior. Regression coverage, CI, and DCO checks have passed. Thank you! |
Fixes #53670
Problem
Refreshing or directly opening a WebUI collection detail URL resolves relative JavaScript and CSS asset URLs beneath the collection path and returns 404s.
Changes
window.basenameinto the SPA fallback response from the Go HTTP server.<head>, preserving the existing stylesheet loading behavior.Validation
LOCAL_STORAGE_SIZE=1 go test -tags dynamic,test -gcflags='all=-N -l' -count=1 ./internal/http -run 'TestServeWebUIIndexResolvesAssetsFromMountPath|TestRegisterWebUIHandler|TestHandleNotFound'passed.