Commit Graph

12028 Commits (f1aab39d79e75a7869bbf4322eaf10a86975ebb3)

Author SHA1 Message Date
Jordan Borean 92447debff
win_fetch - improve test time by not scanning Win dir (#81884) (#81887)
(cherry picked from commit dfc62589f6)
1 year ago
Sviatoslav Sydorenko ccb00b74fe
[backport][stable-2.15] Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree (#81747)
* Always allow "no-other-choice" pre-release dependencies when resolving collection dependency tree

PR #81606.

Prior to this patch, when `--pre` CLI flag was not passed, the
dependency resolver would treat concrete collection dependency
candidates (Git repositories, subdirs, tarball URLs, or local dirs or
files etc) as not meeting the requirements.

This patch makes it so pre-releases in any concrete artifact
references, and the ones being specifically pinned dependencies or
user requests, met anywhere in the dependency tree, are allowed
unconditionally.

This is achieved by moving the pre-release check from
`is_satisfied_by()` to the `find_matches()` hook, following the
Pip's example.

As a bonus, this change also fixes the situation when a collection
pre-releases weren't considered if it didn't have any stable releases.
This now works even if `--pre` wasn't requested explicitly.

Finally, this patch partially reverts commit
6f4b4c345b, except for the tests. And it
also improves the `--pre` hint warning to explain that it mostly
affects Galaxy/Automation Hub-hosted collection releases.

Ref #73416
Ref #79112
Fixes #79168
Fixes #80048
Resolves #81605

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 7662a05085)

* Shorten the collection namespace and name @ tests

This is needed on the 2.15 branch which uses older galaxy containers
that have restricted FQCN size.
1 year ago
Matt Martz f71190068b
[stable-2.15] Add compat function for parsing Content-Disposition header (#81807) (#81828)
* py2 compat for get_param

* Add tests, and handle ValueError

* Add clog frag
(cherry picked from commit 831dc6e)
1 year ago
Martin Krizek 2a29739ee6
Allow for searching handler subdir for included task via include_role (#81733) (#81758)
Fixes #81722

(cherry picked from commit 1e7f7875c6)
1 year ago
Sloane Hertel 8f621fd6cd
Only mark a role as complete once a task in it executes for the target host (#81565) (#81668)
* If all tasks in the role are skipped or unreachable, the role is not marked as complete for the host.

* Only mark the role as complete if a task in the role succeeds or fails for the host.

(cherry picked from commit 8034651cd2)
1 year ago
Matt Davis 5888674946
fix various Jinja plugin caching issues (#79781) (#81643)
* fix various Jinja plugin caching issues

* consolidate the wrapper plugin cache
* remove redundant cache in J2 filter/test interceptor

* intra-template loader bypass

* fix early exits swallowing some exception detail

* misc comment cleanup

(cherry picked from commit dd79c49a4d)
1 year ago
Matt Martz 1e930684bc
[stable-2.15] Prevent roles from using symlinks to overwrite files outside of the installation directory (#81780) (#81785)
* Sanitize linkname during role installs

* Add tests

* add clog frag.
(cherry picked from commit ddf0311c63)
1 year ago
Matt Martz 6bae9486b1
[stable-2.15] tarfile: Handle deprecation warning for extract and extractall (#81545) (#81632)
* 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



(cherry picked from commit 1cc5efa)

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
1 year ago
Klaus Frank ac8188febd
first_found fix no terms option (#76550) (#81451)
For backport without the fix for multiple items clobbering previous settings

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 year ago
Martin Krizek caf8cdbe91
include_role: expose vars from parent roles to role's handlers (#81524) (#81548)
Fixes #80459

(cherry picked from commit 98f1627817)
1 year ago
Brian Coca ebe6c7e1c3
filters vault/unvault fix vault_id parameter usage (#81422) (#81448)
* vault/unvault filters, fixed id field to match documented.

fixes #81420

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit f3a15a4a95)
1 year ago
Jordan Borean daa2d9b8fd
PowerShell - remove uneeded dotnet code for future compatibility (#81472) (#81577)
(cherry picked from commit f3976117fb)
1 year ago
Martin Krizek febd0f3a69
Last handler with same name wins for listen too (#81358) (#81525)
Fixes #49371
Fixes #81013

(cherry picked from commit 0cba3b7504)
1 year ago
Matt Martz 733f6542de
[stable-2.15] Revert logic to use Popen.communicate (#80874) (#81517)
* [stable-2.15] Revert logic to use Popen.communicate (#80874)

* Back out use of communicate, add better comments, add bufsize, and align with subprocess._communicate

* tests

* re-order logic slightly

* more comments

* loopty loop

* yet another comment

* Revert "yet another comment"

This reverts commit 96cd8ada5fa0441b92f2298bdaa6cb40594847d2.

* Revert "loopty loop"

This reverts commit 96ea066f6a7d18902c04a14f18dd79b38e56f5e7.

* ci_complete

* Copy in comment too

* Wording updates

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Back out bufsize

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>.
(cherry picked from commit 553f51e728)

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

* Address merge conflict issues
1 year ago
Matt Clay 697af6ba33
[stable-2.15] ansible-test - Always use managed entry points (#81537) (#81539)
(cherry picked from commit 390e508d27)
1 year ago
Matt Clay bdd9e8f1aa
[stable-2.15] Clean up release script (#81488) (#81489)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
(cherry picked from commit 47ab59753c)
1 year ago
Sloane Hertel 20cd618bc8
password_hash - fix bcrypt algorithm when passlib is not installed (#81385) (#81425)
(cherry picked from commit f5431321a2)
1 year ago
Sloane Hertel 85a3eb272a
[2.15] Consider all configured collection paths when installing collections (#81324)
* Consider all configured collection paths when installing collections (#81243)

* Only install collections which can't be satisfied by a collection in any of the configured paths.

* Improve warning for unexpected collection install path

Fix warning when path is configured, but is a pip-managed path

Normalize the path before validating to fix warning consistency

(cherry picked from commit efbc00b6e4)

* Update warning patch for version 2.15 due to non-existence of the config GALAXY_COLLECTIONS_PATH_WARNING
1 year ago
Jordan Borean 8a4a1279df
urls - remove deprecated client key calls (#80751) (#81257)
(cherry picked from commit 0df794e5a4)
1 year ago
Matt Clay 7d561e6e4e
[stable-2.15] Overhaul package-data sanity test (#81427) (#81439)
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)
1 year ago
Matt Clay 4f16d2d9a7
[stable-2.15] ansible-test - Update source layout detection (#81418) (#81434)
(cherry picked from commit c525514994)
1 year ago
Matt Clay 5265794b32
[stable-2.15] Clean up MANIFEST.in (#81414)
* 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)
1 year ago
Martin Krizek 7e63a85dd6
Remove BOTMETA.yml and sanity tests for it (#81198) (#81263)
(cherry picked from commit 39ef570e16)
1 year ago
Matt Clay 21243c5d05
[stable-2.15] Fix os.walk issues in package-data sanity test (#80703). (#81403)
(cherry picked from commit eea7137449)
1 year ago
Matt Clay 5d57a8e363
[stable-2.15] Omit pre-built man pages from sdist (#81395) (#81397)
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)
1 year ago
Matt Clay 63b6dd2454
[stable-2.15] ansible-test: cloudstack: bump test container version (#81319) (#81322)
(cherry picked from commit 99eeaf7da8)

Co-authored-by: René Moser <mail@renemoser.net>
1 year ago
Matt Clay af1fd68cc0
[stable-2.15] ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) (#81316)
(cherry picked from commit d20a0c02cc)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 year ago
Matt Clay 5421a1304c
[stable-2.15] Remove `docs` and `examples` directories (#81011) (#81232)
* 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)
1 year ago
Matt Clay 4684debab5
[stable-2.15] Add missing skip entries for selinux module_util (#81305) (#81307)
(cherry picked from commit 18cbfc688b)
1 year ago
Matt Clay 70dc6d6866
[stable-2.15] Convert non-docs *.rst files to *.md (#81217) (#81222)
* [stable-2.15] 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
1 year ago
Matt Clay 04e4280437
[stable-2.15] ansible-test - Fix sanity traceback with `-e` opt (#81271) (#81272)
Also remove redundant warning about missing programs.

Includes integration tests to verify `-e` does not traceback.
(cherry picked from commit 3f7bf0bcd4)
1 year ago
Matt Clay add8a968e8
[stable-2.15] ansible-test - Pre-build PyYAML wheels (#81300) (#81306)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)
1 year ago
Matt Clay c779af621e
[stable-2.15] Disable cron integration test on Alpine (#81301) (#81302)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
(cherry picked from commit 261a12b8a9)
1 year ago
Sviatoslav Sydorenko a9c656f8f3
Replace `reboot_command` integration test with unit tests (#78956) (#81266)
Co-authored-by: Matt Clay <matt@mystile.com>

(cherry picked from commit b6ebb9d41a)
1 year ago
Matt Clay 2b2510b653
[stable-2.15] Use *.md instead of *.rst for test READMEs (#81009) (#81229)
(cherry picked from commit 6ac0ea3567)
1 year ago
Martin Krizek 0cd0788eac
Properly disable modularity tests for dnf5 only (#81195) (#81196)
(cherry picked from commit eb19692f48)
1 year ago
Martin Krizek 7b97a0232a
Re-introduce RHEL 9 modularity testing in CI (#81160) (#81192)
(cherry picked from commit 7b2647f3b2)
1 year ago
Martin Krizek 94a6f6e0de
Register handlers immediately if currently iterating handlers (#80898) (#81059)
This fixes the issue where handlers notifying other handlers are
not properly run because the notification is not registered unless
another flush_handlers occurs. Instead, if the current host state
is iterating handlers we immediately register the handler to be
run so the notification is not lost.

Fixes #80880

(cherry picked from commit 660f1726c8)

Co-authored-by: James Cammarata <jimi@sngx.net>
1 year ago
Matt Martz 130fdcd50e
[stable-2.15] Don't mutate templar.environment, only overlay on local myenv (#81005). (#81054)
(cherry picked from commit 73e04ef2d6)
1 year ago
Martin Krizek 7a61d9fb11
dnf5 - enable env groups testing in CI (#81032) (#81056)
Implemented in https://github.com/rpm-software-management/dnf5/pull/585

(cherry picked from commit f13e35cbf9)
1 year ago
Matt Martz 2c5856d7bc
[stable-2.15] Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) (#81072)
(cherry picked from commit 56b67cc)
1 year ago
Matt Clay 2f7465969e
ansible-test - Add Fedora 38 remote (#81157)
Also record a known issue for Fedora 37 remotes.
1 year ago
Martin Krizek e5d4cb89f8
dnf5: enable now implemented cacheonly functionality (#81141) (#81145)
Note that this also fixes a traceback caused by backwards incompatible
change in dnf5 where cacheonly was changed from bool to string:
https://github.com/rpm-software-management/dnf5/pull/665/files#diff-ab65249ff7fccadfb2864b6826f6559f7f16fad43fd3bf2da0b4fe8db790d59aR179

(cherry picked from commit 0cc50e0673)
1 year ago
Matt Clay 30f3fc2335
[stable-2.15] ansible-test - Avoid using atexit module (#81096) (#81097)
(cherry picked from commit c3926268e2)
1 year ago
Abhijeet Kasurde 6bddb3d3c1
[bp/2.15] deb822_repository: use http-agent with open_url (#80894)
* Use http-agent in open_url API while getting
  cloudflare content

Fixes: #80809

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2 years ago
Matt Martz 8fe49b6b35
[stable-2.15] URI Module find json sub type (#80745) (#80891)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
(cherry picked from commit 0c7361d9ac)

Co-authored-by: Brent Barbachem <barbacbd@dukes.jmu.edu>
2 years ago
Martin Krizek 01000c622f
Account for overlays when interacting with Jinja envs (#80705) (#80718)
Instead of using Templar.environment in Templar.do_template for
accessing/mutating the environment, myenv local variable should be used
because it is the environment used for actual templating. It can either
point to Templar.environment or newly created environment overlay.

Fixes #80605

(cherry picked from commit 8cd95a8e66)
2 years ago
Matt Clay 88042f98d6
[stable-2.15] ansible-test - local change detection without --fork-point (#79734) (#80899)
(cherry picked from commit a5bb4c7dee)

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

* ansible-test - Refactor layout error handling

(cherry picked from commit b16041f1a9)
2 years ago
Matt Clay 96127a15f3
[stable-2.15] Use subset checks for some collection loader tests (#80812) (#80814)
(cherry picked from commit 2ba24957dd)
2 years ago