Commit graph

192 commits

Author SHA1 Message Date
Pedro Algarvio
4685930906 Stop compiling Py3.5 and Py3.6 requirements for Darwin 2021-05-05 06:48:41 -07:00
Pedro Algarvio
dfd5bea279 Stop compiling Py3.5 and Py3.6 requirements for FreeBSD 2021-05-05 06:48:41 -07:00
Pedro Algarvio
a6f0810c68 Add Py3.10 requirements.
Fixes #59452
2021-05-05 06:48:41 -07:00
Pedro Algarvio
5f59dcf1b8 Update to the newer pip-tools-compile-impersonate 2021-05-05 06:48:41 -07:00
Megan Wilhite
66cf74140b
Merge Freeze into Master (#60074)
* Merge 3002.6 bugfix changes (#59822)

* Pass `CI_RUN` as an environment variable to the test run.

This allows us to know if we're running the test suite under a CI
environment or not and adapt/adjust if needed

* Migrate `unit.setup` to PyTest

* Backport ae36b15 just for test_install.py

* Only skip tests on CI runs

* Always store git sha in _version.py during installation

* Fix PEP440 compliance.

The wheel metadata version 1.2 states that the package version MUST be
PEP440 compliant.

This means that instead of `3002.2-511-g033c53eccb`, the salt version
string should look like `3002.2+511.g033c53eccb`, a post release of
`3002.2` ahead by 511 commits with the git sha `033c53eccb`

* Fix and migrate `tests/unit/test_version.py` to PyTest

* Skip test if `easy_install` is not available

* We also need to be PEP440 compliant when there's no git history

* Allow extra_filerefs as sanitized kwargs for SSH client

* Fix regression on cmd.run when passing tuples as cmd

Co-authored-by: Alexander Graul <agraul@suse.com>

* Add unit tests to ensure cmd.run accepts tuples

* Add unit test to check for extra_filerefs on SSH opts

* Add changelog file

* Fix comment for test case

* Fix unit test to avoid failing on Windows

* Skip failing test on windows

* Fix test to work on Windows

* Add all ssh kwargs to sanitize_kwargs method

* Run pre-commit

* Fix pylint

* Fix cmdmod loglevel and module_names tests

* Fix pre-commit

* Skip ssh tests if binary does not exist

* Use setup_loader for cmdmod test

* Prevent argument injection in restartcheck

* Add changelog for restartcheck fix

* docs_3002.6

* Add back tests removed in merge

Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>
Co-authored-by: Bryce Larson <brycel@vmware.com>
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
Co-authored-by: Alexander Graul <agraul@suse.com>
Co-authored-by: Frode Gundersen <fgundersen@saltstack.com>

* Remove glance state module in favor of glance_image

* update wording in changelog

* bump deprecation warning to Silicon.

* Updating warnutil version to Phosphorous.

* Update salt/modules/keystone.py

Co-authored-by: Megan Wilhite <megan.wilhite@gmail.com>

* Check $HOMEBREW_PREFIX when linking against libcrypto

When loading `libcrypto`, Salt checks for a Homebrew installation of `openssl`
at Homebrew's default prefix of `/usr/local`. However, on Apple Silicon Macs,
Homebrew's default installation prefix is `/opt/homebrew`. On all platforms,
the prefix is configurable.  If Salt doesn't find one of those `libcrypto`s,
it will fall back on the un-versioned `/usr/lib/libcrypto.dylib`, which will
cause the following crash:

    Application Specific Information:
    /usr/lib/libcrypto.dylib
    abort() called
    Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.

This commit checks $HOMEBREW_PREFIX instead of hard-coding `/usr/local`.

* Add test case

* Add changelog for 59808

* Add changelog entry

* Make _find_libcrypto fail on Big Sur if it can't find a library

Right now, if `_find_libcrypto` can't find any externally-managed versions of
libcrypto, it will fall back on the pre-Catalina un-versioned system libcrypto.
This does not exist on Big Sur and it would be better to raise an exception
here rather than crashing later when trying to open it.

* Update _find_libcrypto tests

This commit simplifies the unit tests for _find_libcrypto by mocking out the
host's filesystem and testing the common libcrypto installations (brew, ports,
etc.) on Big Sur. It simplifies the tests for falling back on system versions
of libcrypto on previous versions of macOS.

* Fix description of test_find_libcrypto_with_system_before_catalina

* Patch sys.platform for test_rsax931 tests

* modules/match: add missing "minion_id" in Pillar example

The documented Pillar example for `match.filter_by` lacks the `minion_id` parameter. Without it, the assignment won't work as expected.
- fix documentation
- add tests:
  - to prove the misbehavior of the documented example
  - to prove the proper behaviour when supplying `minion_id`
  - to ensure some misbehaviour observed with compound matchers doesn't occur

* Fix for issue #59773

- When instantiating the loader grab values of grains and pillars if
  they are NamedLoaderContext instances.
- The loader uses a copy of opts.
- Impliment deepcopy on NamedLoaderContext instances.

* Add changelog for #59773

* _get_initial_pillar function returns pillar

* Fix linter issues

* Clean up test

* Bump deprecation release for neutron

* Uncomment Sulfur release name

* Removing the _ext_nodes deprecation warning and alias.

* Adding changelog.

* Renaming changelog file.

* Update 59804.removed

* Initial pass at fips_mode config option

* Fix pre-commit

* Fix tests and add changelog

* update docs 3003

* update docs 3003 - newline

* Fix warts in changelog

* update releasenotes 3003

* add ubuntu-2004-amd64 m2crypto pycryptodome and tcp tests

* add distro_arch

* changing the cloud platforms file missed in 1a9b7be0e2

* Update __utils__ calls to import utils in azure

* Add changelog for 59744

* Fix azure unit tests and move to pytest

* Use contextvars from site-packages for thin

If a contextvars package exists one of the site-packages locations use
it for the generated thin tarball. This overrides python's builtin
contextvars and allows salt-ssh to work with python <=3.6 even when the
master's python is >3.6 (Fixes #59942)

* Add regression test for #59942

* Add changelog for #59942

* Update filemap to include test_py_versions

* Fix broken thin tests

* Always install the `contextvars` backport, even on Py3.7+

Without this change, salt-ssh cannot target systems with Python <= 3.6

* Use salt-factories to handle the container. Don't override default roster

* Fix thin tests on windows

* No need to use warn log level here

* Fix getsitepackages for old virtualenv versions

* Add explicit pyobjc reqs

* Add back the passthrough stuff

* Remove a line so pre-commit will run

* Bugfix release docs

* Bugfix release docs

* Removing pip-compile log files

* Fix failing test tests.unit.grains.test_core.CoreGrainsTestCase.test_xen_virtual

* Fix pre-commit for docs.txt reqs

Co-authored-by: Daniel Wozniak <dwozniak@saltstack.com>
Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
Co-authored-by: Bryce Larson <brycel@vmware.com>
Co-authored-by: Pablo Suárez Hernández <psuarezhernandez@suse.com>
Co-authored-by: Alexander Graul <agraul@suse.com>
Co-authored-by: Frode Gundersen <fgundersen@saltstack.com>
Co-authored-by: Gareth J. Greenaway <gareth@saltstack.com>
Co-authored-by: Gareth J. Greenaway <gareth@wiked.org>
Co-authored-by: Hoa-Long Tam <hoalong@apple.com>
Co-authored-by: krionbsd <krion@freebsd.org>
Co-authored-by: Elias Probst <e.probst@ssc-services.de>
Co-authored-by: Daniel A. Wozniak <dwozniak@vmware.com>
Co-authored-by: Frode Gundersen <frogunder@gmail.com>
Co-authored-by: twangboy <slee@saltstack.com>
Co-authored-by: twangboy <leesh@vmware.com>
Co-authored-by: ScriptAutomate <derek@icanteven.io>
2021-04-27 11:47:47 -04:00
ScriptAutomate
ebda3b729c linux.in instead of common.in for docs deps 2021-03-19 06:30:57 -04:00
ScriptAutomate
883c939b6b Adding linux.txt pkg req files for triggers 2021-03-19 06:30:57 -04:00
ScriptAutomate
5653dc9f29 Update docs to use pkg linux reqs 2021-03-19 06:30:57 -04:00
ScriptAutomate
72fc8b7e64 Update docs deps to include linux deps 2021-03-19 06:30:57 -04:00
Pedro Algarvio
9ccea8a7a4 Fix bandit skip for the test suite 2021-03-04 09:04:47 +00:00
Pedro Algarvio
fbdd6478d1 Bandit does not read .bandit when files are passed.
See https://github.com/PyCQA/bandit/issues/332
2021-03-03 06:21:53 -05:00
Pedro Algarvio
d16ab08a4d Start checking the salt code base with bandit 2021-03-03 06:21:53 -05:00
Pedro Algarvio
b76442e8f3
Merge remote-tracking branch 'upstream/3002.4' 2021-02-25 17:31:33 +00:00
Pedro Algarvio
eefd5bd835 Only support Py3.6+ for Windows 2021-02-23 12:49:10 -05:00
Pedro Algarvio
2ae5defa38 Upgrade included ipaddress.py from Python 3.9.1 2021-02-19 08:35:12 -05:00
Pedro Algarvio
460a658515 salt-rewrite can now run on the whole test suite 2021-02-03 13:15:24 +00:00
Pedro Algarvio
dd40c41194 Only depend on the top level pyobjc requirement.
This was requested by the macOS team.

Refs https://github.com/saltstack/salt/issues/59023
2021-02-03 10:28:56 +00:00
Megan Wilhite
46cd3263f9 Validate vmware module defaults to verifying SSL 2021-01-22 14:32:16 -07:00
Pedro Algarvio
65fdf388f9 Add salt-rewrite to pre-commit hooks 2021-01-19 14:51:30 +00:00
Pedro Algarvio
6b942545af Concentrate common requirements in a single .in file 2021-01-13 11:25:46 +00:00
Pedro Algarvio
feda66c226 Bump remove-import-headers pre-commit hook to 1.1.0 2021-01-12 11:35:23 +00:00
Pedro Algarvio
ed4b34525a Fix the filemap checks 2020-12-04 07:44:52 +00:00
Pedro Algarvio
e4188e7a9f Add hook to check for badly named changelog entries 2020-10-19 16:21:55 +01:00
Pedro Algarvio
b427688048 Start checking rst files at pre-commit level with rstcheck
Additionally, fixed most of the errors reported by rstcheck.

Fixes https://github.com/saltstack/salt/issues/58668
2020-10-13 13:53:16 -07:00
Pedro Algarvio
12f7e06720 Even more complete static requirements regexes 2020-10-13 03:12:57 +01:00
Pedro Algarvio
7e7cbf3ffa
Switch to the remove-import-headers pre-commit hook 2020-10-07 10:46:20 +01:00
Pedro Algarvio
0cbc264fe1
Fix pre-commit pip-tools-compile regexes 2020-10-04 21:35:07 +01:00
Pedro Algarvio
49556caf05
Rework static requirements. Darwin and Windows packaging are now also static.
Refs https://github.com/saltstack/release-planning/issues/238
2020-09-30 09:31:49 +01:00
Pedro Algarvio
67b25add12
Add packaging static requirements 2020-09-30 09:31:49 +01:00
Pedro Algarvio
7efd60131b
Move CI static requirements to it's own subdirectory 2020-09-30 09:31:48 +01:00
Pedro Algarvio
65e12043eb Automatically remove import comments on files.
This is desired because now imports are automatically sorted and these
header comments often get misplaced.

Fixes #57979
2020-09-24 13:47:43 -07:00
Pedro Algarvio
e58f38f879 Update pre-commit from nox-py2 to nox
Fixes #58522
2020-09-24 13:47:43 -07:00
Pedro Algarvio
fe2b02ac7c
Revert "Bump black to version 20.8b1"
This reverts commit e22fa636f5.
2020-09-01 10:31:14 +01:00
Pedro Algarvio
cd9a439ce5 Bump black to version 20.8b1 2020-08-31 13:34:59 -07:00
Pedro Algarvio
cf391a2cdf Start upgrading codebase to Py3 for every changed file 2020-07-28 15:25:33 -07:00
Pedro Algarvio
5e72e192f9 Blacken docs 2020-06-09 03:37:02 -07:00
Pedro Algarvio
3cd6042b93 Fix macOS static requirements 2020-06-08 17:37:03 -07:00
Pedro Algarvio
fb2893536e Support FreeBSD static requirements 2020-06-04 09:44:00 -07:00
Pedro Algarvio
e6e1ab3ef6 Add task to check tests/filename_map.yml validity 2020-05-19 10:18:24 -07:00
ch3ll
c87642181e add towncrier to manage changelog 2020-05-07 16:22:31 -07:00
Pedro Algarvio
6a4703146c
Replace tests/unit/test_doc.py with a pre-commit hook.
We don't need to test docs on all platforms. In turn, we make the check
a pre-commit hook which seems more suited.
2020-04-23 20:01:05 +01:00
Pedro Algarvio
a5b9961f78
Lay the ground for invoke usage 2020-04-23 18:42:47 +01:00
Pedro Algarvio
cc8c3f09c6
Update static requirements to include Py3.8 and Py3.9 (except windows)
Windows required package pywin32 doesn't state that it support any
python version above Py3.7
2020-04-22 12:26:21 +01:00
ch3ll
2586f716b2
Revert "add towncrier to manage changelog"
This reverts commit 57d160cc60.
2020-04-20 09:34:36 -04:00
ch3ll
57d160cc60
add towncrier to manage changelog 2020-04-16 17:04:49 -04:00
Felippe Burk
0cf809a3c3
adding saltstack-internal tag to get perms right 2020-04-14 11:23:56 -06:00
Daniel Wozniak
6ed2bd8c80
Merge pull request #56601 from s0undt3ch/hotfix/drop-py2-builds
Drop static requirements for Sodium unsupported versions
2020-04-10 13:38:57 -07:00
Wayne Werner
7d42fee94a
Fix toml file 2020-04-10 14:52:32 -05:00
Wayne Werner
cf0c6c5d65
Back to .isort.cfg
At least until version 5 of isort is actually released.
2020-04-10 09:10:05 -05:00
Pedro Algarvio
68c90783f8
Drop static requirements for Sodium unsupported versions 2020-04-10 10:04:51 +01:00