Commit Graph

410 Commits (dc3c88be8bbe10d6e206eafc8471a94e84108947)

Author SHA1 Message Date
Matt Clay dc3c88be8b
Remove unused integration test support files (#80081)
* Remove unused integration test support files
* Remove obsolete ignores

ci_complete
ci_coverage
1 year ago
Matt Clay 086046d478
Remove unused network test support files (#80080)
* Remove unused network test support files

* Remove obsolete ignores
1 year ago
Matt Clay 117cf0a44b
ansible-test - Disable the pep8 E203 rule (#79966)
The `E203` rule in `pycodestyle` is not fully PEP 8 compliant.
Disabling it provides compatibility with the output of the `black` code formatter.
1 year ago
Matt Clay 10bc8af5a2
ansible-test - Remove auto format pylint rule (#79985) 1 year ago
Matt Clay 497d296ed6
Enable pylint rules to detect pointless statements (#79944)
Also instruct `git blame` to ignore the commit used to convert pointless strings to comments.
1 year ago
Matt Clay e658995760
ansible-test - Enable pylint unused-import for core (#79910) 1 year ago
Matt Clay 4706af58ab
ansible-test - Enable trailing-comma-tuple pylint rule (#79909) 1 year ago
Matt Clay 0a53309f47
ansible-test - Update pylint to 2.16.0 (#79878) 1 year ago
Matt Clay c33c8cf086
Remove unused and unreachable unit test code (#79854) 1 year ago
Matt Clay 27cd5e77d8
Update mypy and its dependencies. (#79812)
* Update mypy and its dependencies.

* Fix requirements.

* Remove unnecessary matching constraints.
1 year ago
Matt Davis 1424484be0
Prevent stdio deadlock in forked children (#79522)
* background threads writing to stdout/stderr can cause children to deadlock if a thread in the parent holds the internal lock on the BufferedWriter wrapper
* prevent writes to std handles during fork by monkeypatching stdout/stderr during display startup to require a mutex lock with fork(); this ensures no background threads can hold the lock during a fork operation
* add integration test that fails reliably on Linux without this fix
2 years ago
Christian Loos f79a54ae22
Update vendored distro (#79227)
Commit bb35d41 in branch python2.7-support from 2022-10-10:
https://github.com/python-distro/distro/commit/bb35d41
2 years ago
Louis Mandel 0ae963a311
Add missing type to the `reference` option of the documentation of the `git` module (#79305)
* Add missing type to the `reference` option of the `git` module

* No more doc-missing-type error in validate-modules
2 years ago
Felix Fontein 6e379e5d65
validate-modules: do not treat falsy non-`False` defaults as `None` (#79267)
* Do not treat falsy non-False defaults as None.

* Fix various instances of this in modules.

* Add changelog fragment.
2 years ago
Matt Clay 69ceb31600
ansible-test - Update sanity test requirements. (#78528) 2 years ago
Matt Clay 135f95fb2f
Split up ansible-test integration tests. (#78520)
* Relocate venv-pythons.py script.

* Split out unsupported-directory test.

* Split out sanity-import test.

* Split out sanity-validate-modules test.

* Split out units test.

* Split out integration test.

* Split out units-constraints test.

* Split out integration-constraints test.

* Split out coverage test.

* Split out sanity test.

* Split out git test.

* Update test groups.
2 years ago
Matthew Donoughe 3f1838bf91
Update attributes of files that are links without specifying link target (#76167)
* update attributes of files that are symlinks

* update attributes of files that are hard links

* fix default state in documentation

* remove unnecessary suppression

* add to changelog
2 years ago
Matt Martz d58e69c82d
Add support for gzip decoding responses (#41925) 2 years ago
Matt Clay f70cc2fb7e
Refactor ansible-test integration tests. (#78168)
* Relocate update-ignore.py for easier re-use.

* Add script to ease collection testing.

* Skip ignore rewrite if file does not exist.

* Add integration test for the shebang sanity test.

* Fix ansible-test-no-tty integration test.

Previously the test only verified a TTY was not used if a TTY already existed.
This prevented the test from verifying behavior when run in CI.
Now the test creates a PTY before invoking ansible-test.

* Clean up ansible-test-docker integration test.
2 years ago
Matt Martz a90f666ab3
Use ctypes to access shadow, instead of spwd which is deprecated (#78050)
* Use ctypes to access shadow, instead of spwd which is deprecated

* Remove sanity ignore

* cast to str to satisfy mypy

* Add typing.cast polyfill

* Appease mypy redefine

* Add clog frag
2 years ago
Matt Clay 95df5cb740 Fix invalid-ansiblemodule-schema sanity errors.
The validate-modules sanity test expects a list not a dict_keys iterable.
2 years ago
Matt Clay 11b6032e73 ansible-test - Ignore vendored code in mypy test. 2 years ago
Sloane Hertel e6075109d0
Remove incidental_inventory_aws_ec2 and supporting plugins (#77877)
* Remove aws/2.7 and aws/3.6 from incidental test matrix entries

* Remove aws.sh symlink
2 years ago
Sloane Hertel 82f3a57bee
Fix ansible-galaxy traceback when unexpected version of resolvelib is installed (#77630)
* Fix traceback when a supported version of resolvelib is not installed

Try to read the supported version range from the package distribution info and fall back to a hardcoded lowerbound/upperbound (>=0.5.3,<0.6.0).

* Add tests for unsupported resolvelib versions

* Resolve remaining import sanity test issues.

Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Martz <matt@sivel.net>
2 years ago
Matt Clay dfde4be444 Add Python 3.11 support.
ci_complete
ci_coverage
2 years ago
Sloane Hertel fecc78b5fb
remove extra validate-modules ignore entry (#77826) 2 years ago
Brian Coca 4706091a38
rename systemd module to services only (#77644)
* rename systemd module to services only

 disambiguates what it handles since systemd is now much more
 that a service manager, but the module is specific to services
2 years ago
Matt Clay cc5ac88c4c Update mypy test. Fix type hints for Python 3.9.
This also bumps the minimum controller version (for mypy only) to Python 3.9.
2 years ago
Martin Krizek dbdbfe845a
Remove deprecated subclassing DefaultCallback without doc_fragment (#77677) 2 years ago
Martin Krizek ed30fc9a06
Remove deprecated loading cache plugins directly without cache_loader (#77655) 2 years ago
Martin Krizek 9f82fc204b
apt_key: remove deprecated key module param (#77409) 2 years ago
Martin Krizek f933f9a178
get_url: remove deprecated sha256sum module param (#77408) 2 years ago
Martin Krizek 6d260ad967
Remove COMMAND_WARNINGS and warn (#77411)
* Remove COMMAND_WARNINGS and warn

Fixes #77394
2 years ago
Matt Clay 50d4cf931c
Start of 2.14 development cycle. (#77378)
* Delete old changelog fragments.
* Add 2.14 changelog stub.
* Add porting guide.
* Update version and codename.
* Add temporary deprecated version ignores.
2 years ago
Sloane Hertel 2769f5621b
Add find_spec and exec_module to RestrictedModuleLoader (#76427)
* Add find_spec and exec_module to RestrictedModuleLoader

* Fix getting new loader with correct path

Fix pep8 errors

* Use convert_ansible_name_to_absolute_paths instead of the loader path

* Apply suggestions from code review

* Fix type hints and test them in CI

* Fix error message for ansible.module_utils.basic if it's missing

Add mypy ignored missing imports for controller sanity tests

* Add mypy attr-defined ignore entries for python 3.8, 3.9, 3.10 for vendored six

Add mypy attr-defined ignore for python 2.7 in lib/ansible/utils/collection_loader/_collection_finder.py

* Just test controller python versions to simplify ignoring mypy errors
2 years ago
Felix Fontein 4d984613f5
validate-modules for plugins: do some more schema validations so that some issues that are currently reported for modules are also reported for plugins (#77268)
* Add more sanity tests on schema level (so they also work for plugins).

* Fix various issues the sanity test reported.

* Add changelog fragment.

* Fix function name.
2 years ago
Felix Fontein e3c72230cd
unarchive: fix io_buffer_size option, remove ignore.txt entry (#77271)
* Fix io_buffer_size option.

* Remove ignore.txt entry by adding action plugin only options to module's argument spec.

* Add changelog fragment.

* Adjust unit tests.
2 years ago
Matt Clay 822fddd627 Fix yaml loader and compat. 2 years ago
Matt Clay 3d5637beec Initial mypy sanity test support for core. 2 years ago
Matt Clay 5a1b891917
Additional type hinting cleanup. (#77188) 2 years ago
Matt Clay 68fb3bf90e
ansible-test - Fix consistency of managed venvs. (#77028) 2 years ago
Sloane Hertel 43e55db208
ansible-galaxy - add signature verification of the MANIFEST.json (#76681)
* ansible-galaxy collection install|verify:

  - Support verifying the origin of the MANIFEST.json when the Galaxy server has provided signatures.
  - Allow supplemental signatures to use during verification on the CLI/requirements file.

* ansible-galaxy collection install:

  - Support disabling signature verification. This silences the warning provided by ansible-galaxy if the Galaxy server provided signatures it cannot use because no keyring is configured.
  - Store Galaxy server metadata alongside installed collections for provenance. This is used by 'ansible-galaxy collection verify --offline'.

* Add unit tests for method that gets signatures from a Galaxy server

* Add integration tests for user-provided signature sources

- Test CLI option combinations
- Test installing collections with valid/invalid signature sources
- Test disabling GPG verification when installing collections
- Test verifying collections with valid/invalid signature sources

* Make signature verification advisory-by-default if signatures are provided by the Galaxy server

- Make the default keyring None
- Warn if the keyring is None but the Galaxy server provided signatures
- Error if the keyring is None but the user supplied signatures
- Error if the keyring is not None but is invalid

* changelog

* add ansible-galaxy user documentation for new options

Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
Co-authored-by: Sandra McCann <samccann@redhat.com>
Co-authored-by: Andy Mott <amott@redhat.com>
Co-authored-by: John R Barker <john@johnrbarker.com>
2 years ago
Matt Clay 6e57c8c084 Add missing typing import for _distro.py.
See: 116cdad222/distro.py (L42-L72)
2 years ago
Matt Clay bb63c97c16
ansible-test - Update import test and sanity requirements. (#76308)
* Add script to freeze sanity requirements.
* Declare sanity test requirements and freeze
* Use pinned requirements for import.plugin test.
* Expand scope of import test for ansible-core.
* Add ignores for galaxy import errors.
* Update test-constraints sanity test.
3 years ago
Matt Martz 4073a22d55
uri module improvements (#50771) 3 years ago
Jordan Borean fb55d878db
psrp - remove deprecated psrp put_file code (#76252)
* psrp - remove deprecated psrp put_file code

* Removed unused import and fix missing var
3 years ago
Jordan Borean 9985b8a975
ansible-test pssa update and new rules (#76256) 3 years ago
Sam Doran 74dc830dd4
Use new codecov uploader (#75938)
* Use new codecov uploader
* Rewrite coverage uploader in Python
3 years ago
Matt Martz 66a83314b9
Modernize install (#76021)
Co-authored-by: Matt Clay <matt@mystile.com>
Co-authored-by: Matt Davis <mrd@redhat.com>
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
3 years ago
Martin Krizek 2f3fbaac3c
Remove unused test/support plugins (#76078) 3 years ago