Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support macOS defaulting to spawn as the default multiprocessing method #57028

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3329d6f
Temporary logging is now shutdown when logging has been configured.
s0undt3ch May 1, 2022
4cdc354
Disable hack to force allowing forking on macOS
s0undt3ch Apr 12, 2022
8be6e99
Use the newer nox platforms file which installs Py3.9
s0undt3ch Mar 31, 2022
0e9387f
Support macOS defaulting to spawn as the default multiprocessing method
s0undt3ch Mar 20, 2022
ba6ea20
Remove unused attribute
s0undt3ch Apr 12, 2022
07723d7
Switch to ``salt.utils.platform.spawning_platform()``
s0undt3ch Feb 17, 2022
18c390b
Reconstruct client instances on spawning platforms
s0undt3ch Feb 17, 2022
903fb5f
Also skip this test for now on macOS
s0undt3ch Feb 9, 2022
d9503f8
Reconstruct the ``State`` class on spawned processes.
s0undt3ch Apr 12, 2022
136ecee
Force a reference to ``salt.ext.tornado.iostream.StreamClosedError`` …
s0undt3ch Apr 12, 2022
250b33b
Skip, for now, problematic tests on spawning platforms
s0undt3ch Feb 24, 2022
a58d85e
DeltaProxy minions do not work on spawning platforms
s0undt3ch Feb 25, 2022
f283ecd
Avoid a ``NameError`` when failing to initialize the process list
s0undt3ch Mar 20, 2022
5818584
Use Python 3.9 on macOS
s0undt3ch Apr 1, 2022
4fc116a
Drop requirements on Darwin for Py<3.9
s0undt3ch Apr 2, 2022
2ed3f30
Same test run timeout as windows
s0undt3ch Apr 3, 2022
7a058eb
Don't shell out! Access the database directly and properly escape val…
s0undt3ch Apr 7, 2022
8147c8b
Fixes for the new macOS Catalina and BigSur CICD images
s0undt3ch Apr 7, 2022
d9eab31
Migrate ``integration.modules.test_mac_pkgutil`` to PyTest and functi…
s0undt3ch Apr 8, 2022
4c41927
Add changelog for #57742
s0undt3ch Apr 12, 2022
0c67fb6
Add changelog entry.
s0undt3ch Apr 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,34 +139,6 @@ repos:
- --include=requirements/zeromq.txt
- requirements/static/pkg/freebsd.in

- id: pip-tools-compile
alias: compile-pkg-darwin-3.7-zmq-requirements
name: Darwin Packaging Py3.7 ZeroMQ Requirements
files: ^(requirements/((base|zeromq|crypto|darwin|pyobjc)\.txt|static/pkg/(darwin\.in|py3\.7/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.7
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --passthrough-line-from-input=^pyobjc(.*)$
- requirements/static/pkg/darwin.in

- id: pip-tools-compile
alias: compile-pkg-darwin-3.8-zmq-requirements
name: Darwin Packaging Py3.8 ZeroMQ Requirements
files: ^(requirements/((base|zeromq|crypto|darwin|pyobjc)\.txt|static/pkg/(darwin\.in|py3\.8/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.8
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --passthrough-line-from-input=^pyobjc(.*)$
- requirements/static/pkg/darwin.in

- id: pip-tools-compile
alias: compile-pkg-darwin-3.9-zmq-requirements
name: Darwin Packaging Py3.9 ZeroMQ Requirements
Expand Down Expand Up @@ -550,43 +522,6 @@ repos:
- --pip-args=--constraint=requirements/static/ci/py{py_version}/freebsd.txt
- requirements/static/ci/crypto.in


- id: pip-tools-compile
alias: compile-ci-darwin-py3.7-zmq-requirements
name: Darwin CI Py3.7 ZeroMQ Requirements
files: ^(pkg/osx/(req|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(darwin|common)\.in|pkg/py3\.7/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.7
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --include=requirements/pytest.txt
- --include=requirements/static/pkg/darwin.in
- --include=requirements/static/ci/common.in
- --passthrough-line-from-input=^pyobjc(.*)$
- --pip-args=--constraint=requirements/static/pkg/py{py_version}/darwin.txt
- requirements/static/ci/darwin.in

- id: pip-tools-compile
alias: compile-ci-darwin-py3.8-zmq-requirements
name: Darwin CI Py3.8 ZeroMQ Requirements
files: ^(pkg/osx/(req|req_pyobjc)\.txt|requirements/((base|zeromq|pytest)\.txt|static/((ci|pkg)/(darwin|common)\.in|pkg/py3\.8/darwin\.txt)))$
pass_filenames: false
args:
- -v
- --py-version=3.8
- --platform=darwin
- --include=requirements/darwin.txt
- --include=requirements/pyobjc.txt
- --include=requirements/pytest.txt
- --include=requirements/static/pkg/darwin.in
- --include=requirements/static/ci/common.in
- --passthrough-line-from-input=^pyobjc(.*)$
- --pip-args=--constraint=requirements/static/pkg/py{py_version}/darwin.txt
- requirements/static/ci/darwin.in

- id: pip-tools-compile
alias: compile-ci-darwin-py3.9-zmq-requirements
name: Darwin CI Py3.9 ZeroMQ Requirements
Expand Down Expand Up @@ -623,32 +558,6 @@ repos:
- --pip-args=--constraint=requirements/static/pkg/py{py_version}/darwin.txt
- requirements/static/ci/darwin.in

- id: pip-tools-compile
alias: compile-ci-darwin-crypto-py3.7-requirements
name: Darwin CI Py3.7 Crypto Requirements
files: ^requirements/(crypto\.txt|static/ci/(crypto\.in|py3\.7/darwin-crypto\.txt))$
pass_filenames: false
args:
- -v
- --py-version=3.7
- --platform=darwin
- --out-prefix=darwin
- --pip-args=--constraint=requirements/static/ci/py{py_version}/darwin.txt
- requirements/static/ci/crypto.in

- id: pip-tools-compile
alias: compile-ci-darwin-crypto-py3.8-requirements
name: Darwin CI Py3.8 Crypto Requirements
files: ^requirements/(crypto\.txt|static/ci/(crypto\.in|py3\.8/darwin-crypto\.txt))$
pass_filenames: false
args:
- -v
- --py-version=3.8
- --platform=darwin
- --out-prefix=darwin
- --pip-args=--constraint=requirements/static/ci/py{py_version}/darwin.txt
- requirements/static/ci/crypto.in

- id: pip-tools-compile
alias: compile-ci-darwin-crypto-py3.9-requirements
name: Darwin CI Py3.9 Crypto Requirements
Expand Down
1 change: 1 addition & 0 deletions changelog/55847.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Salt now correctly handles macOS after Py3.8 where python defaults to spawn instead of fork.
1 change: 1 addition & 0 deletions changelog/57742.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved the multiprocessing classes to better handle spawning platforms
1 change: 1 addition & 0 deletions changelog/60819.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The mac assistive execution module no longer shells out to change the database.
1 change: 1 addition & 0 deletions changelog/62005.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Temporary logging is now shutdown when logging has been configured.
5 changes: 3 additions & 2 deletions cicd/jenkins/pr-macosx-catalina-x86_64-py3-pytest
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ runTestSuite(
distro_arch: 'x86-64',
env: env,
jenkins_slave_label: 'kitchen-slave-mac',
kitchen_platforms_file: '/var/jenkins/workspace/pre-golden-platforms-new.yml',
kitchen_platforms_file: '/var/jenkins/workspace/pre-golden-platforms-new.3.9.yml',
nox_env_name: 'pytest-zeromq',
nox_passthrough_opts: '--ssh-tests',
python_version: 'py3',
testrun_timeout: 6,
testrun_timeout: 10,
use_spot_instances: false,
macos_python_version: '3.9',
)

// vim: ft=groovy
12 changes: 4 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def _run_with_coverage(session, *test_cmd, env=None):
# Instruct sub processes to also run under coverage
"COVERAGE_PROCESS_START": str(REPO_ROOT / ".coveragerc"),
},
**coverage_base_env
**coverage_base_env,
)

try:
Expand Down Expand Up @@ -746,10 +746,6 @@ def _pytest(session, coverage, cmd_args):
_create_ci_directories()

env = {"CI_RUN": "1" if CI_RUN else "0"}
if IS_DARWIN:
# Don't nuke our multiprocessing efforts objc!
# https://stackoverflow.com/questions/50168647/multiprocessing-causes-python-to-crash-and-gives-an-error-may-have-been-in-progr
env["OBJC_DISABLE_INITIALIZE_FORK_SAFETY"] = "YES"

if CI_RUN:
# We'll print out the collected tests on CI runs.
Expand All @@ -771,7 +767,7 @@ def _pytest(session, coverage, cmd_args):
"pytest",
"--showlocals",
*cmd_args,
env=env
env=env,
)
else:
session.run("python", "-m", "pytest", *cmd_args, env=env)
Expand All @@ -797,10 +793,10 @@ def _pytest(session, coverage, cmd_args):
"-m",
"pytest",
"--showlocals",
*cmd_args
*cmd_args,
)
else:
session.run("python", "-m", "pytest", *cmd_args, env=env)
session.run("python", "-m", "pytest", *cmd_args)
# pylint: enable=unreachable


Expand Down
10 changes: 0 additions & 10 deletions requirements/static/ci/py3.7/darwin-crypto.txt

This file was deleted.

Loading