Commit Graph

53383 Commits (cdd36b908d2c34bd72f9c6f13656df2ecc59c8f9)
 

Author SHA1 Message Date
Matt Clay 6f20fe3599
Fix backport of #81379 (#81386)
Two copies of the file existed in this branch, but only one was updated previously.
1 year ago
Matt Clay 60f48ad1a3
[stable-2.14] Include subcommands in generated man pages (#81378) (#81383)
Sub commands of `ansible-galaxy role` and `ansible-galaxy collection` are now documented.
(cherry picked from commit 081c60b9d3)
1 year ago
Matt Clay 63413cb0d4
[stable-2.14] Fix misrendered sections in manpage generation (#81380)
This change fixes bugs in the manpage generator that existed since it
was first added.

It exposes CLI `ARGUMENTS` value to manpage templates.

Before this change, the code contained a typo, causing the `for`-loop
iterate over individual characters of the `'ARGUMENTS'` string rather
than iterating over a tuple. A missing comma was at fault.

The updated code gets rid of the `for`-loop and conditionals since it
seems to have been a premature complexity increase and no other things
than `'ARGUMENTS'` were ever added into the broken iterable.

The functional change is that `arguments` is now always present in the
Jinja2 context, unlike being missing sometimes because of the previous
design (not that it was ever present, because of the bug! sigh...)

The Jinja2 templates perform an `{% if arguments %}` check, letting
the template engine silently ignore the missing variable. The clause
was always falsy, meaning that the arguments section was not included
in the manpages for at least the last 6 years. With this fix, it will
be.

This patch also deduplicates calling `opt_doc_list` @ generate_man.

It was called late in the execution, more times than necessary. This
patch makes sure it happens once by putting it at the top of the scope.

It fixes rendering library and inventory in manpages.

The corresponding Jinja2 templates have blocks wrapped with
conditionals like `{% if inventory %}` and `{% if library %}` but said
variables were never injected into the context, nor were they even
deduced on the Python side of the generator. This means that the
conditional clauses were always falsy, never showing the portions of
the manpages.

The Python script has hints for how the `inventory` variable was to be
calculated, which is confirmed through the Git paleontology efforts.

The block of code that references to the `inventory` bit was
incorrectly checking a variable with a list of nested objects for the
presence of a string which was never going to work.

This patch fixes this check by verifying the CLI flag against the
correct variable containing a list of options and exposes it to the
Jinja2 templates.
It also exposes the `library` variable in a similar way.

The block displaying other binaries in Sphinx CLI docs has been
synchronized with the manpage template.
Previously, the current binary was displayed also. This patch gets rid
of the unwanted trailing comma there too.

Finally, the CLI executables list in the manpage template now reuses
the same variable as the RST template that doesn't need any
post-processing in Jinja2.
Before, it was already used in the RST template so this patch aligns
both templates to use the same logic as they got out-of-sync over time.

PR #80450.
(cherry picked from commit a84b3a4e72)

Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
1 year ago
Matt Clay 10f4d6b982
[stable-2.14] Fix missing command descriptions in manpages/docs (#81366). (#81371)
(cherry picked from commit 32b388b4ca)
1 year ago
Matt Clay b42dcee567
[stable-2.14] Fix command doc lookup in man page generation (#81365) (#81368)
(cherry picked from commit f9d674fcfd)
1 year ago
Matt Clay aaeb2c0b08
[stable-2.14] Exclude internal options from man pages and docs (#81360) (#81362)
(cherry picked from commit fead654671)
1 year ago
Matt Clay b660c7ec1e
[stable-2.14] ansible-test - update module_utils/urls.py unit test to support cryptography >= 41.0.0 (#81296) (#81317)
(cherry picked from commit d20a0c02cc)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
1 year ago
Matt Clay 71f3f1601a
[stable-2.14] Convert non-docs *.rst files to *.md (#81217) (#81223)
* [stable-2.14] 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 a5010e1630
[stable-2.14] Add missing skip entries for selinux module_util (#81305) (#81308)
(cherry picked from commit 18cbfc688b)
1 year ago
Matt Clay bff040a0b6
[stable-2.14] ansible-test - Pre-build PyYAML wheels (#81300) (#81310)
This works around Cython failures when attempting to install PyYAML >= 5.4 <= 6.0..
(cherry picked from commit e964078a83)
1 year ago
Matt Clay f2246d3a3f
[stable-2.14] Disable cron integration test on Alpine (#81301) (#81303)
The tests are now failing due to the lack of `libfaketime` in the Alpine repos.
(cherry picked from commit 261a12b8a9)
1 year ago
Matt Clay 5698f942c9
Update Ansible release version to v2.14.8.post0. (#81287) 1 year ago
Matt Clay 3dd60bfaf8
New release v2.14.8 (#81284) 1 year ago
Sviatoslav Sydorenko 50390e40ee
Replace `reboot_command` integration test with unit tests (#78956) (#81267)
Co-authored-by: Matt Clay <matt@mystile.com>

(cherry picked from commit b6ebb9d41a)
1 year ago
Matt Clay b5ad911da8
[stable-2.14] Use *.md instead of *.rst for test READMEs (#81009) (#81230)
(cherry picked from commit 6ac0ea3567)
1 year ago
Matt Clay 7f543f3d5f
[stable-2.14] Reorganize CI sanity test matrix (#81004) (#81226)
(cherry picked from commit ff359fa8e1)
1 year ago
Matt Davis 65f76121fb
Update Ansible release version to v2.14.8rc1.post0. (#81210) 1 year ago
Matt Davis ec2fb0da49
New release v2.14.8rc1 (#81205) 1 year ago
Martin Krizek 5cd02deacf
Re-introduce RHEL 9 modularity testing in CI (#81160) (#81193)
(cherry picked from commit 7b2647f3b2)
1 year ago
Matt Martz 939370ea32
[stable-2.14] Resolve issues on python pre-3.10.6 with collection dirs longer than 100 characters (#81061) (#81073)
(cherry picked from commit 56b67cc)
1 year ago
Matt Martz c8fe9a74a1
[stable-2.14] Cache field attributes list on the playbook classes (#79091) (#81089)
* [stable-2.14] Cache field attributes list on the playbook classes (#79091)

* Cache field attributes list on the playbook classes
(cherry picked from commit 5863770)

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>

* Replace deprecated stacked `@classmethod` and `@property` (#79952)

(cherry picked from commit 243d1b5e3d)

---------

Co-authored-by: Martin Krizek <martin.krizek@gmail.com>
1 year ago
Matt Clay 178acc3805
[stable-2.14] ansible-test - Avoid using atexit module (#81096) (#81098)
(cherry picked from commit c3926268e2)
1 year ago
Matt Martz b1dea51116
Update Ansible release version to v2.14.7.post0. (#81090) 1 year ago
Matt Martz 41258d3c8d
New release v2.14.7 (#81087) 1 year ago
Matt Davis a2c685d300
[stable-2.14] define code owners to support branch-protection rules on docs (#81041) (#81044)
* during interim docs/ (and related dirs) split to separate repo, prevent merges that might require a rebase of the target repo
(cherry picked from commit 9117762358)
1 year ago
Matt Martz f2eb324313
Update Ansible release version to v2.14.7rc1.post0. (#81038) 1 year ago
Matt Martz 9d262f177f
New release v2.14.7rc1 (#81035) 1 year ago
Sviatoslav Sydorenko b06c10b1ed
Bump azure-pipelines-test-container to v4.0.1 @ CI (#80938)
This patch updates the test container used in CI to the new v4 that
defaults to using Python 3.10 and is based on Ubuntu 22.04 Jammy[[1]].

[1]: https://github.com/ansible/azure-pipelines-test-container/pull/17
1 year ago
Matt Clay dd63e31124
[stable-2.14] Remove hacking dir dependency from build backend (#81026)
* Copy man generation files into build backend

* Use copied files in build backend
1 year ago
Matt Clay 2918785895
[stable-2.14] Remove docs dir dependency from man page build (#81003) (#81023)
* [stable-2.14] Remove docs dir dependency from man page build (#81003)
(cherry picked from commit b3f1290bcd)

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

* Update path in Makefile
1 year ago
Matt Davis fb91d25257
Remove straight.plugin dependency (#80084) (#81019)
(cherry picked from commit f587856)
1 year ago
Matt Martz 5e347b0439
[stable-2.14] URI Module find json sub type (#80745) (#80870)
* uri: fixed search for json types to include strings in the format xxx/yyy+json
(cherry picked from commit 0c7361d)

Co-authored-by: Brent Barbachem <barbacbd@dukes.jmu.edu>
1 year ago
Matt Clay a22c346620
[stable-2.14] ansible-test - local change detection without --fork-point (#79734) (#80900)
(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
2 years ago
Don Naro 54921364c4
update version switcher for 2.15 (#80791)
Co-authored-by: Sandra McCann <samccann@redhat.com>
2 years ago
Matt Clay 45df7a9534
[stable-2.14] ansible-test - Fix traceback when mixing sources (#80801) (#80828)
* ansible-test - Fix traceback when mixing sources

* ansible-test - Refactor layout error handling

(cherry picked from commit b16041f1a9)
2 years ago
Matt Martz 2a1cf1ae91
Update Ansible release version to v2.14.6.post0. (#80865) 2 years ago
Matt Martz 2932c4c48a
New release v2.14.6 (#80860) 2 years ago
Matt Martz 5cb5c46eba
Update Ansible release version to v2.14.6rc1.post0. (#80803) 2 years ago
Matt Martz 1cbb689829
New release v2.14.6rc1 (#80798) 2 years ago
Matt Clay 016fbec2a5
[stable-2.14] ansible-test - Fix handling of long timeouts (#80769) (#80773)
(cherry picked from commit aacab0633a)
2 years ago
Matt Clay 5ab8903d58
[stable-2.14] ansible-test - Fix timeout handling (#80764) (#80766)
(cherry picked from commit 4c6aa70662)
2 years ago
Matt Clay 85644ca5e8
[stable-2.14] ansible-test - Avoid use of deprecated utcnow (#80750) (#80758)
The timestamps are only used by ansible-test, not the junit callback, so this change only impacts ansible-test.

(cherry picked from commit fd341265d0)
2 years ago
Sloane Hertel 594f37dbb4
[ansible-galaxy] Fix installing signed collections (#80661) (#80666)
* Fix installing signed collections by using the fqcn, version, source, and type as a unique identifier.

Define __hash__ and __eq__ methods to handle Candidate/Requirement comparison excluding signatures which aren't fully populated until install time.

* Remove PinnedCandidateRequests since it is redundant now.

* Fix verifying against a signed remote when the keyring isn't configured

(cherry picked from commit d5e2e7a0a8)
2 years ago
Martin Krizek 4008335f41
Account for overlays when interacting with Jinja envs (#80705) (#80717)
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 55b0b69545
[stable-2.14] pep517 backend - Copy symlinks when copying source (#80690) (#80701)
(cherry picked from commit 54576cd794)
2 years ago
Matt Martz 88a25b7fdc
Reconfigure stdout/stderr to replace invalid UTF-8 characters. Fixes #80258 (#80552) 2 years ago
Matt Clay 0e58877f35
[stable-2.14] Release tool improvements (#80641) (#80680)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.

(cherry picked from commit d37678c5ff)
2 years ago
Matt Clay db039c1744
[stable-2.14] ansible-test - Use FreeBSD packaged setuptools (#80615) (#80617)
This will avoid issues during bootstrapping caused by breaking changes in setuptools.

(cherry picked from commit abc58c026b)
2 years ago
Matt Martz b41ac8ca60
Update Ansible release version to v2.14.5.post0. (#80614) 2 years ago
Matt Martz 5c6dfff687
New release v2.14.5 (#80611) 2 years ago