Skip to content

macos unit tests: reduce parallelism, use Python 3.13#51469

Closed
alalazo wants to merge 8 commits intospack:developfrom
alalazo:qa/tweak-macos-config
Closed

macos unit tests: reduce parallelism, use Python 3.13#51469
alalazo wants to merge 8 commits intospack:developfrom
alalazo:qa/tweak-macos-config

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Oct 24, 2025

Currently, we are oversubscribing macos-latest runners by 1 cpu, and we are using all macos-15-intel CPUs. This commit wants to check if, using less parallelism, we could get faster unit tests in CI.

Also, bump Python from 3.11 to 3.13

@alalazo alalazo force-pushed the qa/tweak-macos-config branch from bb5b1ba to b792af6 Compare October 28, 2025 14:43
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Oct 28, 2025

Something about the slow macOS tests in CI:
Screenshot from 2025-10-28 18-30-06

We lose 35 sec. on one call to the built-in method _socket.gethostbyaddr 🤔

@alalazo alalazo force-pushed the qa/tweak-macos-config branch from fb0b1c2 to e54601c Compare October 28, 2025 22:38
@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Oct 29, 2025

For reference, removing socket.getfqdn improved the unit tests time on macOS:

It's another instance of #46554 that got in through the sbang hook in #47590. Since hooks are run on the child and on macOS the sub-processes are "spawned" (not "forked"), memoization doesn't help.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Oct 30, 2025

Another thing that is making our unit tests on macOS go extremely slow is spawning subprocesses for unit tests:
Screenshot from 2025-10-30 12-00-01

We should avoid subprocesses in general in unit tests. I'll experiment with creating a MockBuildTask that doesn't use subprocesses for unit tests.

Currently, we are oversubscribing macos-latest runners by 1 cpu, and we
are using all macos-15-intel CPUs. This commit wants to check if, using
less parallelism, we could get faster unit tests in CI.

Also, bump Python from 3.11 to 3.13

Signed-off-by: Massimiliano Culpo <[email protected]>
FakeBuildTask doesn't spawn

Signed-off-by: Massimiliano Culpo <[email protected]>
@alalazo alalazo force-pushed the qa/tweak-macos-config branch from 9f8452c to ff43d4e Compare October 30, 2025 22:00
Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Massimiliano Culpo <[email protected]>
Signed-off-by: Massimiliano Culpo <[email protected]>
@alalazo alalazo closed this Nov 28, 2025
@alalazo alalazo deleted the qa/tweak-macos-config branch November 28, 2025 09:50
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.

1 participant