-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(api): configmaps items generated in order #6025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: manute The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Welcome @manute! |
|
Hi @manute. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
If you claim to have fixed something, please include sufficient test cases before opening a pull request. |
|
This PR has multiple commits, and the default merge method is: merge. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Added tests, thanks |
| return nil, err | ||
| } | ||
| if err = rn.LoadMapIntoConfigMapData(m); err != nil { | ||
| if err = rn.LoadMapIntoConfigMapData(m.values); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't passing the raw map here throw away the sorting effort?
Also, it looks like sorting is done in LoadMapIntoConfigMapData already:
kustomize/kyaml/yaml/datamap.go
Line 27 in 17a06a7
| for _, k := range SortedMapKeys(m) { |
I am starting to wonder if the problem happens somewhere else. Could the resource be decoded and re-encoded somewhere else (transformer?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I suspected that as welll.
My idea was to return that order map first and set the values accordingly to the process. And then see if we can check the order after is loaded. But if is in other place that , this implementation is not enough, or it should be moved.
| return nil, err | ||
| } | ||
| if err = rn.LoadMapIntoSecretData(m); err != nil { | ||
| if err = rn.LoadMapIntoSecretData(m.values); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Hey,
Just created this PR to see if it can be resolved this issue #4292
Any feedback appreciate, thanks!