fix: Fix xa11y integration tests to work on macOS with Github runners - #479
Conversation
4fdbb54 to
1d00bc2
Compare
1d00bc2 to
c05db01
Compare
| def setup_macos(versions): | ||
| """Install Cinema 4D on macOS for each version.""" | ||
| for version in versions: | ||
| install_dir = C4D_INSTALL_PATHS[version]["macos"] |
There was a problem hiding this comment.
setup_macos accesses C4D_INSTALL_PATHS[version]["macos"] on this line, but C4D_INSTALL_PATHS["2025"] only defines a "windows" key (macOS was added only for "2026"). Calling setup_macos(["2025"]) therefore raises KeyError: "macos" here — before the graceful if "macos" not in C4D_INSTALLERS.get(version, {}) guard on line 191 can report a clean error. Either add a "macos" entry to C4D_INSTALL_PATHS["2025"], or use .get() and validate the install path up front alongside the installer check.
c05db01 to
bda5c4d
Compare
Run the mock Deadline server via subprocess.Popen instead of multiprocessing.spawn: macOS Apple Silicon GitHub runners hang during spawn (botocore service-model loading triggers Gatekeeper scanning in the fresh spawn context). The server still runs in its own process so it has an independent GIL and keeps serving while xa11y native waits hold the GIL on the test side. - _run_server.py: new standalone server entrypoint launched by Popen. - server_process.py: switch MockServerProcess from multiprocessing to subprocess.Popen; read base_url from the child's stdout. - deadline.py: drop stale threading-server comment. - utils.py: use rsplit so GitHub Actions paths that repeat the repo name (.../deadline-cloud-for-cinema-4d/deadline-cloud-for-cinema-4d/) resolve the job-bundle prefix correctly. Signed-off-by: Karthik Bekal Pattathana <133984042+karthikbekalp@users.noreply.github.com>
bda5c4d to
20bb70e
Compare
| if self._proc is not None and self._proc.poll() is None: | ||
| self._proc.terminate() | ||
| self._proc.join(timeout=5) | ||
| self._proc.wait(timeout=5) |
There was a problem hiding this comment.
subprocess.Popen.wait(timeout=5) raises subprocess.TimeoutExpired if the child does not exit within 5s, unlike the previous multiprocessing join(timeout=5), which returned silently. If a terminated child hangs during shutdown, this now propagates out of stop() (and __exit__), and self._proc = None on the next line is skipped, leaving the process orphaned and un-reaped. Consider wrapping the wait and force-killing on timeout, e.g.:
self._proc.terminate()
try:
self._proc.wait(timeout=5)
except subprocess.TimeoutExpired:
self._proc.kill()
self._proc.wait(timeout=5)
What was the problem/requirement? (What/Why)
Running integration tests on Mac Github runners used to hang.
What was the solution? (How)
Run the mock Deadline server via subprocess.Popen instead of multiprocessing.spawn: macOS Apple Silicon GitHub runners hang during spawn (botocore service-model loading triggers Gatekeeper scanning in the fresh spawn context). The server still runs in its own process so it has an independent GIL and keeps serving while xa11y native waits hold the GIL on the test side.
What is the impact of this change?
We can run on Mac Github runners.
How was this change tested?
Ran the tests locally in my fork.
Was this change documented?
Test changes, no customer impact.
Is this a breaking change?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.