Commit Graph
55284 Commits
Author SHA1 Message Date
Matt ClayandMatt Martz bdba82ff07 ansible-test - Upgrade coverage to 7.10.7 (#85981)
(cherry picked from commit 7c2311d547)
2025-10-14 11:52:40 -05:00
Matt ClayandMatt Martz 405e2bf2bf ansible-test - Update pinned pip to 25.2 (#85982)
(cherry picked from commit de7dd5bbb2)
2025-10-14 11:52:40 -05:00
Matt ClayandMatt Martz ed60501603 ansible-test - Update sanity test requirements (#85980)
(cherry picked from commit 9ee667030f)
2025-10-14 11:52:40 -05:00
Matt ClayandMatt Martz d0552b56ef ansible-test - Update base/default containers (#85967)
(cherry picked from commit 82b64d4b69)
2025-10-14 11:52:40 -05:00
Matt ClayandMatt Martz ab4d37a803 Use bcrypt < 5 for unit tests (#85969)
(cherry picked from commit 06456c68ec)
2025-10-14 11:52:40 -05:00
Sviatoslav SydorenkoandMatt Martz 1b6bcc53b1 Mention pkg name in package-data sanity output
The logs were displaying a series of numbers in parens like `(66.1.0)`
at the end of each error line. its unintuitive what that means. I had
to look into the source code to confirm my suspicion of it being the
version of `setuptools`. This patch spells it out.

(cherry picked from commit 53afc6f203)
2025-10-14 11:52:40 -05:00
Sviatoslav SydorenkoandMatt Martz 3f7cfd961c Use strict_optional @ ansible.galaxy.dependency_resolution
This patch drops unnecessary default for
`CollectionDependencyProvider`'s `concrete_artifacts_manager` argument
as it is always passed, in every place across the code base where the
provider is constructed.

It was also causing MyPy violations on calls to
`_ComputedReqKindsMixin.from_requirement_dict()` in the "strict
optional" mode which is now enforced for $sbj, while remaining
disabled globally.

It is a #85545 follow-up.

(cherry picked from commit 0cd36ce6d0)
2025-10-14 11:52:40 -05:00
Sviatoslav SydorenkoandMatt Martz bef8eece4b Type-annotate ansible.galaxy.dependency_resolution
This patch is a combination of `pyrefly autotype` and manual
post-processing. Parts of it migrate pre-existing comment-based
annotations, fixing incorrect ones where applicable.

The change also configures MyPy to run checks against actual
`resolvelib` annotations and includes a small tweak of
`ansible.galaxy.collection._resolve_depenency_map` to make it
compatible with those.

Co-Authored-By: Jordan Borean <jborean93@gmail.com>
Co-Authored-By: Matt Clay <matt@mystile.com>
Co-Authored-By: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit c9131aa847)
2025-10-14 11:52:40 -05:00
David ShrewsburyandMatt Martz cc6a93f23e Fix flakey get_url test (#85953)
(cherry picked from commit feda8fc564)
2025-10-14 11:52:40 -05:00
sivel / Matt MartzandGitHub 59dc766d7d [stable-2.20] Fix signal propagation (#85907) (#85983)
(cherry picked from commit 5a9afe4)
2025-10-14 09:24:14 -05:00
sivel / Matt MartzandGitHub a4776f850c Update Ansible release version to v2.20.0b2.post0. (#85954) 2025-10-06 21:45:41 +00:00
sivel / Matt MartzandGitHub 4f1fe10921 New release v2.20.0b2 (#85950) v2.20.0b2 2025-10-06 16:13:24 -05:00
sivel / Matt Martz ff29cd4ff0 Update DataLoader.get_basedir to be an abspath (#85940)
(cherry picked from commit 6673a14a9e)
2025-10-06 11:58:06 -05:00
s-hamannandMatt Martz 06f272129c fetch - return file in result when changed is true (#85729)
Set the (source) file attribute in the return value if the file changed
(e.g. on initial fetch). The attribute is already set in all other
cases.

(cherry picked from commit 0c7dcb65cf)
2025-10-06 11:58:06 -05:00
Martin KrizekandMatt Martz 0f079fd23f Deprecate ansible.module_utils.six (#85934)
* Deprecate `ansible.module_utils.six`

Fixes #85920

(cherry picked from commit 686c3658ae)
2025-10-06 11:58:06 -05:00
Sloane HertelandMatt Martz cbeb1da98b Remove support for resolvelib < 0.8.0 (#85936)
* Remove support for resolvelib < 0.8.0

Remove code handling differences between resolvelib 0.5.3 and 0.8.0

Drop some versions from the test to reduce the time it takes to run

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>

* Remove type annotation

---------

Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
(cherry picked from commit cb2ecda514)
2025-10-06 11:58:06 -05:00
Martin KrizekandMatt Martz 7db5959813 Don't special case implicit meta tasks when filtering on tags (#85805)
* Don't special case implicit meta tasks when filtering on tags

Fixes #85475

(cherry picked from commit 313c6f6b4d)
2025-10-06 11:58:05 -05:00
Abhijeet KasurdeandMatt Martz 40b11f86fb known_hosts: return rc and stderr in fail_json (#85871)
* When ssh-keygen fails, return rc and stderr in fail_json
  in order to help debugging.

Fixes: #85850

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit 6bee84318d)
2025-10-06 11:58:05 -05:00
Martin KrizekandMatt Martz 580eb781dc import_tasks processing closer to include_tasks (#85877)
Fixes #69882
Closes #83853
Fixes #85855
Fixes #85856

(cherry picked from commit c3f87b31d1)
2025-10-06 11:58:05 -05:00
Abhijeet KasurdeandMatt Martz f23224d7b4 falsy: Update doc (#85913)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
(cherry picked from commit c5e6227bdb)
2025-10-06 11:58:05 -05:00
Luca SteinkeandMatt Martz 418746dcfc fix description of truthy test (#85911)
There's a "not" too much here.

Maybe further examples can be found.

(cherry picked from commit eafa139f77)
2025-10-06 11:58:05 -05:00
Felix FonteinandMatt Martz 48ef23fe4f Make sure ansible-doc doesn't crash when scanning collections whose path contains ansible_collections twice (#85361)
Ref: https://github.com/ansible/ansible/issues/84909#issuecomment-2767335761

Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
(cherry picked from commit c6d8d206af)
2025-10-06 11:58:05 -05:00
Matt DavisandGitHub 00ee6040b6 Update Ansible release version to v2.20.0b1.post0. (#85902) 2025-09-23 18:59:34 +00:00
Matt DavisandGitHub 21de43ab65 New release v2.20.0b1 (#85901) v2.20.0b1 2025-09-23 18:18:11 +00:00
Matt DavisandGitHub 5125ec797c update 2.20 release codename (#85900) 2025-09-23 17:34:21 +00:00
Abhijeet KasurdeandGitHub 5fc4b8c106 action: more debugging information (#85839)
* action: more debugging information

* Allow user to identify underlying problem with chmod, setfacl
  command.

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

* Review requests

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

* Review requests

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

* Review requests

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>

---------

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-09-23 17:07:00 +02:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)andGitHub 1e572ba5cc 🧪 Pin codecov-cli deptree used in AZP
PR #85888

`codecov-cli == 11.0.3` allows `click == 8.3.0` in its deps but the latter causes commit auto-discovery breakage in the former. With https://github.com/getsentry/prevent-cli/pull/95, `codecov-cli == 11.2.3` excludes this version so this patch updates the requirement to that.

To prevent this from happening again, the change also makes use of a pip constraint file that pins the entire dependency tree to concrete versions. The constraint file is managed by `pip-tools`.

Refs:
* https://github.com/getsentry/prevent-cli/pull/95
* https://github.com/pallets/click/issues/3066

ci_coverage
ci_complete
2025-09-23 15:07:00 +02:00
Matt ClayandGitHub 58bad71859 Move display internals into _internal (#85889) 2025-09-22 16:07:10 -07:00
79ddee15a0 Prevent IO capture hang/loss in basic.run_command (#85869)
* Prevent run_command output truncation or hang

In cases when the selector used to monitor stdout/stderr activates without
data ready to read (a rare but normal condition), a read from a non-blocking
FD can return `None`, which was being conflated with an empty read (EOF)
condition. This caused the selector to be unregistered prematurely,
sometimes resulting in truncated output or hangs. `None` read results
are now excluded from EOF conditions.

* add changelog

---------

Co-authored-by: Matt Davis <nitzmahone@redhat.com>
2025-09-19 16:56:21 +00:00
Sloane HertelandGitHub 27a56a34df Add feature preview play argument spec validation (#85763)
* Add new play keyword validate_argspec

Set to True to use the play name as the argument spec identifier. A play name is required (i.e. a host pattern is not supported as an argument spec name).

Alternatively, set to a specific argument spec name.

A valid argument spec for the play is required. Example:

# playbook.meta.yml
argument_specs:
  name of the play:
    options: {}

* Play argument spec validation runs after fact gathering

Play keywords like tags are inherited and work similarly to fact gathering
2025-09-18 15:13:07 -04:00
Brian CocaandGitHub c87dc6ed7d script inventory plugin correct error message (#85765)
type was reflecting 'converted' type, not 'pre conversion' of the data
now message points at specific data keys
add deprecation tests
2025-09-17 09:59:37 -04:00
Sloane HertelandGitHub 43bb87107d Remove 'usage' parameter from CLI.init_parser and ansible.cli.arguments.option_helpers.create_base_parser (#85859)
The usage is generated from CLI arguments
2025-09-16 08:16:25 -07:00
Sloane HertelandGitHub 5e8815b823 Fix ansible-doc -l/-F/--metadata-dump for relative imports in filter/test plugins (#85801)
* Add test for sidecar documentation for filter plugin in a subdirectory

Fix ansible-doc --list/--list_files/--metadata-dump for relative imports in nested filter/test plugin files
2025-09-15 18:15:55 -04:00
Sloane HertelandGitHub ced362a50d ansible-galaxy - remove deprecated v2 API (#85830)
* ansible-galaxy - remove deprecated v2 API

Update unit tests exercising the v2 Galaxy API

Remove v2 API integration tests

* Remove internal test configuration for servers which support API v2 and v3

* Update and simplify verify tests by using the configured server list
2025-09-15 17:29:12 -04:00
e30da51731 Fix jsonfile cache on WSL (#85816)
On WSL, `os.rename` can't correctly move a file while a handle to that file is still open. It remains half-moved where neither the source or destination seem to exist (according to `os.path.exists`). However the move seems to complete correctly when the open handle is closed.

In `BaseFileCacheModule`, when writing a cache file, a temporary file is created with `mkstemp` that returns an open file descriptor and a filename. Once the cache is written to that file, it is renamed to the correct file name with `os.rename` and then its permissions set with `os.chmod`. On WSL the `os.chmod` fails because it doesn't think the file exists yet because the file descriptor returned by `mkstemp` is still open. This PR fixes this by closing that file descriptor before renaming.

Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2025-09-11 23:09:59 +00:00
Matt ClayandGitHub 967d654ef6 ansible-test - More container updates. (#85843) 2025-09-11 15:56:14 +00:00
Matt ClayandGitHub 9966e01f81 ansible-test - Update containers (#85842) 2025-09-10 17:32:20 -07:00
Ketan KelkarandGitHub 18691ec83f Replace module - update string comparison method from bytes to unicode (#85785) 2025-09-10 17:31:22 -05:00
Abhijeet KasurdeandGitHub cf9d78206c blockinfile: use line_separator variable (#85798)
* Future proofing the usage of line separator in blockinfile module.

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-09-10 19:27:34 +00:00
Matt ClayandGitHub d2940880ed ansible-test - Upgrade coverage to 7.10.6 (#85831) 2025-09-09 09:59:36 -07:00
Zdeněk VydraandGitHub 60511c2a08 Fix uri form-multipart to not overwrite filename to allow retries (#85010) 2025-09-09 16:09:28 +00:00
Matt ClayandGitHub ddbedc6ac6 Update mypy sanity test requirements (#85832) 2025-09-08 17:43:38 -07:00
Jordan BoreanandGitHub eda1383da7 Remove deprecation marker that has been actioned (#85812) 2025-09-09 06:51:21 +10:00
Jordan BoreanandGitHub 250610b924 Remove tarfile data_filter check (#85808)
Removes the now uneeded tarfile check for data_filter now that our
minimum Python version on the controller is 3.12 and guarantees it will
be present.
2025-09-09 04:30:54 +10:00
Jordan BoreanandGitHub aad9fbd4f5 Windows async - handle trailing junk output (#85820)
Add handling for when a PowerShell module emits more than just the
module result JSON. The behaviour reflects the Python async wrapper
where trailing data after the module result will emit a warning.
2025-09-09 04:30:38 +10:00
Matt MartzandGitHub df1da0419e Remove duplicate future import (#85824) 2025-09-08 12:26:47 -05:00
Abhijeet KasurdeandGitHub 1cd4369815 fetch_file: add ca_path and cookies parameters (#85187)
* Added ca_path and cookies parameter arguments to fetch_file method
  to specify CA path and Cookies to fetch file from URL. These parameters
  are already supported by fetch_url.

Fixes: #85172

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-09-08 14:44:17 +00:00
Martin KrizekandGitHub 065f202d30 Remove (de)serialize methods (#85724)
* move task specific from_attrs to Task
* Keep deserialize on PC, add tests
2025-09-08 09:24:08 -05:00
Patrick KingstonandGitHub 36f00cdf1a Expand integration test coverage for deb822_repository module
PR #85586
2025-09-08 15:41:22 +02:00
Abhijeet KasurdeandGitHub 975f60ebf9 encrypt: Remove deprecated passlib_or_crypt API (#85506)
Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
2025-09-05 22:19:53 +00:00