Commit Graph

11932 Commits (4ea50cef23c3dc941b2e8dc507f37a962af6e2c8)

Author SHA1 Message Date
Felix Fontein 4ea50cef23
validate-modules: check_mode attribute and compare with supports_check_mode parameter (#80090)
Co-authored-by: Brian Scholer <1260690+briantist@users.noreply.github.com>
1 year ago
Felix Fontein 5388f6020a
validate-modules: support plugin see-also (#80244) 1 year ago
Matt Clay 6a6824f570
ansible-test - Update CloudStack test container (#80278) 1 year ago
Matt Clay cf8fa5e75c
ansible-test - Update sanity test requirements (#80279) 1 year ago
Felix Fontein a2dc5fcc7d
Implement semantic markup support for Ansible documentation in ansible-doc. (#80242) 1 year ago
Felix Fontein 4ca3a29cd2
Bump antsibull-docs version to 1.10.0 to support semantic markup. (#80201) 1 year ago
Sviatoslav Sydorenko eebfd71a6d
Make PEP 517 mutation tests use pinned old setuptools (#80262)
* Pin setuptools to lowest supported @ PEP 517 test

This allows catching the behavior of builds under old setuptools.

* Stop invoking `setup.py install` in tests

This is not the part we care about since it involves dealing with the
external runtime dependencies rather than building our source
distribution.
1 year ago
Sviatoslav Sydorenko 7097df3eed
📦 Switch sdist build-system to pure setuptools (#80255)
This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this will make sure not to modify the current
source checkout on that first build.

Co-authored-by: Matt Clay <matt@mystile.com>
1 year ago
Matt Clay bad8843124
ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.
1 year ago
Matt Clay f3bc0f18ff
ansible-test - Update base and default container (#80178) 1 year ago
Matt Clay 85b5f31f75
Update mypy to 1.1.1 (#80175) 1 year ago
Sloane Hertel b7a0e0d792
copy - fix check mode with remote_src=True (#78624)
* Don't create dest directory in check mode

uncomment existing test

Fix checking for file attribute changes in check mode and add a test
1 year ago
Matt Clay c564c6e21e
ansible-test - Update pylint requirements (#80172) 1 year ago
Matt Clay 31658031ed
ansible-test - Remove pointless comparison (#80168) 1 year ago
Martin Krizek cfa7acbc19
Raise an error on invalid FA.isa value (#80040)
Avoids bad definitions of playbook classes
1 year ago
Sviatoslav Sydorenko 701f8852ec
Revert "🧪 Switch macOS 13.2 to 12.0 in CI (#80145)" (#80156)
This reverts commit 326e70c02a.
1 year ago
Sloane Hertel 46c08c4467
move test so it runs when the plugin is modified (#80158) 1 year ago
Sloane Hertel 9a03c8f5b3
update paramiko_ssh unit tests load the connection with plugin loader (#80157)
* Load the paramiko_ssh connection plugin properly using plugin loader so it can use config manager when _connect() is called
1 year ago
Brian Coca a1bff416ed
paramiko connection now uses the correct source of data (#79704)
* paramiko connection now uses the correct source of data

* keep orig name

* added missing port to docs

* Update changelogs/fragments/paramiko_config.yml

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

* test ansible_host templating

* added missing private_key_file

* removed all play_context fallbacks

* Update lib/ansible/plugins/connection/paramiko_ssh.py

Co-authored-by: Jordan Borean <jborean93@gmail.com>

* Update lib/ansible/plugins/connection/paramiko_ssh.py

Co-authored-by: Jordan Borean <jborean93@gmail.com>

---------

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Jordan Borean <jborean93@gmail.com>
1 year ago
Matt Clay 367d45facd
ansible-test - Fix error with missing pylint home (#80155) 1 year ago
Matt Clay 27287b40c0
ansible-test - Fix pylint error with old home dir (#80151) 1 year ago
Matt Clay 7c62cdeecd
Fix MANIFEST.in includes (#80147) 1 year ago
Sviatoslav Sydorenko 326e70c02a
🧪 Switch macOS 13.2 to 12.0 in CI (#80145)
* 🧪 Switch macOS 13.2 to 12.0 in CI

The former revealed unexpected flakiness while the latter is the
previous value that was used to be stable. This is a temporary revert.

* Skip lookup_url integration test under macOS 12.0
1 year ago
Brian Coca ff3ee9c4bd
ansible-inventory prevent duplicating host entries (#80059)
this happened after implementing limits we introduced a bug that a host would be duplicated if it existed in a group's children
1 year ago
Sviatoslav Sydorenko 8fec2d2a82
Add macOS 13 to CI and ansible-test (#79508)
*  Add macOS 13.2 to `ansible-test`

* 🧪 Replace macOS 12.0 with 13.2 in the CI matrix

* Skip `lookup_url` under macOS 13.2

This is due to https://wefearchange.org/2018/11/forkmacos.rst.html
that manifests itself as follows:

    TASK [lookup_url : Test that retrieving a url works] ***************************
    objc[15394]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
    objc[15394]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in t
    he fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
    ERROR! A worker was found in a dead state

* 📝 Extend ansible-test change note w/ macOS 13.2
1 year ago
Sviatoslav Sydorenko c0e0550bce
🐛 Make integration tests compatible w/ modern Git (#80122)
* 🐛 Make integration tests compatible w/ modern Git

This patch makes use of the `init.defaultBranch` setting to unify
the test across new and old Git versions since one defaults to
`master` and the other uses `main` for the default branch.

Where possible, it uses the `HEAD` committish to avoid having to
normalize the branch name.

The change fixes the following integration tests:

  * `ansible-galaxy`

  * `ansible-galaxy-collection-scm` (recursive collection)

  * `git`

* 🐛Replace `git-symbolic-ref` with a repo template

This custom Git repository template emulates the `init.defaultBranch` setting
on Git versions below 2.28. Ref: https://superuser.com/a/1559582.
Other workarounds mentioned there, like invoking
`git symbolic-ref HEAD refs/heads/main` after each `git init` turned
out to have mysterious side effects that break the tests in surprising ways.

* 🎨 Make Git integration test non-destructive

This patch makes use of the `$HOME` environment variable to trick Git
into using a user-global config generated in the temporary directory.
1 year ago
Sam Doran a56428de11
unarchive - properly handle relative path for `dest` (#75267)
* unarchive - properly handle relative path for dest

* Add integration test

* Return output of underlying commands with increased verbosity

* Revert "Return output of underlying commands with increased verbosity"

This reverts commit a2790c8275cdc5697b65670a0beffdc74b741bf6.

* Warn when a relative destination path was provided
1 year ago
Matt Clay f47bc03599
Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
1 year ago
Sloane Hertel b981a9dfcd
add a worker queue to get updates from the main results thread (#79886)
* Create a queue per WorkerProcess to receive intra-task updates
* Update `pause` action to use the worker queue
* Deprecate ConnectionBase()._new_stdin
* Add new `Display`  convenience method `prompt_until` to manage both controller- and worker-sourced prompting without cross-fork stdin sharing, in-worker mechanism to handle request-response over new worker queue.
1 year ago
Matt Clay c2ea56e12e
Relocate and refactor ansible-test diff unit tests (#80113)
This provides the same test coverage as the previous tests, without the dependency on git.
It also includes many more specific test cases with assertions, instead of simply relying on the code to not raise an exception.
1 year ago
Matt Martz 060a27f28f
Do not use hardcoded httpbin.org in uri tests (#80101) 1 year ago
Mark Chappell f64e79be41
sanity tests - ignore pre-release versions for deprecation comparisons (#79185) 1 year ago
Matt Clay a895cae5a1
Relocate validate-modules unit tests (#80087)
This allows the validate-modules unit tests to run as part of the regular unit test suite.
1 year ago
Matt Clay 2f62db842d
ansible-test - Update base and default container (#80086) 1 year ago
Yaakov Selkowitz c028006aaf
Define all processor facts on s390x (#19755) (#79806)
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
1 year ago
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