vmware-tanzu / asset-relocation-tool-for-kubernetes

A tool for relocating Kubernetes Assets
Other
42 stars 5 forks source link

Enforce hierarchical chart changes ordering #151

Closed josvazg closed 2 years ago

josvazg commented 2 years ago

groupChangesByChart was returning a map but we expected the result sto be ordered, in particular hierarchical ordered preferably.

This change turns groupChangesByChart into orderedChangesByChart by taking the mp generated before and passing it to orderByChartHierarchy which builds an array of ChartChanges and enforces the expected hierarchical order leveraging the chart full path: least deep paths go first, at the same depth level order alphabetically.

Signed-off-by: Jose Luis Vazquez Gonzalez josvaz@vmware.com

vmwclabot commented 2 years ago

@josvazg, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

vmwclabot commented 2 years ago

@josvazg, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.