Skip to content

Commit

Permalink
Updated GitHub Actions for recent EOL of Python 3.7 and 3.8, using Sa…
Browse files Browse the repository at this point in the history
…lt 3006.9 and 3007.1, also use of psutil.AccessDenied (#182)

* Updated GitHub Actions for recent EOL of Python 3.7 and 3.8, using Salt 3006.9 and 3007.1, also use of psutil.AccessDenied

* Added changelog and corrected ubuntu version

* Reduced nox version limitation back to original less than 2022.8.7

* Updated requirements and actions

* Adjust requirements versions

* Limit to Python 3.10, since that is the only version supported at the moment

* Altered requirments for pytest-shell-utilities to before psutil==6.0.0

* Updated pytest-shell-utilities version requirement

* More playing with requirement versions

* Limiting psutil to less than 6.0.0 to avoid net_connections issues

* Restricting to pytest-shell-utilities before support for psutil 6.0.0 and net_connections

* Remove macos and Salt 3007.1 testing, that is, as before Salt 3006 only
  • Loading branch information
dmurphy18 authored Oct 21, 2024
1 parent 8f2eaed commit 1e6169d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 35 deletions.
41 changes: 16 additions & 25 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
Linux-System-Service:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: Pre-Commit

timeout-minutes: 25
Expand Down Expand Up @@ -191,19 +191,16 @@ jobs:
max-parallel: 16
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
salt-version:
- "3006.0"
- "3007.0"
- "3006.9"

This comment has been minimized.

Copy link
@s0undt3ch

s0undt3ch Oct 22, 2024

Contributor

You will now always test with this specific version of Salt, instead of the latest minor version available.
Was this the intended behaviour?

- "3007.1"
pytest-version:
- "7.4.0"
- "8.0.0"
- "8.1.0"
exclude:
- {"salt-version": "3007.0", "python-version": "3.8"}
- {"salt-version": "3007.0", "python-version": "3.9"}
- "8.1.1"
- "8.2.0"
- "8.3.3"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -282,14 +279,15 @@ jobs:
max-parallel: 16
matrix:
python-version:
- "3.9"
- "3.10"
salt-version:
- "3006.0"
- "3006.9"
pytest-version:
- "7.4.0"
- "8.0.0"
- "8.1.0"
- "8.1.1"

This comment has been minimized.

Copy link
@s0undt3ch

s0undt3ch Oct 22, 2024

Contributor

Same here, now you will always test with this specific version of pytest and not the latest minor of the major defined here.

Was this intended?

This comment has been minimized.

Copy link
@dmurphy18

dmurphy18 Oct 22, 2024

Author Collaborator

Yeah it was, problem is connections vs net_connections and psutil version user by Salt is 5.8/5.9, need to update to 6.x. About to talk about it in Standup.
Wanted to get this PR in and through. Watch this space 🙄

- "8.2.0"
- "8.3.3"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -354,7 +352,7 @@ jobs:


Linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: Pre-Commit

timeout-minutes: 25
Expand All @@ -364,23 +362,16 @@ jobs:
max-parallel: 16
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
salt-version:
- "3006.0"
- "3007.0"
- "3006.9"
- "3007.1"
pytest-version:
- "7.4.0"
- "8.0.0"
- "8.1.0"
exclude:
- {"pytest-version": "8.0.0", "python-version": "3.7"}
- {"pytest-version": "8.1.0", "python-version": "3.7"}
- {"salt-version": "3007.0", "python-version": "3.7"}
- {"salt-version": "3007.0", "python-version": "3.8"}
- {"salt-version": "3007.0", "python-version": "3.9"}
- "8.1.1"
- "8.2.0"
- "8.3.3"

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions changelog/182.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated GitHub Actions for recent EOL of Python 3.7 and 3.8, using Salt 3006.9 and 3007.1, also use of psutil.AccessDenied
18 changes: 9 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
pytest>=7.0.0
attrs>=19.2.0
pytest-helpers-namespace>=2021.4.29
pytest-skip-markers>=1.1.3
pytest>=7.4.0
attrs>=22.2.0
pytest-helpers-namespace>=2021.12.29
pytest-skip-markers>=1.5.2
pytest-system-statistics>=1.0.2
pytest-shell-utilities>=1.4.0
psutil
pyyaml
pyzmq
msgpack>=0.5.2
pytest-shell-utilities<=1.9.0
psutil<6.0.0
pyyaml>=6.0.1
pyzmq>=20.0.0
msgpack>=1.0.2
virtualenv
2 changes: 1 addition & 1 deletion src/saltfactories/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def _terminate(self):
log.info("Stopping %s", self.factory)
pid = self.pid
# Collect any child processes information before terminating the process
with contextlib.suppress(psutil.NoSuchProcess):
with contextlib.suppress(psutil.NoSuchProcess, psutil.AccessDenied):
for child in psutil.Process(pid).children(recursive=True):
if child not in self._children: # pylint: disable=access-member-before-definition
self._children.append(child) # pylint: disable=access-member-before-definition
Expand Down

0 comments on commit 1e6169d

Please sign in to comment.