-
Notifications
You must be signed in to change notification settings - Fork 768
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
feat(1765): remove useless keys from the output yml #1775
feat(1765): remove useless keys from the output yml #1775
Conversation
Signed-off-by: Martin Jirku <[email protected]>
Welcome @martinjirku! |
I did not update docker tests, I will update it in next commit |
@martinjirku any updates on this? |
@AhmedGrati I've got much at work before Christmas. Still working... I've updated cca 40 tests sofar. |
…veEmptyInterfaces algo Signed-off-by: Martin Jirku <[email protected]>
AMAZING work! Thank you so much 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 LGTM! |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdrage, martinjirku The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR transforms yaml output by removing map[string]interfaces{} with no keys, or the nil fields. This PR utilizes the current implementation of the yaml transformation process in the "kompose"
(1) object -> (2) []byte (json) -> (3) interface{} -> (4) []byte (yaml)
. Between steps 3 and 4, there is a chance to clean the data structure by removing any empty fields.Which issue(s) this PR fixes:
Fixes #1758
Special notes for your reviewer:
IMHO, The empty artifacts (such as strategy {} , resources: {},...) are present because we have e.g. in the
DeploymentSpec.Strategy
struct not the reference (a pointer) to the struct, since this change would be outside of the kompose scope and I am not sure if it is feasible, I've decided to fix it by removing all empty fields.Is this correct approach I should proceed with, or should I open (or search if a ticket exists) in the k8s/kubernetes repo for change in the API app types?