Commit Graph
53768 Commits
Author SHA1 Message Date
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>
2023-03-20 12:01:16 -07:00
Sviatoslav SydorenkoandGitHub 888abf5d6e Make isolated source changes @ PEP 517 backend (#80253) 2023-03-20 11:26:53 -07:00
Benoît GeeraertsandGitHub 1491ec8019 Update special_variables.rst (#80210)
The usage of a glossary on this page will allow linking to a specific special variable, like on the glossary page, e.g.: https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html#term-Idempotency
2023-03-17 09:55:04 -04:00
Ken DreyerandGitHub fc8203168e uri: improve force_basic_auth documentation (#80211)
Add more details about what "true" and "false" mean for the
force_basic_auth setting. Give example scenarios when clients may want
to use this setting.
2023-03-17 09:41:31 -04:00
Esther ChristopherandGitHub 0937cc4862 Update connection.rst (#80194) 2023-03-16 16:13:01 -04:00
Alicia CozineandGitHub 507fd1bd60 Document debugging conditionals (#80239)
##### SUMMARY
Add a section to the docs describing how to debug conditional statements - how to get Ansible to show you whether your `when:` clause evaluates to `true` or `false`.

I ran into trouble with this and couldn't find anything in the docs. Thought I'd add it.


##### ISSUE TYPE
- Docs Pull Request

+label: docsite_pr
2023-03-16 15:47:01 -04:00
Sumanth LingappaandGitHub 0a6333f7d0 corrected class documentation (#80241) 2023-03-16 15:38:02 -04:00
Ikko Eltociear AshimineandGitHub 516cb9a52e fix typo in plugin_docs.py (#80195)
lable -> label
2023-03-16 10:34:08 -04:00
Matt ClayandGitHub bad8843124 ansible-test - Update git diff handling (#80202)
This change allows ansible-test to work with newer versions of git on AZP.
2023-03-13 15:29:09 -07:00
Hugo van KemenadeandGitHub 1c156c0d16 Replace deprecated BadZipfile with BadZipFile (#80198)
* Replace deprecated BadZipfile with BadZipFile

* Retain support for Python 2.7
2023-03-13 05:39:30 +10:00
Kristian HeljasandGitHub 7ce951ff48 Adjust release schedule docs to four weeks (#80166) 2023-03-10 11:41:45 -05:00
Sloane HertelandGitHub 6165dfea40 ansible-galaxy role info - fix unhandled AttributeError
* catch GalaxyError instead of its base class to ensure it will have a http_error attribute
2023-03-09 16:47:13 -05:00
HarmdhastandGitHub cb2180e286 Fixed typo (#80184)
`uvault` should be `unvault`
2023-03-09 11:21:08 -08:00
Matt ClayandGitHub f3bc0f18ff ansible-test - Update base and default container (#80178) 2023-03-08 14:38:14 -08:00
Matt ClayandGitHub 85b5f31f75 Update mypy to 1.1.1 (#80175) 2023-03-08 13:11:03 -08:00
Sloane HertelandGitHub 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
2023-03-08 15:40:01 -05:00
Matt ClayandGitHub c564c6e21e ansible-test - Update pylint requirements (#80172) 2023-03-08 12:15:02 -08:00
Matt ClayandGitHub 31658031ed ansible-test - Remove pointless comparison (#80168) 2023-03-08 11:06:54 -08:00
Martin KrizekandGitHub cfa7acbc19 Raise an error on invalid FA.isa value (#80040)
Avoids bad definitions of playbook classes
2023-03-08 12:48:43 -05:00
Sviatoslav SydorenkoandGitHub 701f8852ec Revert "🧪 Switch macOS 13.2 to 12.0 in CI (#80145)" (#80156)
This reverts commit 326e70c02a.
2023-03-07 23:13:42 -08:00
Sloane HertelandGitHub 46c08c4467 move test so it runs when the plugin is modified (#80158) 2023-03-07 17:13:02 -05:00
Sloane HertelandGitHub 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
2023-03-07 16:05:13 -05:00
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>
2023-03-07 10:09:14 -06:00
Martin KrizekandGitHub 694f12d01b Avoid redundant unsafe wrapping in ansible_eval_concat (#80143)
The wrap_var is done in do_template for all concat functions after their
return.
2023-03-07 16:14:52 +01:00
Zachary PeschkeandGitHub 12c1891ce6 Fix spelling and grammar in subelements filter doc (#80137) 2023-03-07 16:05:02 +01:00
Matt ClayandGitHub 367d45facd ansible-test - Fix error with missing pylint home (#80155) 2023-03-06 19:49:21 -08:00
Matt ClayandGitHub 27287b40c0 ansible-test - Fix pylint error with old home dir (#80151) 2023-03-06 17:58:14 -08:00
Matt ClayandGitHub 7c62cdeecd Fix MANIFEST.in includes (#80147) 2023-03-06 15:28:53 -08:00
Sviatoslav SydorenkoandGitHub 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
2023-03-06 14:55:12 -08:00
Brian CocaandGitHub ca604513db apt_repository, dont assume only missing apt-key will populate stderr (#79827)
fixes #79825
2023-03-06 16:14:35 -05:00
Brian CocaandGitHub 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
2023-03-06 15:46:54 -05:00
Don NaroandGitHub 1055803c3a docsite requirements path (#80134) 2023-03-03 10:09:40 -05:00
Jairo LlopisandGitHub 3216e071c7 docs: automatic always tag in gather_facts (#80052) 2023-03-03 10:08:03 -05:00
Sviatoslav SydorenkoandGitHub 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
2023-03-03 04:30:30 +01:00
Sviatoslav SydorenkoandGitHub 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.
2023-03-03 02:34:29 +01:00
Keeper-of-the-KeysandGitHub cc8e6d06d0 Update playbooks_conditionals.rst (#80062)
"changed" was missing from the docs
2023-03-02 14:17:50 -05:00
Sandra McCannandGitHub 0521184337 clarify playbook tests (#80073) 2023-03-02 14:14:31 -05:00
Andreas DeiningerandGitHub 841b71c94f Fixing typos (#80045) 2023-03-02 14:04:43 -05:00
Klaus FrankandGitHub 809727a7c7 improve password lookup syntax in examples (#80092) 2023-03-02 14:03:26 -05:00
Akira YokochiandGitHub 012393e2cd fix link for development guidelines (#80055) 2023-03-02 13:54:42 -05:00
02c49ffe60 Encourage true/false for module documentation (#80060)
Co-authored-by: Felix Fontein <felix@fontein.de>
2023-03-02 13:46:02 -05:00
Nicolas PandGitHub c8f740cfee Fix typo docs in playbooks_tags.rst (#80117) 2023-03-02 13:32:22 -05:00
Don NaroandGitHub 352010f9c3 improve doc dependency install steps (#80120) 2023-03-02 13:31:08 -05:00
Sviatoslav SydorenkoandGitHub 980ec16422 📦 Drop unnecessary wheel PEP 517 build dependency (#80096)
Code snippets advertising the `wheel` dependency in the
`pyproject.toml`'s `[build-system].requires` setting were a historical
mistake. This has been corrected in
https://github.com/pypa/setuptools/commit/f7d30a95 but many pyprojects
still have `wheel` in their configs.

It is not needed for building sdists and the corresponding setuptools'
PEP 517 hook that provides requirements for building wheels already
esposes this dependency automatically.
2023-03-01 12:07:59 -06:00
Sam DoranandGitHub 292c70368b unarchive - log errors from underlying commands (#75329)
* unarchive - log errors from underlying commands

When a command run by the module fails, log the errors if debugging is enabled.

* Use debug() method
2023-03-01 16:55:14 +01:00
Sam DoranandGitHub 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
2023-03-01 16:54:00 +01:00
Matt ClayandGitHub f47bc03599 Relocate the AZP entry point scripts (#80114)
Scripts previously under `test/utils/shippable/` are now under `.azure-pipelines/commands/` instead.
2023-02-28 13:21:11 -08:00
Sloane HertelandGitHub 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.
2023-02-28 12:21:48 -08:00
Matt ClayandGitHub 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.
2023-02-28 11:46:36 -08:00
67bafafbc0 🎨 Convert RST to manpage in-memory @ PEP 517 (#80098)
* Add _convert_rst_in_template_to_manpage arg types

* 📦 Make manpage build dependencies conditional

Previously, said dependencies were declared as unconditionally
required even when manpages not needed to be built. This patch
Makes it so they are only required when needed.

* Correct _generate_rst_in_templates returned type

It was marked as Path before this patch but in fact, it's iterable of
paths.

* 🎨 Convert RST to manpage in-memory @ PEP 517

Previously, the automation was writing a temporary templated RST on
disk and calling a helper CLI script on that. But with this change, it
happens with less unnecessary I/O.

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

* 📦Expose sdist manpage build deps unconditionally

Due to a bug in pypa/build, the `get_requires_for_build_sdist()` hook
is always invoked with `config_settings=None`. This means that we
cannot conditionally extend build requirements in said hook.

As a workaround, this patch makes hook pretend that `--built-manpages`
is always passed.

Ref: https://github.com/pypa/build/issues/559.

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-02-28 16:13:41 +01:00