-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: allow empty patches files #5990
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?
fix: allow empty patches files #5990
Conversation
Add test to validate that empty files don't produce an error when using the `path` option of the `patches` convenience. Add test to validate that using the deprecated patchesStrategicMerge still produces an error and no changes have been introduced in old features.
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. |
Welcome @ralgozino! |
Hi @ralgozino. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ralgozino 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 |
a9cb5b6
to
21a5da1
Compare
Call json6902 transformer only when there are patches to apply. Addresses kubernetes-sigs#5956
21a5da1
to
24ea1b9
Compare
Hello!
Disclaimer: this is my first PR to Kustomize, even though I tried to follow the guidelines, please let me know if I missed anything / should change something.
This PR fixes the issue that I opened and triaged #5956: tl;dr pointing to empty patches files resulted in an error instead of ignoring the files.
As per guidelines, I first added a test that replicates the issue:
TestEmptyPatchFilesShouldBeIgnored
Then the fix is pretty straightforward, call
transformJson6902
only if there are json patches to apply.Note: I also added a test to validate that patchesStrategicMerge still behaves the same and that I did not introduced a regression on a deprecated feature. Please let me know if this is ok.
Thanks for kustomize and for your time in reviewing this PR :-)