Skip to content

Arrays sorting is non-deterministic and results in lots of changes in DB #39

@patrickleet

Description

@patrickleet

Is this a request for help?:


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

BUG REPORT

Version of Keycloak-controller:

latest (5 hours ago on 10/22 - no version tag)

Version of Keycloak:

11

Version of Kubernetes:

16

What happened:

Arrays are non-deterministic / unsorted, which results in updates being made over and over just to change the order of the array:

change defaultClientScopes from [profile, roles, email] to [email, profile, roles]"

I've seen it happen with redirectURIs as well

What you expected to happen:

If the values of the array sorted are the same, don't update the resource

How to reproduce it (as minimally and precisely as possible):

Happens with normal usage

Anything else we need to know:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions