-
Notifications
You must be signed in to change notification settings - Fork 66
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
Truncate/Filter Diff Output #280
Comments
You can use |
@vladimir-avinkin this doesn't work if the entire file is getting deleted/added. |
@whitleykeith I was able to get it working like this: dyff between 1.yaml 2.yaml --exclude-regexp "spec.containers.*,spec.ports.*"
# or
dyff between --ignore-order-changes --exclude-regexp "metadata.labels.helm.sh.*,metadata.labels.app.kubernetes\.io.*" Don't forget that it's actual regex syntax not UNIX-like. So you'd have to use |
@oguzhan-yilmaz doesn't work if the file is getting deleted either. The issue is that the |
Thanks for the input. This is good. I am just thinking about it. Thing is, I wonder if it makes sense to add even more Kubernetes aware behavioral changes. I think I need to think about this a bit. So the idea would basically be that by default, |
That'd be great especially since there's already the |
I'd like to be able to truncate the output of diffs, specifically when the entire file is getting added/deleted
For instance, we use dyff to check what a PR will do to our K8s cluster. We also have certain workflows that consistently have deletes and creates of new manifests in our cluster. The rendering of those (especially deleted manifests) can be unweidly and generally provides little to no information on the actual change to the cluster.
We don't want to use
brief
output, because we take the diff of all the manifests at once and do want to see what changes are being made elsewhere. I've tried to useexclude-regexp
andfilter-regexp
, but they didn't work. I think those only apply to excluding those paths from determining a diff and not output. Because deletes/creates are "root" level changes, they always show up unless I ignore all diffs.A perfect use-case is that I never want to show the
status
ormetadata.managedFields
blocks on any diff, ever. Ideally, I could supress output paths--suppress status.*
. I would also be fine if there was an output mode for "brief on large diffs"/"brief on new/deleted files".Is there a way to do this today or is this a feature request?
The text was updated successfully, but these errors were encountered: