rockcarver / frodo-cli

A CLI to manage ForgeRock platform deployments supporting Identity Cloud tenants, ForgeOps deployments, and classic deployments.
MIT License
19 stars 17 forks source link

Add a `--normalize` option to IDM config exports #399

Open atomicsamurai opened 5 months ago

atomicsamurai commented 5 months ago

When exporting IDM configs, add an optional switch to normalize the data so exports from 2 different envs can be compared better using visual diff/merge tools. For example, sort the objects array in managed schema output. Maybe all object properties should be sorted so even simple text diff tools can do a good job of diff'ing the configs.

vscheuber commented 5 months ago

@atomicsamurai we already sort what can be safely sorted, that was a change we made based on a request by a partner who is using frodo for CI/CD. Sorting arrays is typically dangerous, as the order is part of the value and implies meaning. In your example given, admin experience would be impacted as the platform admin ui displays objects based on the order of the objects array.

If we consider an optional switch, it would have to be very clearly marked as dangerous and we cannot sort all arrays, only the ones we explicitly clear for sorting.

vscheuber commented 5 months ago

Here's the commit referenced in my earlier comment: https://github.com/rockcarver/frodo-lib/pull/300/commits/88e1bb927be8afcf41480ef5d837193019392c18