Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #6712/e85b0080 backport][stable-6] gitlab_group => Make most options optional #6724

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jun 18, 2023

This is a backport of PR #6712 as merged into main (e85b008).

SUMMARY

This PR changes the gitlab_group module to make most options optional, as they should be according to the gitlab API documentation. This PR also ensures compatibility with Gitlab v16 as current module behaviour is non-functional with Gitlab v16.

Closes #4577
Closes #5806

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gitlab_group

ADDITIONAL INFORMATION

Current module behaviour is to include parameters in the API call to gitlab even if they're not set. This results in the API call including 'nil' values for these parameters. This still worked up until Gitlab v15.11.4.
Gitlab v16 currently breaks on this behaviour. This pull request ensures API parameters are only included when they're actually set, or if they are mandatory.

* Make most options optional as they should be

* Add filter to create_group instead

* Remove whitespace

* Add changelog fragment

* Added description and extension to fragment

* Update changelogs/fragments/6712-gitlab_group-filtered-for-none-values.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update plugins/modules/gitlab_group.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Make Python 2.6 compatible.

* Another shot at compatibility.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit e85b008)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 18, 2023
@felixfontein felixfontein merged commit afd24cc into stable-6 Jun 18, 2023
@felixfontein felixfontein deleted the patchback/backports/stable-6/e85b0080360100d34d0bd366b85a321743314440/pr-6712 branch June 18, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants