Commit Graph

11606 Commits (c8de45e5535e43d2872002eef8218aa7d0f461e9)

Author SHA1 Message Date
Matt Clay c8de45e553
ansible-test - Use Azure for Windows 2012/2012-R2 (#81973) 2 years ago
Jordan Borean 1a9edcd1b6
win_fetch - improve test time by not scanning Win dir (#81884) (#81885)
(cherry picked from commit dfc62589f6)
2 years ago
Matt Martz 820dae4aff
[stable-2.13] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81787)
* [stable-2.13] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780)

* Sanitize linkname during role installs

* Add tests

* add clog frag.
(cherry picked from commit ddf0311c63)

Co-authored-by: Matt Martz <matt@sivel.net>

* Update syntax for py3.8
2 years ago
Matt Martz 590e46c422
[stable-2.13] tarfile: Handle deprecation warning for extract and extractall (#81545) (#81634)
* [stable-2.13] tarfile: Handle deprecation warning for extract and extractall (#81545)

* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
(cherry picked from commit 1cc5efa)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>

* py3.8 doesn't have functools.cache

---------

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Clay fca71e4357
[stable-2.13] ansible-test - Always use managed entry points (#81537). (#81541)
(cherry picked from commit 390e508d27)
2 years ago
Sviatoslav Sydorenko 5c7d361b6e
[stable-2.13] Replace FreeBSD 12.{3->4} & 13.{0->1} @ testing (#81498)
* Replace FreeBSD 12.3 w/ 12.4 in CI & ansible-test

FreeBSD 12.3 bootstrap packages stopped being available.

* Replace FreeBSD 13.0 w/ 13.1 in CI & ansible-test
2 years ago
Matt Clay 28fb37d6c2
[stable-2.13] ansible-test - Update source layout detection (#81418) (#81436)
(cherry picked from commit c525514994)
2 years ago
Matt Clay 586392519b
[stable-2.13] Overhaul package-data sanity test (#81427) (#81437)
The sanity test now only inspects the sdist and wheel instead of trying to install the sdist using setup.py..
(cherry picked from commit f894ce89b4)
2 years ago
Matt Clay 6da138c61f
Skip apt_repository test on Ubuntu 18.04 (#81441) 2 years ago
Matt Clay c391cf01e4
[stable-2.13] Clean up MANIFEST.in (#81416)
* Clean up MANIFEST.in (#80688)

* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.

(cherry picked from commit 6e325d9e4d)

* Omit hacking directory from MANIFEST.in (#81245)

* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test

(cherry picked from commit b93a628aed)
2 years ago
Martin Krizek 3999c5bc45
Remove BOTMETA.yml and sanity tests for it (#81198) (#81265)
(cherry picked from commit 39ef570e16)
2 years ago
Matt Clay abab52a7b4
[stable-2.13] Docs removal and other backports (#81409)
* Remove straight.plugin dependency (#80084)

(cherry picked from commit f587856beb)

* Update package-data sanity test (#80344)

The test no longer relies on the Makefile.

(cherry picked from commit 46362bbd27)

* Remove obsolete release bits (#80347)

Releases are now built using the `packaging/release.py` tool.
This makes the `Makefile` and associated files in `packaging/release/` and `packaging/sdist/` obsolete.

(cherry picked from commit 6a66761e0e)

* Use --no-isolation for package-data sanity test (#80377)

The dependencies are already in the sanity test venv. This avoids use of unpinned dependencies and a dependency on a network connection.

(cherry picked from commit 7fcb9960e6)

* Set the minimum setuptools to 45.2.0 (#80649)

Also update the package-data sanity test to use the minimum setuptools version.

(cherry picked from commit 4d25e3d54f)

* Use package_data instead of include_package_data (#80652)

This resolves warnings generated by setuptools such as the following:

_Warning: Package 'ansible.galaxy.data' is absent from the `packages` configuration.

(cherry picked from commit 5ac292e12d)

* Fix os.walk issues in package-data sanity test (#80703)

(cherry picked from commit eea7137449)

* Remove `docs` and `examples` directories (#81011)

* Remove docs dir

* Updates to reflect docs removal

* Fix integration test

* Remove examples dir

* Updates to reflect examples removal

* Remove build_library and build-ansible.py

* Remove refs to build_library and build-ansible.py

* Remove obsolete template

* Remove obsolete template reference

* Remove the now obsolete rstcheck sanity test

(cherry picked from commit 72e038e823)

* Omit pre-built man pages from sdist (#81395)

Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.

(cherry picked from commit 691c8e8603)
2 years ago
Matt Clay 66f04c276a
[stable-2.13] ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) (#81318)
(cherry picked from commit d20a0c02cc)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
2 years ago
Matt Clay b203e0a285
[stable-2.13] Convert non-docs *.rst files to *.md (#81217) (#81224)
* [stable-2.13] Convert non-docs *.rst files to *.md (#81217)

* Rename README.rst to README.md

* Change README format from reStructuredText to Markdown

* Fix whitespace in README.md

* Update setup.cfg to use README.md

* Replace changelog placeholder with README.md

* Update package-data sanity test
(cherry picked from commit 38e50c9f81)

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

* Remove README.rst from MANIFEST.in
2 years ago
Matt Clay bbf1aacf16
[stable-2.13] Add missing skip entries for selinux module_util (#81305) (#81309)
(cherry picked from commit 18cbfc688b)
2 years ago
Matt Clay 191cdf5ae5
[stable-2.13] ansible-test - Pre-build PyYAML wheels (#81300) (#81311)
* [stable-2.13] ansible-test - Pre-build PyYAML wheels (#81300)

This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)

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

* Skip PEP 517 tests on FreeBSD
2 years ago
Matt Clay 3ad838b86c
[stable-2.13] Disable cron integration test on Alpine (#81301) (#81304)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
(cherry picked from commit 261a12b8a9)
2 years ago
Sviatoslav Sydorenko d03bf6430c
Replace `reboot_command` integration test with unit tests (#78956) (#81268)
Co-authored-by: Matt Clay <matt@mystile.com>

(cherry picked from commit b6ebb9d41a)
2 years ago
Matt Clay c8b5d96ee0
[stable-2.13] Use *.md instead of *.rst for test READMEs (#81009). (#81231)
(cherry picked from commit 6ac0ea3567)
2 years ago
Martin Krizek 58ae119ccf
Re-introduce RHEL 9 modularity testing in CI (#81160) (#81194)
(cherry picked from commit 7b2647f3b2)
2 years ago
Matt Davis 2765ab6f28
Remove straight.plugin dependency (#80084) (#81020)
(cherry picked from commit f587856)
3 years ago
Matt Clay bf09febd98
[stable-2.13] ansible-test - local change detection without --fork-point (#79734) (#80901)
(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago
Matt Clay 2babffb5c5
[stable-2.13] ansible-test - Fix traceback when mixing sources (#80801) (#80830)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling.

(cherry picked from commit b16041f1a9)
3 years ago
Matt Clay 1141376de5
[stable-2.13] ansible-test - Fix handling of long timeouts (#80769) (#80774)
(cherry picked from commit aacab0633a)
3 years ago
Matt Clay 9ce8eb56be
[stable-2.13] ansible-test - Fix timeout handling (#80764). (#80767)
(cherry picked from commit 4c6aa70662)
3 years ago
Matt Clay 8f07fda2b5
[stable-2.13] ansible-test - Avoid use of deprecated utcnow (#80750) (#80759)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.

(cherry picked from commit fd341265d0)
3 years ago
Matt Clay ab220107d5
ansible-test - Relax pylint config for backports (#80770) 3 years ago
Matt Clay 4aa5de7a8b
Disable failing incidental_inventory_docker_swarm (#80659)
Also remove remote incidental tests from the test matrix, as this was the last one.
3 years ago
Matt Clay 8fb7c10498
[stable-2.13] ansible-test - Use FreeBSD packaged setuptools (#80615) (#80618)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.

(cherry picked from commit abc58c026b)
3 years ago
Brian Coca ae02b5353d
password lookup, handle ident properly when saved (#80251) (#80312)
* password lookup, handle ident properly when saved (#80251)

* password lookup, handle ident properly when saved

  Currently we format and save ident when present but we didn't account for this when reading the saved file
  Also added some more robust error handling.

(cherry picked from commit 0fd88717c9)

* fix try indent

* clog

* fix bad merge indentation
3 years ago
Jordan Borean 261e5b74cc
Ansible.Basic - Improve temporary file cleanup process (#80293) (#80325)
* Ansible.Basic - Improve temporary file cleanup process

* Add comment on struct value used

(cherry picked from commit ba4505f5cb)
3 years ago
Sloane Hertel 25e77b7c98
Fetch signatures from galaxy after the dependency resolver runs (#80334) (#80399)
Reduce the number of Galaxy API calls made during dependency resolution by fetching remote signatures afterwards, since these are not used in backtracking.

Reduce the verbosity to `-vvvv` (to match other Galaxy API calls) to see this activity.

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
(cherry picked from commit 460abe0cef)
3 years ago
Matt Clay af1cbc9bb6
[stable-2.13] ansible-test - Add support for argcomplete 3 (#80482) (#80486)
(cherry picked from commit 0371ea08d6)
3 years ago
Matt Clay ef0924883b
[stable-2.13] ansible-test - Fix packaging change classification (#80360). (#80362)
(cherry picked from commit 5d64024f1a)
3 years ago
Sviatoslav Sydorenko 18d6ae1e1f
Fix `entry_points` integration test for PEP 517 (#80357)
This patch pre-builds the sdist via build using the self-eliminating
in-tree build backend and then, feeds the result to a pottentially
outdated pip (below v20) so that it uses the setuptools' native
PEP 517 build backend to build a wheel on install.
3 years ago
Sviatoslav Sydorenko 77d221c0ac
[backport-2.13] 📦 Integrate manpage builds into PEP 517 build backend (#80130)
This change includes backports of the PRs #79606, #80098, #80253, #80255 and #80262, with a number of backward compatibility changes that make it work and be testable in older CI environments.

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-memory, in the process of building a source distribution. The build is happening in an isolated temporary directory. 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.

📦 The sdist build-system is switched to pure setuptools upon the first build from Git checkout

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 makes sure not to modify the current
source checkout on that first build.

Co-Authored-By: Matt Clay <matt@mystile.com>
Co-Authored-By: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

(cherry picked from commit 56036013cd)
(cherry picked from commit 67bafafbc0)
(cherry picked from commit 888abf5d6e)
(cherry picked from commit 7097df3eed)
(cherry picked from commit eebfd71a6d)
3 years ago
Felix Fontein e9603d233c
[2.13] ansible-doc: fix broken seealso links in text output (#80286)
* ansible-doc: fix broken seealso links in text output (#80280)

* Fix broken URLs.

* Also remove auto-generated description for modules outside ansible.builtin.

(cherry picked from commit fafb23094e)

* Fix URL processing. (#80295)

(cherry picked from commit 086ae42209)
3 years ago
Matt Clay 6e6b6f1a55
[stable-2.13] Fix url lookup test to use test container (#80284) (#80288)
(cherry picked from commit 054aa92158)
3 years ago
Matt Clay a35e8015e5 [stable-2.13] ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.

(cherry picked from commit bad8843124)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 8cc8aa268d [stable-2.13] Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead..
(cherry picked from commit f47bc03599)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 130fbe8ba5 [stable-2.13] ansible-test - Remove pointless comparison (#80168)
(cherry picked from commit 31658031ed)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay a5d7c73cc9 [stable-2.13] ansible-test - Fix vendoring support (#80074)
- Support loading of vendored Python packages.
- Exclude vendored Python packages from payloads.
(cherry picked from commit 6bfe6b899a)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay ef5842798d [stable-2.13] ansible-test - Show Python version before install (#80022)
Always indicate the Python version being used before installing requirements.
(cherry picked from commit 5e3db6e441)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 866d91bb7d [stable-2.13] 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.
(cherry picked from commit e6cffce0eb)

Co-authored-by: Matt Clay <matt@mystile.com>
3 years ago
Matt Clay 8e2148943b
[stable-2.13] ansible-test - Fix file permissions for delegation (#80204)
* [stable-2.13] 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.
(cherry picked from commit c8c1402ff6)

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

* ansible-test - Fix collection delegation (#79947)

(cherry picked from commit 0793833847)

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
3 years ago
Matt Clay 15e9438b06
[stable-2.13] ansible-test - Fix pylint error with old home dir (#80151) (#80153)
* [stable-2.13] ansible-test - Fix pylint error with old home dir (#80151)
(cherry picked from commit 27287b40c0)

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

* ansible-test - Fix error with missing pylint home (#80155)

(cherry picked from commit 367d45facd)
3 years ago
Matt Clay 74ea1b8f85
[stable-2.13] Fix MANIFEST.in includes (#80147) (#80149)
(cherry picked from commit 7c62cdeecd)
3 years ago
Matt Martz 6cffa10de0
[stable-2.13] Do not use hardcoded httpbin.org in uri tests (#80101) (#80103)
(cherry picked from commit 060a27f)
3 years ago
Matt Davis d5fd83265d
[2.13] don't ignore templated _raw_params that k=v parser failed to parse (#79913) (#79965)
* don't ignore templated _raw_params that k=v parser failed to parse (#79913)

fixes #79862

* backport test changes
3 years ago
Matt Clay 344230fca5 [stable-2.13] ansible-test - Support Podman 4.4.0+
(cherry picked from commit 67d49734f7)

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