ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
816 stars 1.5k forks source link

[PR #8761/982b8d89 backport][stable-9] keycloak_user_federation: sort desired and after mappers by name #8837

Closed patchback[bot] closed 3 weeks ago

patchback[bot] commented 3 weeks ago

This is a backport of PR #8761 as merged into main (982b8d89b7373d4098020b1491ff3d5478fa9730).

SUMMARY

The module inconsistently sorts the mappers.

The module sorts the mappers fetched for the before state by name. The desired mappers and the mappers fetched after an update are not sorted. When comparing the desired mappers with the before mappers, changes are detected even if the mappers in both lists are the same except for the order. When diffing before with after mappers, differences are shown when the mappers are the same except for the order.

The changes add sorting by name for the desired mappers and the mappers fetched after an update, analog to the existing sorting for the before mappers. This minimizes the diff and makes the change detection more accurate.

ISSUE TYPE
COMPONENT NAME

keycloak_user_federation

ansibullbot commented 3 weeks ago

cc @eikef @laurpaum @mattock @ndclt @thomasbach-dev click here for bot help