Skip to content
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

New recursive diff master #55759

merged 10 commits into from Jan 4, 2020


Copy link

@github-abcde github-abcde commented Dec 30, 2019

Port to master of #53715

What does this PR do?

It adds recursive_diff to This is a recursive diff that can handle mixed nested mappings/iterables. This is an alternative to salt/utils/ or salt/utils/ that can only handle nested dicts and list-of-nested-dicts respectively.

What issues does this PR fix or reference?

None that I'm aware of.

Previous Behavior

Only nested dicts or list-of-nested-dicts could be recursively diffed. Nothing is available to recursively diff a mix of lists, dicts, OrderedDicts, sets, tuples or other mapping or iterable type.

New Behavior is able to produce a dict with old and new keys for any combination of nested mapping- or iterable types. Some options are only applicable to certain types, like ignore_keys and ignore_missing_keys will only work on (nested) mappings, and ignore_order will only make a difference on ordered datatypes (like OrderedDict and list).

Tests written?


Commits signed with GPG?


… iterable recursively. Also added unittests.
This will make it more compatible with the existing dictdiffer.
Also added tests for the new parameter.
Also remove FilterFalseyTestCase class as this is part of another PR
Remove is_iterable as it is already implemented in is_iter;
Replaced all elif after return with if;
Remove else after return or continue;
Added function docstrings where they were missing.
@github-abcde github-abcde requested a review from as a code owner Dec 30, 2019
@ghost ghost requested a review from xeacott Dec 30, 2019
dwoz approved these changes Jan 4, 2020
@dwoz dwoz merged commit 0838f1e into saltstack:master Jan 4, 2020
49 checks passed
@github-abcde github-abcde deleted the new_recursive_diff-master branch Jan 6, 2020
@github-abcde github-abcde mentioned this pull request Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants