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

Add support for Solaris and illumos #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtelka
Copy link

@mtelka mtelka commented Jul 26, 2024

Test results with this change:

============================= test session starts ==============================
platform sunos5 -- Python 3.9.19, pytest-8.3.1, pluggy-1.5.0 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /data/builds/oi-userland/components/python/pytest-system-statistics/build/amd64-3.9
configfile: pytest.ini
testpaths: tests/
plugins: skip-markers-1.5.1, system-statistics-1.0.2
collecting ... collected 7 items

tests/functional/test_syststats.py::test_sys_stats_not_verbose PASSED    [ 14%]
tests/functional/test_syststats.py::test_sys_stats_not_verbose_enough PASSED [ 28%]
tests/functional/test_syststats.py::test_sys_stats_disabled PASSED       [ 42%]
tests/functional/test_syststats.py::test_basic_sys_stats PASSED          [ 57%]
tests/functional/test_syststats.py::test_basic_sys_stats_uss SKIPPED     [ 71%]
tests/functional/test_syststats.py::test_proc_sys_stats PASSED           [ 85%]
tests/functional/test_syststats.py::test_proc_sys_stats_no_children PASSED [100%]

========================= 6 passed, 1 skipped in 1.76s =========================

Fixes #7.

@mtelka mtelka requested a review from a team as a code owner July 26, 2024 10:09
@mtelka mtelka requested review from twangboy and removed request for a team July 26, 2024 10:09
@vmwclabot
Copy link

@mtelka, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

Copy link

@dwoz dwoz left a comment

Choose a reason for hiding this comment

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

Pre-commit needs to be fixed in order for this to get merged.

@dmurphy18
Copy link

dmurphy18 commented Sep 20, 2024

@mtelka FYI - no issue associated with this PR, which would help in identifying the problem being fixed. Given Salt Core dropped support for native minions Solaris 10 and 11 in 3005, wondering about this PR. Presume pip installing Salt on Solaris or Illumos, or equivalent. Also. note minimum Python version 3.10 is supported by 3006.x and above (work on going to get Py 3.12 support but unfinished). The docs stating that haven't been released yet due to staff leaving (months late on that)

@mtelka
Copy link
Author

mtelka commented Sep 21, 2024

This fixes #7.

We do have salt packaged for OpenIndiana. However I'm not sure how it works.

@twangboy
Copy link

Would you mind fixing the pre-commit failures please?

@mtelka
Copy link
Author

mtelka commented Sep 24, 2024

Would you mind fixing the pre-commit failures please?

Who? Me?

I'm very sorry, but I've no idea how to fix that. I do see two failures there:

Failure 1:

Check python modules for appropriate copyright headers.......................Failed
- hook id: check-copyright-headers
- files were modified by this hook

Updated the copyright header on .pre-commit-hooks/copyright-headers.py
Updated the copyright header on noxfile.py
Updated the copyright header on .pre-commit-hooks/check-changelog-entries.py
Updated the copyright header on src/pytestsysstats/__init__.py
Updated the copyright header on .pre-commit-hooks/sort-pylint-spelling-words.py
Updated the copyright header on setup.py
Updated the copyright header on docs/conf.py
Updated the copyright header on tests/functional/test_syststats.py
Updated the copyright header on src/pytestsysstats/plugin.py
Updated the copyright header on tests/conftest.py

This is something apparently not related to this change because it lists files that are not touched by this PR.

Failure 2:

black........................................................................Failed
- hook id: black
- exit code: 1

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repozy7ddl98/py_env-python3.9/bin/black", line 8, in <module>
    sys.exit(patched_main())
  File "/home/runner/.cache/pre-commit/repozy7ddl98/py_env-python3.9/lib/python3.9/site-packages/black/__init__.py", line 1372, in patched_main
    patch_click()
  File "/home/runner/.cache/pre-commit/repozy7ddl98/py_env-python3.9/lib/python3.9/site-packages/black/__init__.py", line 1358, in patch_click
    from click import _unicodefun
ImportError: cannot import name '_unicodefun' from 'click' (/home/runner/.cache/pre-commit/repozy7ddl98/py_env-python3.9/lib/python3.9/site-packages/click/__init__.py)

Again, I do not understand how is this related to my change.

So in short, it looks like both issues were there even before my PR.

@dmurphy18
Copy link

@mtelka Pre-commit failures are probably due to aging of the various pre-commit tests. Classic case of Software Rot over time. However Pottery Barn rules apply, touch and break it, you own it :D . Take it as an opportunity to learn.
Note, normally the Salt Core team would assist but with the recent reduction in size and for a platform no longer supported (Solaris), you should at least make the first attempt to get pre-commit working, if it helps I recently updated pre-commit for pytest-shell-utilities, that might be a good case for cut and paste, etc., at least for recent versions of tools used.

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.0.2: Testing fails on illumos
5 participants