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

gitlab_project: add param "issues_access_level" #8760

Conversation

julien-lecomte
Copy link
Contributor

@julien-lecomte julien-lecomte commented Aug 12, 2024

SUMMARY

There already is issues_enabled, but this seems to be the old name. issues_access_level seems to be the new name.

The first one is a bool, and the second one has the usual ["private", "disabled", "enabled"] values.

There are currently no handling of parameters depending on the gitlab version, and thus no code of such sort has been added to handle old (very old?) versions of gitlab. Nevertheless, new versions of gitlab don't seem bothered with obsolete values such as issues_enabled

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • gitlab_project
ADDITIONAL INFORMATION

This pull request is a commit above the one in #8759

For this reason, it is expected that #8759 be merged before this one being merged.

@julien-lecomte julien-lecomte force-pushed the gitlab_project_add_params branch from 15391f4 to cded9cf Compare August 12, 2024 20:50
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module plugins plugin (any type) labels Aug 12, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch labels Aug 13, 2024
@lgatellier
Copy link
Contributor

@julien-lecomte you can now rebase this PR! 😉

@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Aug 14, 2024
@julien-lecomte julien-lecomte force-pushed the gitlab_project_add_params branch from cded9cf to e6b408d Compare August 14, 2024 20:40
@julien-lecomte
Copy link
Contributor Author

@lgatellier Branch has been rebased.

@ansibullbot ansibullbot removed the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Aug 14, 2024
@lgatellier
Copy link
Contributor

Thanks for your contribution!

I think both options (the new one and the deprecated one) should be mutually exclusive, to avoid sending two incompatible options values to the API.

@ansibullbot ansibullbot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Aug 14, 2024
@julien-lecomte julien-lecomte force-pushed the gitlab_project_add_params branch from e6b408d to 7ee69da Compare August 15, 2024 11:10
@julien-lecomte
Copy link
Contributor Author

The mutual exclusive flag was added.

@julien-lecomte julien-lecomte force-pushed the gitlab_project_add_params branch from 7ee69da to cce12d0 Compare August 15, 2024 14:19
@julien-lecomte julien-lecomte force-pushed the gitlab_project_add_params branch from cce12d0 to e085a69 Compare August 16, 2024 13:32
@julien-lecomte
Copy link
Contributor Author

I've removed that occurrence and another one in the same time.

@julien-lecomte julien-lecomte force-pushed the gitlab_project_add_params branch from e085a69 to 441cdfe Compare August 16, 2024 13:53
@julien-lecomte
Copy link
Contributor Author

@lgatellier I see that issues_enabled defaults to True. This is probably wrong now, since it would activate issues whenever neither is specified. Others (wiki_enabled) also default to True.

I believe that these values should have no default.

@felixfontein
Copy link
Collaborator

@lgatellier I see that issues_enabled defaults to True. This is probably wrong now, since it would activate issues whenever neither is specified. Others (wiki_enabled) also default to True.

I believe that these values should have no default.

I agree it should not have a default, but for some reason it (and some other options) have one. Getting rid of defaults is not so easy, you have to deprecate them first and eventually remove them. For that I would add a new option that allows to disable them, and deprecate that option's default instead.

As an example of how that goes, see #850 for adding such an option (that option's default changed in 4.0.0, and the option was eventually removed in #6836).

@julien-lecomte
Copy link
Contributor Author

you have to deprecate them first and eventually remove them

In such a case, I think it's best to leave that to a future PR.

@felixfontein
Copy link
Collaborator

If nobody objects, I'll merge this at the upcoming weekend.

Copy link
Collaborator

@russoz russoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felixfontein felixfontein merged commit 5192ffe into ansible-collections:main Aug 24, 2024
147 checks passed
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Aug 24, 2024
@felixfontein
Copy link
Collaborator

@julien-lecomte thanks for your contribution!

@felixfontein
Copy link
Collaborator

@lgatellier @russoz thanks for reviewing!

@felixfontein felixfontein added backport-9 Automatically create a backport for the stable-9 branch and removed backport-9 Automatically create a backport for the stable-9 branch labels Aug 26, 2024
Copy link

patchback bot commented Aug 26, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/5192ffe5b3e60290989b97f6d23661b4101d4622/pr-8760

Backported as #8805

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Aug 26, 2024
gitlab_project: add option `issues_access_level` to enable/disable project

(cherry picked from commit 5192ffe)
felixfontein pushed a commit that referenced this pull request Aug 26, 2024
…ues_access_level" (#8805)

gitlab_project: add param "issues_access_level" (#8760)

gitlab_project: add option `issues_access_level` to enable/disable project

(cherry picked from commit 5192ffe)

Co-authored-by: Julien Lecomte <[email protected]>
@julien-lecomte julien-lecomte deleted the gitlab_project_add_params branch September 22, 2024 22:24
aioue pushed a commit to aioue/community.general that referenced this pull request Oct 1, 2024
…8760)

gitlab_project: add option `issues_access_level` to enable/disable project
TobiasZeuch181 pushed a commit to TobiasZeuch181/zypper_repository_add_list that referenced this pull request Oct 2, 2024
…8760)

gitlab_project: add option `issues_access_level` to enable/disable project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch feature This issue/PR relates to a feature request module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants