Skip to content

Commit a976f44

Browse files
author
Daniel A. Wozniak
committed
Fix process and file descriptor leaks in Salt Master
Ensure proper resource lifecycle management and process reaping to resolve leaks introduced between 3006.20 and 3006.25. - Call wait() after kill() in TimedProc to prevent zombie processes. - Implement context manager protocol and destroy() in SaltEvent, RunnerClient, WheelClient, and MasterMinion. - Update masterapi.py to ensure RunnerClient is used within a with statement. - Explicitly destroy persistent objects in RemoteFuncs and LocalFuncs during teardown. - Initialize internal attributes to None and fix variable scope issues to achieve 10/10 pylint rating.
1 parent 2005c7b commit a976f44

28 files changed

Lines changed: 342 additions & 33 deletions

.pre-commit-config.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,7 @@ repos:
23932393
name: Lint Salt
23942394
entry: bash -c 'env -u NOX_FORCE_COLOR -u NOX_NO_COLOR -u FORCE_COLOR -u NO_COLOR nox "$@"' --
23952395
language: python
2396+
language_version: python3.10
23962397
files: ^((setup|noxfile)|(salt|tools)/.*)\.py$
23972398
exclude: >
23982399
(?x)^(
@@ -2405,22 +2406,25 @@ repos:
24052406
- --
24062407
additional_dependencies:
24072408
- nox==2022.11.21
2408-
- setuptools<58.0
2409-
- pip>=20.2.4,<21.2
2409+
- setuptools
2410+
- pip
2411+
24102412

24112413
- repo: local
24122414
hooks:
24132415
- id: lint-tests
24142416
name: Lint Tests
24152417
entry: bash -c 'env -u NOX_FORCE_COLOR -u NOX_NO_COLOR -u FORCE_COLOR -u NO_COLOR nox "$@"' --
24162418
language: python
2419+
language_version: python3.10
24172420
files: ^tests/.*\.py$
24182421
args:
24192422
- -e
24202423
- lint-tests-pre-commit
24212424
- --
24222425
additional_dependencies:
24232426
- nox==2022.11.21
2424-
- setuptools<58.0
2425-
- pip>=20.2.4,<21.2
2427+
- setuptools
2428+
- pip
2429+
24262430
# <---- Pre-Commit -------------------------------------------------------------------------------------------------
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=macos --python-version=3.10 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.10/darwin-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --universal --python-version=3.10 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.10/freebsd-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=linux --python-version=3.10 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.10/linux-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=windows --python-version=3.10 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.10/windows-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=macos --python-version=3.11 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.11/darwin-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --universal --python-version=3.11 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.11/freebsd-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=linux --python-version=3.11 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.11/linux-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=windows --python-version=3.11 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.11/windows-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile requirements/static/ci/crypto.in --python-platform=macos --python-version=3.12 --constraint requirements/constraints.txt --no-emit-index-url -o=requirements/static/ci/py3.12/darwin-crypto.in
3+
m2crypto==0.48.0
4+
# via -r requirements/static/ci/crypto.in
5+
packaging==26.2
6+
# via m2crypto
7+
pycryptodome==3.23.0
8+
# via -r requirements/static/ci/crypto.in

0 commit comments

Comments
 (0)