Repository navigation
Windows: real WSL distro for xtask builds, cancellable pull reads, honor Connection: close (#225) - #259
Windows: real WSL distro for xtask builds, cancellable pull reads, honor Connection: close (#225)#259paopaonyapi-creator wants to merge 1 commit into
Conversation
|
Test evidence from the Windows machine the fixes were made on (Windows 11 Pro x64, WSL2 Ubuntu 24.04, Docker Desktop installed alongside):
|
fe4ddc9 to
bc2bf3b
Compare
|
Thanks @paopaonyapi-creator. This bundles three separate changes, and one of them overlaps with #198:
Please also sign the commits; the repo only merges signed commits. Thanks for the work here. |
A blocking Winsock recv is not reliably woken by another thread's shutdown, so the upstream cancellation tests hang on Windows. Inside a cancellable pull on Windows, await_input now runs the socket nonblocking and polls the cancel switch every 100 ms; ureq's real read budget is preserved (a slow 400 ms header delay no longer aborts a pull - a new test covers a slow-data response keeping its budget). Linux and non-cancellable paths are unchanged. - cargo test -p kiri-image --lib: 42 passed (incl. 3 new tests) - cargo test -p kiri-win --bin kiri-win: 136 passed Split out of libracoder#259 at maintainer request: review the kiri-image change on its own; the xtask WSL distro selection half follows as a separate PR. The api.rs Connection: close hunk was removed - libracoder#198 covers it.
bc2bf3b to
99a3412
Compare
|
Done — split as requested:
All gates re-run on the rebased branches before pushing:
Both commits are now signed (ssh ed25519). Thanks for the quick review. |
Include the attributed public Kiri #259 adaptation and real socket/HTTP regressions. The combined Platform candidate now runs all image tests on Windows as well as macOS and Linux. Public source: libracoder/kiri#259 Source commit: 99a341254a85cb6b9f6c0f1e3c6f755a471632a2 Asagiri input: 74a46d1 Local image tests: 79 passed on Rust 1.99.1. Full native Windows qualification remains required before the combined candidate can merge. Signed-off-by: Andre Kurait <akurait@amazon.com>
A blocking Winsock recv is not reliably woken by another thread's shutdown, so the upstream cancellation tests hang on Windows. Inside a cancellable pull on Windows, await_input now runs the socket nonblocking and polls the cancel switch every 100 ms; ureq's real read budget is preserved (a slow 400 ms header delay no longer aborts a pull - a new test covers a slow-data response keeping its budget). Linux and non-cancellable paths are unchanged. - cargo test -p kiri-image --lib: 42 passed (incl. 3 new tests) - cargo test -p kiri-win --bin kiri-win: 136 passed Split out of libracoder#259 at maintainer request: review the kiri-image change on its own; the xtask WSL distro selection half follows as a separate PR. The api.rs Connection: close hunk was removed - libracoder#198 covers it.
99a3412 to
1cea832
Compare
On machines with Docker Desktop, wsl -l -q starts with docker-desktop and the build failed with exit 127: the internal distro cannot run bash. After 0.2.1 the machine also has Kiri's own busybox-like kiri distro, which has no bash either. choose_wsl_distro now skips docker-desktop* and kiri, with KIRI_WSL_DISTRO as an explicit override; wslpath and the two build scripts are scoped to the chosen distro instead of always running in the default one. 6 unit tests cover the selection and argument scoping; cargo test -p xtask --bin xtask: 6 passed. Split out of libracoder#259 at maintainer request, so the kiri-image cancellation change and this build change can be reviewed and tested separately.
|
@paopaonyapi-creator thanks for this PR. Before it can be reviewed and merged, every commit needs to be signed. GitHub shows these as unsigned: 1cea832. Please sign them (GPG or SSH, with the key added to your GitHub account as a signing key), then force-push. GitHub's guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits |
A blocking Winsock recv is not reliably woken by another thread's shutdown, so the upstream cancellation tests hang on Windows. Inside a cancellable pull on Windows, await_input now runs the socket nonblocking and polls the cancel switch every 100 ms; ureq's real read budget is preserved (a slow 400 ms header delay no longer aborts a pull - a new test covers a slow-data response keeping its budget). Linux and non-cancellable paths are unchanged. - cargo test -p kiri-image --lib: 42 passed (incl. 3 new tests) - cargo test -p kiri-win --bin kiri-win: 136 passed Split out of libracoder#259 at maintainer request: review the kiri-image change on its own; the xtask WSL distro selection half follows as a separate PR. The api.rs Connection: close hunk was removed - libracoder#198 covers it.
1cea832 to
244a0e8
Compare
On machines with Docker Desktop, wsl -l -q starts with docker-desktop and the build failed with exit 127: the internal distro cannot run bash. After 0.2.1 the machine also has Kiri's own busybox-like kiri distro, which has no bash either. choose_wsl_distro now skips docker-desktop* and kiri, with KIRI_WSL_DISTRO as an explicit override; wslpath and the two build scripts are scoped to the chosen distro instead of always running in the default one. 6 unit tests cover the selection and argument scoping; cargo test -p xtask --bin xtask: 6 passed. Split out of libracoder#259 at maintainer request, so the kiri-image cancellation change and this build change can be reviewed and tested separately.
A blocking Winsock recv is not reliably woken by another thread's shutdown, so the upstream cancellation tests hang on Windows. Inside a cancellable pull on Windows, await_input now runs the socket nonblocking and polls the cancel switch every 100 ms; ureq's real read budget is preserved (a slow 400 ms header delay no longer aborts a pull - a new test covers a slow-data response keeping its budget). Linux and non-cancellable paths are unchanged. - cargo test -p kiri-image --lib: 42 passed (incl. 3 new tests) - cargo test -p kiri-win --bin kiri-win: 136 passed Split out of libracoder#259 at maintainer request: review the kiri-image change on its own; the xtask WSL distro selection half follows as a separate PR. The api.rs Connection: close hunk was removed - libracoder#198 covers it.
244a0e8 to
eb03972
Compare
Windows build + cancellation fixes, and honor client-sent Connection: close (#225)
Two independent fixes, both found by running the repo on a real Windows 11 x64 machine (Windows 11 Pro, WSL2, Ubuntu 24.04):
1.
cargo xtask windows-devpicked Docker Desktop's internal WSL distroOn a machine where Docker Desktop is installed,
wsl -l -qstarts withdocker-desktop, and the build failed with exit 127 (bash: Permission denied— the internal distro can't run it). After 0.2.1 the machine also has Kiri's own busybox-likekiridistro, which has no bash either.choose_wsl_distronow skipsdocker-desktop*and Kiri's ownkiridistro, withKIRI_WSL_DISTROas an explicit overridewslpathand the two build scripts are scoped to the chosen distro (they used to run in the default distro, so even a correct script path could break)2. Cancellable registry reads hung on Windows
The two upstream tests
cancel::tests::cancel_ends_a_read_that_is_waitingandregistry::tests::a_cancelled_download_stops_at_once_and_leaves_nothingfail on Windows (120 s / 5 s sleeps): a blocking Winsockrecvis not reliably woken by another thread'sshutdown.await_inputruns the socket nonblocking and polls the cancel switch every 100 ms; ureq's real read budget is preserved (a slow 400 ms header delay no longer aborts a pull — a new testa_cancellable_download_keeps_its_read_budget_for_slow_datacovers exactly that)kiri-image42/42 on Windows3. Honor a client-sent
Connection: close(upstream #225)Reproduced exactly per the issue on the named pipe:
POST /containers/x/startwithConnection: closeanswers a body-less 204 and then never closes — Docker.DotNet / Testcontainers for .NET wait for EOF and hang.serve()now stops serving after such a request; the repro that stuck >6 s sees EOF after 22 ms. The docker CLI and the rest of the API are unaffected.Testing
cargo test -p kiri-image --lib: 42 passed (incl. 3 new tests)cargo test -p xtask: 6 passed (5 new)cargo test -p kiri-win: 136 passed\\.\pipe\kirion the fixed engine: pull/run/exec/logs/stop/rm/volumes/networks/compose all green; SOAK of 100docker runcycles: 100/100, no leaked containers or build cacheBuilds from this branch:
cargo xtask windows-devcompletes on Windows where main failed, and a WiX 6 MSI built from it installs and upgrades a stock 0.2.0 install in place.