-
Notifications
You must be signed in to change notification settings - Fork 173
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(cli): Add --with-prune option for diff command #469
Conversation
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.
Wow, thanks for jumping onto this! I just tested your code and it works really well!
I noticed an edge-case that occurs when there are no resources that carry the tanka.dev/environment
label, kubectl returns simply nothing on stdout because of the --ignore-not-found
flag. The following logic does not handle that case, JSON parsing fails.
Thanks for your quick reaction! I have implemented the requested changes. One side-effect of this PR is that |
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.
Super nice work! Congrats on your first PR 🎉
d3c8b4b
to
00ac1a2
Compare
I was about to open an issue to discuss adding "ignore not found" behaviour to prune, so that we can see prune diffs when unapplied changes exist in the rendered manifests, and found this. Putting that behind the same command as diff is even better! I look forward to being able to use this - any chance of a release soon? 🙏 |
Fixes #416 in line with what @malcolmholmes suggested.
Adds
--with-prune
option todiff
command. This makes it possible to see a full diff of both added and deleted resources.I'm not sure if it's okay to add
--ignore-not-found
toGetByState()
or if it should be passed as argument to it. I have left aTODO
in the code.Let me know if I should change anything.