Commit Graph

11897 Commits (f587856beb4afa11040418ecf83b0bfd3d528ab6)

Author SHA1 Message Date
Matt Clay f587856beb
Remove straight.plugin dependency (#80084) 1 year ago
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 6bfe6b899a
ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
1 year ago
Sviatoslav Sydorenko 56036013cd
📦 Integrate manpage builds into PEP 517 build backend
This patch creates a thin wrapper around the `setuptools`' PEP 517
build backend in-tree. It features an ability to request generating
the manpage files in the process of building a source distribution.
This toggle is implemented using the `config_settings` mechanism of
PEP 517.
One must explicitly pass it a CLI option to the build front-end to
trigger said behavior. The packagers are expected to use the
following call:

    python -m build --config-setting=--build-manpages

This option has no effect on building wheels.

🧪 The change includes integration tests

This test runs building and re-building sdists and wheels with and
without the `--build-manpages` config setting under the
oldest-supported and new `setuptools` pinned.

It is intended to preserve the interoperability of the packaging setup
across Python runtimes.

An extra smoke test also verifies that non PEP 517 interfaces remain functional.

PR #79606


Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Martin Krizek 6c3d2a4e51
Use FAs with inheritance only when applicable (#80026)
... and set default value of an attribute on an object
only in NonInheritableFA.

Fixes #79777

ci_complete
1 year ago
Matt Clay 5f6ebebce9
Update ansible-test openshift plugin tests (#80064)
Update ansible-test openshift plugin tests to use config to get server endpoint.

Also update the comment explaining why the tests are disabled.
1 year ago
Matt Clay bca55d945b
ansible-test - Adjust vcenter test plugin behavior (#80063)
The previous change to the default mode of operation for the plugin is now limited to collections.

This enables easier testing of the plugin in core, so the previously removed tests have been restored.
1 year ago
Matt Clay 39a5b08ca6
ansible-test - Update base and default container (#80058) 1 year ago
Sviatoslav Sydorenko c05d813661
Fix #80020 typos confusing `pylint` for `pytest` (#80056) 1 year ago
Matt Clay ecf66c6f82
ansible-test - Update mypy and pylint requirements (#80049) 1 year ago
Matt Clay 5e3db6e441
ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
1 year ago
Matt Clay e6cffce0eb
ansible-test - Allow target prefixes to use `_` (#80021)
Integration test target prefixes defined in a `tests/integration/target-prefixes.{group}` file can now contain an underscore (`_`) character.
1 year ago
Matt Clay fe2732b91e
ansible-test - Support pylint assertion rewriting (#80020)
Add support for `pylint` assertion rewriting when running unit tests on Python 3.5 and later.
1 year ago
devon-mar 2f8f7fba4c
Update lookup to use positional only arg for name to avoid conflicts (#79839) 1 year ago
Miklos Sagi b7ef2c1589
ansible-playbook -K breaks when passwords have quotes (#79837)
Now only 'unquote' when ini config file is the source
1 year ago
Matt Clay 72c59cfd98
Avoid trailing spaces in unit test (#80033) 1 year ago
Matt Clay 21fc699b77
Remove trailing spaces from lines in YAML (#80032) 1 year ago
Matt Clay a4248a63aa
Add missing newlines to YAML files (#80031) 1 year ago
Sandra McCann 967a88963f
Update docs requirements to latest package versions (#79930)
Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Jordan Borean 1e6b8249e7
Add condition that causes a when to skip a task to output msg (#78918)
* Add condition that causes a when to skip a task

* Fix up tests

* Use false_condition instead of failed_condition

* Remove formatting accidentially added

* Fix sanity
1 year ago
Martin Krizek bd329dc543
Make using blocks as handlers a parser error (#79993)
Fixes #79968
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 67d49734f7 ansible-test - Support Podman 4.4.0+ 1 year ago
Matt Clay d67b436eba
ansible-test - Improve pylint backwards compat (#79997) 1 year ago
Sloane Hertel 556dadba6d
user - fix comparing existing group names to group IDs (#79981) 1 year ago
Matt Clay 715ab99462
ansible-test - Improve code formatting (#79983)
* ansible-test - Add blank lines after docstrings

* ansible-test - Preserve formatting of arg pairs

* ansible-test - Remove unused string

* ansible-test - Remove pointless dict() usage

* ansible-test - Clean up initial func arg indenting

* ansible-test - Clean up constructor arg indenting

* ansible-test - Clean up func arg wrapping

* ansible-test - Clean up comma and paren placement
1 year ago
Matt Clay 43487c6581
ansible-test - Enable unused-import pylint rule (#79912)
This was previously enabled for core. This change enables it for collections.
1 year ago
Matt Clay 10bc8af5a2
ansible-test - Remove auto format pylint rule (#79985) 1 year ago
Brian Coca e2f147bcec
ansible-inventory, add --limit option (#79596)
* ansible-inventory, add --limit option

* also graph

* optimize the when not providing limit

* added tests and clog

* avoid empty groups, fix tests

* i swear there as an ignore_errors there already!!?!?!?

* Fix stdout test fallback

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>

* simpler approach using subset against inventory directly

* tyupose

* renamed funciton to what it actuall does
got yaml in line with others about removing empty groups

* have graph ignore limts, also note same for --host

* fixed typo long line

* better test

* cause hosvars are not a thing

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 year ago
Matt Clay 58d84933fc
ansible-test - Clean up indentation and spaces (#79980) 1 year ago
Matt Clay 71f2e777ed
Update mypy to version 1.0.0 (#79963) 1 year ago
Mark Chappell ceafb5411a
Add an integration test to ensure that defaults don't count towards mutually exclusive (#79949) 1 year ago
Martin Krizek 09e0fb3516
Change ansible_job_id format (#79951)
* Change ansible_job_id format

...to be something that does not resemble float or other type which
value could be changed by literal_eval that jinja2_native uses.

Specifically the format of '%d.%d' is converted from str to float and
then back to float which may result in truncating the number resulting
in the job not being found because the job id does not exist.
1 year ago
Matt Davis e1d298ed61
don't ignore templated _raw_params that k=v parser failed to parse (#79913)
fixes #79862
1 year ago
Sloane Hertel fcdd7493ae
improve password_hash warning for unsupported algorithms (#79872)
* password_hash - give a warning for unsupported algorithms (that raise a TypeError)

* add suggested changes, a test and changelog
1 year ago
Matt Clay 9d65e122ff
Fix detection of available hashlib algorithms (#79946)
* Fix detection of available hashlib algorithms

Detection of hashlib algorithms now works on Python 3.x.
The new implementation works on Python 2.7 and later.

Test coverage is provided by both integration and unit tests.

* Add additional details about hashlib in docs
1 year ago
Felix Fontein 0793833847
ansible-test - Fix collection delegation (#79947) 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 1ba100a3b4
Fix pointless statements in unit tests (#79940) 1 year ago
Sloane Hertel fa1564c548
include_vars - document hash_behaviour + dir (#79790)
* document that hash_behaviour does not apply to individual files of variables when using the dir option

* add tests
1 year ago
Matt Clay c8c1402ff6
ansible-test - Fix file permissions for delegation (#79932)
* ansible-test - Fix file permissions for delegation

* Set more restrictive permissions for SSH key

* Check all execute bits, not just owner

* Add a breaking_changes changelog entry
1 year ago
Matt Davis c7c991e79d
quiet default ansible-doc integration test output (#79921)
* quiet default ansible-doc integration test output 

* typical non-verbose output was exceeding 27k lines per fun
* disables `set -x` unless `-v` is passed to the script (eg when ansible-test is called with `-v` or `--retry-on-error` adds it on the second try
* added simple progress echoes
* suppress some grep output

* only enable `set -x` for >= `-vvv`

* fix shellcheck default complaint
1 year ago
Mateus Rangel 32672c6326
Improving the RETURN and its docs on the apt_repository module (#79658)
* Improving the documentation on how we generate the default value of the filename parameter

* fix pep8

* removing unnecessary documentation and improving the module's return

* making the RETURN docs

* pep8

* version_added and changelog

* module._diff

* module._diff fix

* add rudimentary tests for new outputs

---------

Co-authored-by: Matt Davis <mrd@redhat.com>
1 year ago
Matt Clay 402ae0aa5d
ansible-test - Remove old containers and remotes (#79929) 1 year ago
Matt Clay 379058e10f
Update collections.abc imports (#79911)
* Update `collections.abc` imports

- Use `six.moves` for modules and module_utils
- Use `collections.abc` for controller code

This avoids using `ansible.module_utils.common._collections_compat`,
which was added before the vendored `six` was updated to provide these
imports.

* Update _collections_compat to use six.moves

Also update the custom pylint rule to reflect this change.
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 0cf9db6fc2
Clean up unused imports in ansible-test unit tests (#79897) 1 year ago
Matt Clay ca54b7b26d
Clean up unused imports in sanity tests (#79896) 1 year ago