1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
Léo GATELLIER 5a1ee4e3ee
[PR #7790/787fa462 backport][stable-7] fix(modules/gitlab_runner): Use correct argument to list all runners (#8311)
[PR #7790/787fa462 backport][stable-8] fix(modules/gitlab_runner): Use correct argument to list all runners (#8032)

fix(modules/gitlab_runner): Use correct argument to list all runners (#7790)

* fix(modules/gitlab_runner): Use correct argument to list all runners

python-gitlab 4.0.0 removed support for the `as_list=False` parameter.
This functionality is now available as `iterator=True`.

Without this change, the module actually only retrieves the first
20 results, which can lead to non-idempotent behavior, such as
registering a runner again.

* Add changelog entry (#7790)

* gitlab_runner: Check python-gitlab version when listing runners

* gitlab: Add list_all_kwargs variable to module_utils

* refactor(gitlab modules): use list_all_kwargs where it helps (#7790)

I did not change every instance of all=True or all=False, only those
which could obviously benefit from simplifying:

  * Code using `all=True` but then searching for any items that match a
    condition (no need to collect the full list).
  * Code that basically reimplements `all=True` with manual pagination.
    (These could be changed to `all=True`, but `list_all_kwargs` also
    sets per_page to 100, to gather data faster.)

* gitlab_instance_variable: Use list_all_kwargs

* Add new changelog entry for gitlab module changes (#7790)

(cherry picked from commit 787fa46217)

Co-authored-by: patchback[bot] <45432694+patchback[bot]@users.noreply.github.com>
Co-authored-by: Mike Wadsten <mikewadsten@gmail.com>
2024-05-06 19:45:53 +02:00
..
action [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
become [PR #6935/24feb1dd backport][stable-7] machinectl become plugin: mark as require_tty (#6942) 2023-07-15 16:27:26 +02:00
cache [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
callback [PR #7549/d530470d backport][stable-7] logentries: docs improvements (#7571) 2023-11-22 19:27:28 +01:00
connection [PR #7873/13e3161f backport][stable-7] Refer to LXD containers/VMs as instances (#7890) 2024-01-24 19:48:56 +01:00
doc_fragments [PR #7439/2b628260 backport][stable-7] Fix more typos (#7445) 2023-10-29 20:26:39 +01:00
filter [PR #7296/756e8f5c backport][stable-7] Update from_csv.py docs (#7300) 2023-09-20 22:44:15 +02:00
inventory [PR #8225/7fd37ea2 backport][stable-7] inventory plugins: make wrapping variables as unsafe smarter to avoid triggering an AWX bug (#8245) 2024-04-20 10:08:26 +02:00
lookup [PR #8238/a05a5982 backport][stable-7] bitwarden_secrets_manager: implement rate limit retry with backoff (#8260) 2024-04-21 15:09:57 +02:00
module_utils [PR #7790/787fa462 backport][stable-7] fix(modules/gitlab_runner): Use correct argument to list all runners (#8311) 2024-05-06 19:45:53 +02:00
modules [PR #7790/787fa462 backport][stable-7] fix(modules/gitlab_runner): Use correct argument to list all runners (#8311) 2024-05-06 19:45:53 +02:00
plugin_utils [PR #8225/7fd37ea2 backport][stable-7] inventory plugins: make wrapping variables as unsafe smarter to avoid triggering an AWX bug (#8245) 2024-04-20 10:08:26 +02:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00