Commit Graph

765 Commits (d4232988f20b585a43d00ab1a75bdf47811d77e8)

Author SHA1 Message Date
Felix Fontein 8740fbd7cb
Bump acme test container. (#79783) (#79816)
(cherry picked from commit 5fb8bc3ddb)
3 years ago
Matt Clay 4fe7aae21d
[stable-2.14] ansible-test - Specify config path in plugin error (#79881) (#79977)
(cherry picked from commit d48d1c23df)
3 years ago
Matt Clay 7027806a77
[stable-2.14] ansible-test - Fix various type hinting issues. (#79798) (#79976)
* ansible-test - Add missing type hints.

* ansible-test - Remove redundant type hints.

* ansible-test - Fix return type annotations.

* ansible-test - Add assert, casts to assist mypy.

* ansible-test - Fix incorrect type hints.

* ansible-test - Remove no-op code.

* ansible-test - Fix incorrect types.

* ansible-test - Fix method signature mismatch.

(cherry picked from commit c9f20aedc0)
3 years ago
Matt Clay 6d53f61f9e
[stable-2.14] ansible-test - Remove obsolete DirectoryTarget. (#79975)
This code has been unused since at least the 2.9 release.

(cherry picked from commit 5f58015527)
3 years ago
Matt Clay 6adea5fa5c
[stable-2.14] ansible-test - fix warning to include image name (#79560) (#79973)
(cherry picked from commit 0a12d8a5bc)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
3 years ago
Matt Clay 50b6d3515c
[stable-2.14] ansible-test - Avoid direct use of `errno`. (#79972)
Error handling on Python 3.x no longer requires the use of `errno` to identify specific errors.

(cherry picked from commit f9715f436c)
3 years ago
Jordan Borean 8e9834fde5 ansible-test - fix ps argspec check inside cmdlet (#79699)
* ansible-test - fix ps argspec check inside cmdlet

* Added error condition test

* Fix sanity problem

(cherry picked from commit ee33be9484)
3 years ago
Evgeni Golov a398724a31 [stable-2.14] validate-modules: don't fail on invalid YAML (#79682)
* validate-modules: don't fail on invalid YAML

When validate-modules encounters invalid YAML (e.g. in the EXAMPLES
section), it tries to reformat the exception to include the line number
in the Python file instead of the line number of the embedded YAML
document. However, PyYAML doesn't allow modification of the Mark object
(anymore) which leads to a new exception being raised, instead of
reporting the original exception.

As the original exception is not needed in other places anymore, we
don't have to modify it at all and can just compute the right line
number when reporting the error via ansible-test.

Fixes: #75837

* Add test for invalid module doc YAML syntax.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit a7111c4dbb)

Co-authored-by: Evgeni Golov <evgeni@golov.de>
3 years ago
Matt Clay acc8c3ccf8 [stable-2.14] ansible-test - Improve container startup handling.
Also improve the ansible-test-container integration test:

 - Add coverage for the no-probe code path.
 - Add work-arounds for centos6 containers (to support backporting).
 - Avoid systemd debug when the container doesn't use cgroup.
(cherry picked from commit 04fc98c794)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 6ebb1324d4 [stable-2.14] ansible-test - Support RSA SHA-1 for SSH clients.
(cherry picked from commit 75b60b17ee)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 240156ff67 [stable-2.14] ansible-test - Fix `--prime-containers` and `--explain` (#79581)
* Remove unused code.
* Fix explain errors.
* Fix `--prime-containers` with docker on cgroup v2.
(cherry picked from commit da3b1d3f50)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 578c96b854 [stable-2.14] ansible-test - Fix target PyPI proxy config.
(cherry picked from commit dcc08eec35)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 5e2806b502
[stable-2.14] ansible-test - Fix completion error in Python 3.11. (#79500)
(cherry picked from commit 38fe342)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 3ae796bdcf
[stable-2.14] ansible-test - Improve container management. (#78550) (#79507)
* [stable-2.14] ansible-test - Improve container management. (#78550)

See changelogs/fragments/ansible-test-container-management.yml for details..
(cherry picked from commit cda16cc5e9)

Co-authored-by: Matt Clay <matt@mystile.com>

* ansible-test - Fix container detection. (#79530)

(cherry picked from commit 80d2f8da02)
3 years ago
Matt Davis 047affbdc5
Prevent stdio deadlock in forked children (#79522) (#79539)
* 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

(cherry picked from commit 1424484be0)
3 years ago
Matt Clay 713f5c5ae8 [stable-2.14] ansible-test - Improve pylint command consistency. (#78896)
* ansible-test - Improve pylint command consistency.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit bc274f5)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay edbd88d3f1 [stable-2.14] ansible-test - Fix and update documentation links.
(cherry picked from commit 938c0fa944)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 4653d1f4a0 ansible-test - Update default container. 3 years ago
Matt Clay b7f9d839e0 ansible-test - Update base and default containers. 3 years ago
Matt Clay 418b92b323 [stable-2.14] ansible-test - Fix pylint support on Python 3.11.
(cherry picked from commit 645b6b8581)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Sviatoslav Sydorenko 51c0d50631 [stable-2.14] Restrict `wheel` below v0.38.0 under Pythons < 3.7 (#79187)
* Restrict `wheel` below v0.38.0 under Pythons < 3.7

* Add a change note for PR #79187

* Update changelogs/fragments/79187--wheel-0.38.0.yml

Co-authored-by: Matt Clay <matt@mystile.com>

* Use constraints file when installing wheel.

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit a76bbb18a5)

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
3 years ago
Matt Clay c6511e3a5b [stable-2.14] ansible-test - Update pylint to 2.15.4.
(cherry picked from commit 14e7f05318)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay f46bbb2140 [stable-2.14] ansible-test - Update distro containers to 4.8.0.
The updated containers include coverage 6.5.0..
(cherry picked from commit 5b239acb77)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 53bac70257
[stable-2.14] ansible-test - Update coverage to version 6.5.0. (#78945)
(cherry picked from commit 20c1252212)
3 years ago
Jordan Borean 04fe7b374d
ansible-test validate-module - support sidecar docs (#78904) (#78933)
(cherry picked from commit be4807b712)
3 years ago
Matt Clay 4655fe6d8b [stable-2.14] ansible-test - Fix integration test target filter. (#78862)
- Allow disabled, unsupported, unstable and destructive integration test targets to be selected using their respective prefixes.
- Allow unstable tests to run when targeted changes are made and the ``--allow-unstable-changed`` option is specified (resolves https://github.com/ansible/ansible/issues/74213).
(cherry picked from commit d3d7785472)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 7aff371ba5
ansible-test - Fix default container version. (#78854) 3 years ago
Matt Clay 38f706a2a3
ansible-test - Update base and default containers. (#78847) 3 years ago
Matt Martz 900010571d
[stable-2.14] Add `use_rsa_sha2_algorithms` option for paramiko (#78789) (#78842)
Fixes #76737
Fixes #77673

Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 76b7466)

Co-authored-by: Matt Martz <matt@sivel.net>
3 years ago
Matt Clay 85dba943ab
[stable-2.14] ansible-test - Update Python 3.11 support. (#78840) (#78841)
- Update sanity test requirements to fully support Python 3.11.
- Make Python 3.11 the default in the base and default test containers.

(cherry picked from commit 4d25233ece)
3 years ago
Matt Clay e5e87a3927
ansible-test - Update pylint to 2.15.3. (#78811) 3 years ago
Matt Clay 7683c0ae54
ansible-test - Update base and default containers. (#78774) 3 years ago
Matt Clay 79f67ed561
ansible-test - Fix container error handling. (#78739) 3 years ago
Matt Clay 8a7b89c2f4
ansible-test - Update distro containers. (#78729) 3 years ago
Matt Clay b3854161a0
ansible-test - Update coverage to version 6.4.4. (#78728) 3 years ago
Matt Clay c56b35598f
ansible-test - Upgrade pylint. (#78727)
This version of pylint now supports Python 3.11.
3 years ago
Matt Clay 38a82a5cc4
ansible-test - Remove Fedora 35 support. (#78720) 3 years ago
Sloane Hertel 12cec69545
Fix validate-modules version_added test (#78554) 3 years ago
Matt Clay 38db9cf417
ansible-test - Update test containers. (#78615)
The test containers no longer use the `VOLUME` instruction.
3 years ago
Matt Clay 4187707f03
ansible-test - Use --tmpfs to run containers. (#78605) 3 years ago
Matt Clay ece85abbc4
ansible-test - Verify executables are executable. (#78606) 3 years ago
Matt Clay d683c5bd21
ansible-test - Fix Ubuntu 20.04 bootstrapping. (#78551) 3 years ago
Matt Clay 8e96c27888
ansible-test - Update base and default containers. (#78532) 3 years ago
Matt Clay 69ceb31600
ansible-test - Update sanity test requirements. (#78528) 3 years ago
Matt Clay 99016653a2
ansible-test - Fix self-test change handling. (#78521) 3 years ago
Matt Clay 2b63fdd1b8
ansible-test - Fix ansible-doc sanity test FQCN. (#78518) 3 years ago
Matt Clay 2fedde6356
ansible-test - Update distro test containers. (#78506) 3 years ago
Matt Clay 8367af9cdd
ansible-test - No locale warning with delegation. (#78505)
The locale warning for the origin host is not relevant when delegation is used.
It is also not relevant when non-test commands are in use.
3 years ago
Matt Clay 47804fcdf5
ansible-test - Update coverage to 6.4.3. (#78504) 3 years ago
Matt Clay 89862fda3b
ansible-test - Sanity test code cleanup. (#78497) 3 years ago
Matt Clay 650befed37
Add missing space after keywords. (#78480)
Also remove unnecessary parenthesis.
3 years ago
Matt Clay 85acf4d1e5
ansible-test - Avoid use of deprecated type hints. (#78456)
* ansible-test - Avoid use of deprecated type hints.

PEP 585 deprecated many container types in the `typing` module in favor of the actual types, which support subscripting as of Python 3.9.

Conversion of `t.Type` was skipped since PyCharm does not currently recognize it.

* ansible-test - Fix `t` and `c` imports/shadowing.
3 years ago
Matt Clay 5bee66fc5d
ansible-test - More type hint updates. (#78455)
* Simple regex replace of multi-line function arg annotations on the first line.

* Manually fix up ArgumentParser type annotations.

* Manual type hint conversions.

* Manual conversion of function type hints.

* Remove unnecessary type hints on for statements.
3 years ago
Matt Clay b993b5cd49
ansible-test - Convert more type hints. (#78449)
* Simple regex replace of multi-line function arg annotations.

* Simple regex replace of multi-line function arg annotations with default values.

* Simple regex replace of multi-line function arg return annotations.

* Simple regex replace of assignment annotations.
3 years ago
Matt Clay 02e98810a9
Re-organize CI test groups for POSIX tests. (#77420)
* `context/target` tests must be in groups 1 - 2.
* `context/controller` tests must be in groups 3 - 5.

This makes it easier to efficiently organize groups and balance test runtimes.
3 years ago
Matt Clay 3eb0485dd9
ansible-test - Use more native type hints. (#78435)
* ansible-test - Use more native type hints.

Simple search and replace to switch from comments to native type hints for return types of functions with no arguments.

* ansible-test - Use more native type hints.

Conversion of simple single-line function annotation type comments to native type hints.

* ansible-test - Use more native type hints.

Conversion of single-line function annotation type comments with default values to native type hints.

* ansible-test - Use more native type hints.

Manual conversion of type annotation comments for functions which have pylint directives.
3 years ago
Matt Clay f2abfc4b3d
ansible-test - Parse content config only once. (#78418) 3 years ago
Matt Clay d8fefba20e
ansible-test - Update locale logic to match core. (#78389)
Now that core requires UTF-8 filesystem encoding, ansible-test does as well.

Additionally, the `en_US.UTF-8` or `C.UTF-8` encoding must be available.
Previously the `en_US.UTF-8` encoding was requested, but its availability was never verified.
The fallback to `C.UTF-8` maintains UTF-8 encoding while allowing more flexibility in the running environment.
3 years ago
Matt Clay b0b58fa7c2
ansible-test - Update base and default containers. (#78377) 3 years ago
Matt Clay a3c90dd0bc
ansible-test - Fix TTY and output handling. (#78350) 3 years ago
Matt Clay 0012263c7a
ansible-test - Fix handling of args after `--` (#78328) 3 years ago
Matt Clay 61af59c808
ansible-test - Update distro containers to 4.4.0. (#78322) 3 years ago
Matt Clay 4cd3425dfe
ansible-test - Update coverage to 6.4.2 (#78320) 3 years ago
Matt Clay 90ef914f77
ansible-test - Drop Python 3.8 controller support. (#78237) 3 years ago
Matt Clay f3f4ad9332
ansible-test - Use sudo for all remotes. (#78310) 3 years ago
Matt Clay 8565deaae3
ansible-test - Install `acl` on Alpine remotes. (#78303) 3 years ago
Matt Clay 8bb20fe06b
ansible-test - Enable ACL support on more remotes. (#78299) 3 years ago
Matt Clay b63812bc08 ansible-test - Enable ACLs on FreeBSD remotes.
This allows integration tests to switch from one unprivileged user
to another, sharing files between the users using ACLs.
3 years ago
Jordan Borean 75de4a37bc
validate-modules - allow raw module return type (#78231) 3 years ago
Matt Clay b9d13d222c ansible-test - Improve pip bootstrap download. 4 years ago
Sviatoslav Sydorenko e481b35e23
Delete core-ci `query` param from ansible-test (#78136)
Ref: https://github.com/ansible/ansible-core-ci/pull/343
4 years ago
Matt Clay ca04dc28a2 ansible-test - Remove deprecated test platforms. 4 years ago
Matt Clay cf9fd2d7da ansible-test - Use shlex.join where appropriate. 4 years ago
Matt Clay 24d91f552c ansible-test - Add support for more remotes. 4 years ago
Matt Clay 5666c6d6a3 ansible-test - More flexible become support. 4 years ago
Don Naro 3cd2c494bd
issue #72449 winrm script rm (#77931) 4 years ago
Matt Clay 2f0530396b ansible-test - Clean up type hints and comments. 4 years ago
Matt Clay a4e4413cde ansible-test - Update distro containers to 4.3.0.
The primary change in this update is removal of `/etc/ansible/hosts` from the containers.
4 years ago
Matt Clay 5b3557f8ba ansible-test - Allow docstring in docs-only module 4 years ago
Matt Clay c2b36ba04d ansible-test - Update base and default containers. 4 years ago
Matt Clay 23914d3f0b
ansible-test - Adjust unit test mock usage. (#77961) 4 years ago
Sloane Hertel e89176caac
Pin PyYAML version compatible with Python 3.8+ (#77936)
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
Co-authored-by: Matt Clay <matt@mystile.com>
4 years ago
Sloane Hertel 143e7fb45e
ansible-galaxy - support resolvelib versions >= 0.5.3, < 0.9.0 (#77649)
* ansible-galaxy - support resolvelib versions >= 0.5.3, <= 0.8.1

Test incompatibilities are removed for resolvelib >= 0.6.0

Test against the latest 0.8.x version and fix requirements

* Fix tests - use a venv for testing the range of resolvelib versions

* Update temporary hardcoded fallback for ansible-test

* Update hardcoded upperbound for sanity tests

* Make error check more flexible
4 years ago
Matt Clay df765c0ecf ansible-test - Update Alpine, openSUSE containers 4 years ago
Matt Clay 52c8613a04 ansible-test - Skip mypy runs under Python 3.11. 4 years ago
Matt Clay 11b6032e73 ansible-test - Ignore vendored code in mypy test. 4 years ago
Matt Clay 81351022d8 ansible-test - Prefer unittest.mock for core. 4 years ago
Matt Clay f933314101 ansible-test - Fix shell target options handling. 4 years ago
Matt Clay 86779cc903 ansible-test - Code cleanup.
This helps prepare for a future pylint upgrade.
4 years ago
Matt Clay 289cba333b ansible-test - More multi-arch containers. 4 years ago
Matt Clay 13d03c3c22
ansible-test - Add RHEL 9 / FreeBSD 13.1 remotes. (#77851) 4 years ago
Matt Clay 3d2c2e60aa
ansible-test - Update distro containers. (#77847)
* ansible-test - Add a Ubuntu 22.04 container.
* ansible-test - Add a Fedora 36 container.
* ansible-test - Update distro containers.
* Fix dnf test on Fedora 36.
* Work around scp test issues.
4 years ago
Matt Clay 76ead1e768 ansible-test - Fix remote args restriction.
The platform-specific and global fallbacks were not working with the `--remote` option.

This regression was introduced by https://github.com/ansible/ansible/pull/77711
4 years ago
Matt Clay 185340e667 ansible-test - Update default containers.
These containers include Python 3.11 sanity test environments.
4 years ago
Matt Clay dfde4be444 Add Python 3.11 support.
ci_complete
ci_coverage
4 years ago
Matt Clay 9600e3064a
ansible-test - Improve requirements handling. (#77825)
The requirements for virtualenv and coverage are now kept in a requirements file for easier container builds.

The test-constraints sanity test has been updated to make sure the requirements file is kept up-to-date.
4 years ago
Matt Clay 290fb5e0ca
ansible-test - Upgrade to coverage 6.3.3. (#77817) 4 years ago
Matt Clay 1e3cf9f732
ansible-test - Make distro containers multi-arch. (#77814) 4 years ago
Matt Clay 449d82a521 ansible-test - Add RHEL 8.6 support. 4 years ago
Matt Clay fe349a1ccd
ansible-test - Enhance the shell command. (#77734)
* ansible-test - Add shell --export option.

* ansible-test - Support cmd args for shell command.

Also allow shell to be used without a valid layout if no delegation is required.

* ansible-test - Improve stderr/stdout consistency.

By default all output goes to stdout only, with the exception of a fatal error.

When using any of the following, all output defaults to stderr instead:

* sanity with the `--lint` option -- sanity messages to stdout
* coverage analyze -- output to stdout if the output file is `/dev/stdout`
* shell -- shell output to stdout

This fixes issues two main issues:

* Unpredictable output order when using both info and error/warning messages.
* Mixing of lint/command/shell output with bootstrapping messages on stdout.

* ansible-test - Add changelog fragment.
4 years ago