* clog frag
* Fix retries so that each explicit call to _call_galaxy is retried for the correct number of attempts. Fixes#80174
* Extend retry logic to common URL related connection errors. Fixes#80170
* Extend retries to downloading artifacts
* Extend param docs for change
* Rework the exception handling
* Don't be overly broad, reduce to TimeoutError, and BadStatusLine for now
* _download_file needs to raise AnsibleError.orig_exc
* Remove unused import
* Add IncompleteRead
* Add socket.timeout for py39
* Add 502 to retry codes
* Move http error code checking first
* Use itertools.tee to replay the backoff_iterator instead of using a callable
* Actually set a CLI default of 60s for timeout, to prevent implicit galaxy from using 10s as default from Request.open
* Import typing
* fix type hints
* Use http.HTTPStatus instead of int HTTP error codes where feasible
* Split exception handling
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* Add missing import
---------
Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* 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.
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>
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.
##### 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
* 🧪 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
* ✨ 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
* 🐛 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.