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

Fix RecursiveDictDiffer #63213

Merged
merged 9 commits into from
Dec 6, 2022
Merged

Conversation

lkubb
Copy link
Contributor

@lkubb lkubb commented Dec 6, 2022

What does this PR do?

  • fixes issue with added/removed when a new key has a dictionary value
  • adds separator and include_nested switches
  • migrates tests to pytest
  • code cleanup

What issues does this PR fix or reference?

Fixes: #59017

Previous Behavior

  • crash when an addition is a nested dictionary
  • does not list added/removed empty dicts
  • never includes additions/deletions when a value changes from/to dict
  • always separates nested keys with dots
  • cannot list keys of added/removed subdicts

New Behavior

  • works as intended
  • lists added/removed empty dicts
  • includes added/removed subdicts from type change
  • separator can be overridden, but defaults to dot
  • optionally lists keys of added/removed subdicts as well

Merge requirements satisfied?

Commits signed with GPG?

Yes

@lkubb lkubb requested a review from a team as a code owner December 6, 2022 12:39
@lkubb lkubb requested review from whytewolf and removed request for a team December 6, 2022 12:39
@garethgreenaway garethgreenaway merged commit b150f56 into saltstack:master Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] RecursiveDictDiffer has a bug - TypeError: string indices must be integers
4 participants