Skip to content

Harden local runner for Windows#188

Open
krystophny wants to merge 2 commits into
masterfrom
issue-140-windows-runner-defaults
Open

Harden local runner for Windows#188
krystophny wants to merge 2 commits into
masterfrom
issue-140-windows-runner-defaults

Conversation

@krystophny

Copy link
Copy Markdown
Collaborator

Summary

  • use local + zeromq as Windows run defaults instead of fork + memmap
  • fall back from os.sched_getaffinity to os.cpu_count when CPU affinity is unavailable
  • make forked workers spawn/forkserver-safe by using a top-level worker target and loading includes in the child
  • fall back to a Python worker command when the profit-worker console script is not installed
  • copy template symlink targets when symlink copying is not supported
  • document the native Windows run configuration

Fixes #140

Verification

Test fails on main

$ python -m pytest tests/unit_tests/run/test_runner.py::test_runner -q
_pickle.PicklingError: Can't pickle local object ... ForkRunner.spawn.<locals>.work

Test passes after fix

$ python -m pytest tests/unit_tests/config/test_config.py::test_platform_run_defaults tests/unit_tests/run/test_runner.py::test_available_cpus_without_sched_getaffinity tests/unit_tests/run/test_runner.py::test_local_runner_falls_back_to_python_worker tests/unit_tests/run/test_runner.py::test_runner tests/unit_tests/run/test_command.py::test_template_copies_symlink_targets_on_windows -q
6 passed, 1 skipped, 1 warning in 1.48s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check Windows installation

1 participant