Skip to content

dictdiffer: deep diff of dicts in lists#68669

Open
tacerus wants to merge 1 commit intosaltstack:masterfrom
tacerus:dictdiffer-listofdicts
Open

dictdiffer: deep diff of dicts in lists#68669
tacerus wants to merge 1 commit intosaltstack:masterfrom
tacerus:dictdiffer-listofdicts

Conversation

@tacerus
Copy link
Contributor

@tacerus tacerus commented Jan 30, 2026

What does this PR do?

So far, lists would always be compared as a whole - in case of lists containing dicts as elements, this would cause lots of output even if only parts of the contained dicts changed. Allow matching of lists with consistently keyed dicts.
We do have listdiffer, but custom logic was implemented as importing listdiffer in dictdiffer would cause a circular import.

Let me know if you have a better idea for this.

What issues does this PR fix or reference?

Fixes #68726.

Previous Behavior

No way to diff dicts in lists in dicts.

New Behavior

Functionality is available.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we get a changelog please?

So far, lists would always be compared as a whole - in case of lists
containing dicts as elements, this would cause lots of output even if
only parts of the contained dicts changed. Allow matching of lists with
consistently keyed dicts.
We do have listdiffer, but custom logic was implemented as importing
listdiffer in dictdiffer would cause a circular import.

Signed-off-by: Georg Pfuetzenreuter <georg.pfuetzenreuter@suse.com>
@tacerus tacerus force-pushed the dictdiffer-listofdicts branch from c09747d to d66523e Compare February 11, 2026 18:52
@tacerus
Copy link
Contributor Author

tacerus commented Feb 11, 2026

Added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dictdiffer: allow for diffing of dicts in lists

3 participants