Skip to content

[bug]: rbac generator is inconsistent #871

@jamescooke-xyz

Description

@jamescooke-xyz

Describe the bug

The output order of the RbacGenerator isn't consistent.

If you rebuild a project, the order the rules are output in operator-role.yaml can change.

They should be output in a consistent order (i.e. alphabetical).

To reproduce

It happens very frequently but is difficult to suggest exactly how to recreate. The problem is the rules are retrieved as an unordered list.

See: https://github.com/buehler/dotnet-operator-sdk/blob/417df6b1449a7eb9466bb6e7701519e4cd5cd5ba/src/KubeOps.Cli/Generators/RbacGenerator.cs#L23

Expected behavior

The output of operator-role.yaml should be consistent and predictable so only real changes are identified and committed to version control.

Screenshots

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions