Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Unstable key order within maps #301

Closed
mkmik opened this issue May 5, 2021 · 0 comments · Fixed by #302
Closed

Unstable key order within maps #301

mkmik opened this issue May 5, 2021 · 0 comments · Fixed by #302

Comments

@mkmik
Copy link
Contributor

mkmik commented May 5, 2021

Some maps that contain alphanumerical sequences exhibit an unstable sort order:

{
    apiVersion: 'v1',
    kind: 'ConfigMap',
    metadata: {
      name: 'foo',
    },

    data: {
      '11': '',
      '1z': '',
      '2z': '',
    },
}

It's a well known bug in the gopkg.in/yaml.v2 library that has been fixed in v3 but not backported.

A pending backport PR is in go-yaml/yaml#736

This issue is distinct from the "top level object" sort order in kubecfg show, such as #123

mkmik added a commit that referenced this issue May 5, 2021
Pending cherry-pick PR (from v3 to v2) in go-yaml/yaml#736

Closes #301
@mkmik mkmik closed this as completed in #302 May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant