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

keycloak_clientscope_type fix checkmode #9093

Conversation

witrdotnet
Copy link
Contributor

@witrdotnet witrdotnet commented Nov 1, 2024

SUMMARY

Exit json with result only after evaluating default_clientscopes_add, optional_clientscopes_add, default_clientscopes_delete, optional_clientscopes_delete and after updating result["changed"]. Otherwise, keycloak_clientscope_type will not detect changes in check mode.

Fixes #9092

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

keycloak_clientscope_type

ADDITIONAL INFORMATION

Before fix (check mode)

Capture d’écran de 2024-11-01 01-40-05

After fix (check mode)

Capture d’écran de 2024-11-01 01-21-26

@witrdotnet witrdotnet marked this pull request as ready for review November 1, 2024 00:29
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Nov 1, 2024
@felixfontein felixfontein added the check-before-release PR will be looked at again shortly before release and merged if possible. label Nov 1, 2024
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

plugins/modules/keycloak_clientscope_type.py Outdated Show resolved Hide resolved
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR label Nov 2, 2024
@ansibullbot

This comment was marked as outdated.

@witrdotnet witrdotnet force-pushed the keycloak/keycloak_clientscope_type_checkmode branch from 77444c7 to d2254dc Compare November 2, 2024 11:59
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the ci_verified Push fixes to PR branch to re-run CI label Nov 2, 2024
@witrdotnet witrdotnet force-pushed the keycloak/keycloak_clientscope_type_checkmode branch from d2254dc to 28dbc98 Compare November 2, 2024 12:32
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Nov 2, 2024
@felixfontein felixfontein added the backport-9 Automatically create a backport for the stable-9 branch label Nov 2, 2024
witrdotnet and others added 2 commits November 2, 2024 22:18
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
@felixfontein
Copy link
Collaborator

If nobody objects, I'll merge this tomorrow.

@felixfontein felixfontein merged commit 8fc11fe into ansible-collections:main Nov 3, 2024
126 checks passed
Copy link

patchback bot commented Nov 3, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/8fc11fe88f8093d5304cb88ae80d57d930fe1527/pr-9093

Backported as #9095

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

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Nov 3, 2024
patchback bot pushed a commit that referenced this pull request Nov 3, 2024
* fix check_mode on set keycloak client scope type (#9092)

* add changelog fragment (#9092)

* update changelog fragment (#9092)

* compact code: make one line conditions with list comprehension and any()

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* fix syntax error: remove extra ')'

* fix changelog fragment type

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

* add issue's link in changelog fragment

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8fc11fe)
@felixfontein
Copy link
Collaborator

@witrdotnet thanks for your contribution!
@russoz thanks for reviewing!

felixfontein pushed a commit that referenced this pull request Nov 3, 2024
…checkmode (#9095)

keycloak_clientscope_type fix checkmode (#9093)

* fix check_mode on set keycloak client scope type (#9092)

* add changelog fragment (#9092)

* update changelog fragment (#9092)

* compact code: make one line conditions with list comprehension and any()

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* fix syntax error: remove extra ')'

* fix changelog fragment type

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

* add issue's link in changelog fragment

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 8fc11fe)

Co-authored-by: witrdotnet <witr.net@gmail.com>
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
* fix check_mode on set keycloak client scope type (ansible-collections#9092)

* add changelog fragment (ansible-collections#9092)

* update changelog fragment (ansible-collections#9092)

* compact code: make one line conditions with list comprehension and any()

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* fix syntax error: remove extra ')'

* fix changelog fragment type

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

* add issue's link in changelog fragment

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

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
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 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.

keycloak_clientscope_type: changes are not detected in check mode
4 participants