Skip to content

fix: Fix xa11y integration tests to work on macOS with Github runners - #479

Merged
karthikbekalp merged 1 commit into
aws-deadline:mainlinefrom
karthikbekalp:xallyMacFix
Jul 9, 2026
Merged

fix: Fix xa11y integration tests to work on macOS with Github runners#479
karthikbekalp merged 1 commit into
aws-deadline:mainlinefrom
karthikbekalp:xallyMacFix

Conversation

@karthikbekalp

Copy link
Copy Markdown
Contributor

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.

@karthikbekalp
karthikbekalp requested a review from a team as a code owner July 9, 2026 21:09
@karthikbekalp
karthikbekalp enabled auto-merge (squash) July 9, 2026 21:10
@github-actions github-actions Bot added the waiting-on-maintainers Waiting on the maintainers to review. label Jul 9, 2026
Comment thread pipeline/setup-runner.py
def setup_macos(versions):
"""Install Cinema 4D on macOS for each version."""
for version in versions:
install_dir = C4D_INSTALL_PATHS[version]["macos"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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>
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@karthikbekalp
karthikbekalp merged commit 875ec01 into aws-deadline:mainline Jul 9, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-maintainers Waiting on the maintainers to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants