Repository navigation
Conversation
…fuse a server for another checkout The session's static server used one fixed port. Under xdist, the worker that started it stopped it when that worker finished, while other workers were still using it. Each worker now uses 8100 plus its number. A server already on the port was reused without checking what it served, so another checkout's build could stand in for this one. static_server.py now names its directory in an X-Served-From header, and the fixture fails with a clear message when that is not this checkout's _shinylive/.
schloerke
marked this pull request as draft
November 10, 2026 19:06
Contributor
Coverage report
Test suite run success342 tests passing in 20 suites. Report generated by 🧪jest coverage report action from e29d9c7 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on posit-dev/shinylive#273.
The
static_serverfixture served_shinylive/on one fixed port (8100) and reused any server it found already listening there. This caused two problems:gw0→ 8100,gw1→ 8101). Without xdist the port is still 8100.tests/static_server.pynow adds anX-Served-Fromheader with the folder it serves. The fixture reuses a running server only if that header matches this checkout's_shinylive/. Otherwise the test fails and names the port and the folder being served.A server you start by hand with
python tests/static_server.py 8100 _shinyliveis still reused. A plainpython -m http.serveris not, because it does not send the header.